Enforce consistent code style
Opened this issue · 0 comments
OmTheTurtle commented
After #835 is merged, it'd be nice to enforce the code style so all our JS / TS code will look and read the same. For this we can use a pre-commit hook with husky and lint-staged so eslint / prettier would run before every commit.
Example package.json config:
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,js,json,yml,md}": "prettier --write",
"*.{ts,js}": "eslint --fix"
},