eslint-config-fanmiles
v1.2.1
Published
Fanmiles' .eslintrc as an extensible shared config
Downloads
2
Readme
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, with except:
- Includes chai-friendly-plugin, so
expect(1).to.be.equal(1)
is not considered as a warning/error
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.
When using NPM v2.x
There are some fundamental differences in the way packages are installed when using NPM v2.x compared to later versions. Since release v1.1, the previously "missing" dependencies are provided as "peerDependencies" which are implicitly installed in this NPM version.
Have a look at https://github.com/npm/npm/blob/master/CHANGELOG.md#user-content-flat-flat-flat for the exact details.
When using Nodejs 4.x
At the time of writing, the applied eslint rules include "'use strict' is unnecessary inside of modules". This can cause issues with older node versions, and/or when not transpiling with babel, etc. See https://github.com/jshint/jshint/issues/924, https://github.com/eslint/eslint/issues/3306, http://stackoverflow.com/questions/32791507/node-js-and-eslint-disagree-on-use-strict, etc.
To be on the safe side: Either use a nodejs release which no longer has es6-features hidden behind command line flags, or make sure to execute code with the 'strict-mode' flag like this: node --use_strict <path/to/file>
.