add: Format and linting#4
Conversation
Deploying filcdn-dashboard with
|
| Latest commit: |
3868c2e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3e41932b.filcdn-dashboard.pages.dev |
| Branch Preview URL: | https://add-formatting-and-linting.filcdn-dashboard.pages.dev |
bajtos
left a comment
There was a problem hiding this comment.
Have you considered adding neostandard as well?
See
| { | ||
| "singleQuote": true, | ||
| "semi": false | ||
| } |
There was a problem hiding this comment.
Can you please use our standard setup (@checkernetwork/prettier-config)?
There was a problem hiding this comment.
Thanks for pointing that out, should be okay now. I've added both prettier config and neostandard.
| "@checkernetwork/prettier-config": "^1.0.1", | ||
| "eslint": "^9.28.0", | ||
| "neostandard": "^0.12.1", | ||
| "prettier": "^3.5.3", |
There was a problem hiding this comment.
Should we also use "@checkernetwork/prettier-config" here?
There was a problem hiding this comment.
I think so -- Miro has suggested it in his review
| export default neostandard({ | ||
| noStyle: true, // Disable style-related rules, we use Prettier | ||
| ts: false, | ||
| env: ['mocha'], |
There was a problem hiding this comment.
I believe we are not using Mocha for unit tests, in which case this line should be removed.
| "lint": "eslint & prettier --check .", | ||
| "lint:fix": "eslint --fix & prettier --write .", | ||
| "observable": "observable", | ||
| "test": "prettier --check ." |
There was a problem hiding this comment.
Suggestion:
"test": "npm run lint"
(We want to run both prettier & eslint.)
| "prettier-plugin-jsdoc": "^1.3.2", | ||
| "prettier-plugin-multiline-arrays": "^4.0.3", | ||
| "prettier-plugin-packagejson": "^2.5.15", |
There was a problem hiding this comment.
I believe we don't need these dependencies, @checkernetwork/prettier-config includes them.
Setup prettier, eslint & neostandard formatting and linting. Repository is using standard checkernetwork prettier config.