ESLint configurations used throughout projects
- @partumgmbh/eslint-config Base Configuration
- @partumgmbh/eslint-config-react React Configuration
Using husky and lint-staged fixes can automatically be applied before committing.
npm i -D husky lint-staged
// package.json
{
...
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
}
}
Use the ESLint VSCode plugin and make sure to set eslint.autoFixOnSave
to true.
Use the ESLint Atom plugin and make sure to enable Fix errors on save
.
For making changes to this project make sure to run the following.
npm i
npm run bootstrap
Make changes and then run the following to verify changes.
npm run test
Publishing a new version.
npm run publish