Wildbit-specific config for ESLint
npm install --save-dev eslint eslint-plugin-react wildbit/eslint-config-wildbit
- Add following block to
package.json
"eslintConfig": {
"extends": [
"eslint-config-wildbit"
]
}
Linting makes more sense when running before committing the code.
To add a pre-commit task:
npm install -D pre-commit lint-staged
- Add
"eslint-staged": "eslint-staged"
toscripts
section ofpackage.json
- Add
"pre-commit": [ "eslint-staged" ]
topackage.json