[Node.js] Lint your code like gnodi!
## Installation
Run the following command to add the package to your dev dependencies:
$ npm install --save-dev @gnodi/eslint-config
## Use
Add the following line to your package.json
:
...
"scripts": {
...
"lint": "gnodi-lint"
}
...
Then, you can immediately run the lint:
$ npm run lint
By default, only js files from directories .
, bin
, config
, lib
, src
and test
are processed.
You can add your own custom directories/files/globs passing it as arguments to your command gnodi-lint
:
...
"scripts": {
...
"lint": "gnodi-lint dist/bundle.js build/**/*.js"
}
...
You can override some rules with your own ones just using a standard .eslintrc
:
{
"extends": "@gnodi",
"rules": {
"comma-dangle": ["error", "always"]
}
}