ESLint coding style inspired from Airbnb coding style.
yarn add @neo9/n9-coding-style --dev
Add a .eslintrc.yaml
file in the root directory.
extends:
- './node_modules/@neo9/n9-coding-style/.eslintrc.yaml'
Add a lint
script to your package.json
:
{
...
"lint": "eslint --config .eslintrc.yaml '{src,test}/**/*.ts'",
...
}
Example of usage :
EsLint can sometimes auto fix errors. You can use the local binary.
npx eslint --fix '{src,test}/**/*.ts'