eslint-config-fanmiles
This package provides Fanmiles' .eslintrc as an extensible shared config. https://www.fanmiles.com/
Rules
Ruleset is based on the AirBnB settings, but is customized in these ways:
- Indentation of 4 spaces
- Includes chai-friendly-plugin, so
expect(1).to.be.equal(1)
is not considered as a warning/error - Does not encourage adding trailing commas to arrays and objects (e.g.
[1,2,]
is not allowed) - If there are jsdoc comments, check them for validity
- Emits error if the maximum cyclomatic complexity in a program exceeds 20
- Relax max-line-length requirements to 120 characters
Usage
Add eslint-config to your devDependencies
:
$ npm i -D eslint-config-fanmiles
Now create or update .eslintrc
in your project root to include the configuration.
{
"extends": "fanmiles"
}
ReactJS specific rules are not included by default, yet.