eslint-config-strict
A set of configurable ESLint configurations.
Installation
Install this config package and ESLint:
$ npm install --save-dev eslint-config-defaults
Usage
Full Configurations
This set of configs is meant to be extended on a per-project basis as necessary using ESLint's
shareable configs feature. For more details about how shareable configs work, see the
ESLint documentation.
This package includes the following full configurations:
defaults
- The default ES5 configdefaults/off
- Turns off all rules. This will be ESLint's default after 1.0.0defaults/es5-browser
- The default ES5 config with browser globalsdefaults/es5-node
- The default ES5 config with node globals and rulesdefaults/es5-test
- The default ES5 config with mocha globalsdefaults/es5
- The default ES5 configdefaults/es6-browser
- The default ES6 config with browser globalsdefaults/es6-node
- The default ES6 config with node globals and rulesdefaults/es6-test
- The default ES6 config with mocha globalsdefaults/es6
- The default ES6 config
To extend a config in ESLint just add the extends attribute to your .eslintrc
{
"extends": "defaults"
}
{
"extends": "defaults/es6-browser"
}
Piecemeal Configurations
ESLint configuration is broken out into categories that mirror the documentation. Each of the
following directories can be included as a set of defaults or by including the off.js
file which
turns off every rule in this category.
best-practices
, errors
, es6
, legacy
, node
, strict
, style
, variables
Using these you should be able to create the exact starting config you need
{
"extends": ["defaults/es6-browser", "defaults/legacy/defaults.js"]
}
{
"extends": [
"defaults/best-practices/default.js",
"defaults/errors/default.js"
"defaults/es6/off.js"
"defaults/legacy/off.js"
"defaults/node/off.js"
]
"env" {
"phantom": true
}
}
License
MIT License