@neo9/n9-coding-style
v6.1.0
Published
Set of rules ready to use in any JS project, based on eslint
Downloads
560
Readme
Neo9 coding style
ESLint coding style inspired from Airbnb coding style.
:warning: Drop NodeJS 14 support stating with version 5
Usage
yarn add @neo9/n9-coding-style --devAdd 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 :
- https://github.com/neo9/n9-node-routing
- https://github.com/neo9/n9-mongo-client
Auto fix errors
EsLint can sometimes auto fix errors. You can use the local binary.
npx eslint --fix '{src,test}/**/*.ts'