eslint-config-proteus v1.2.3
eslint-config-proteus
Provides 4 different predefined configurations for ESLint.
Installation
Install this config package and ESLint:
$ npm install --save-dev eslint-config-proteusUsage
eslint-config-proteus is basically a ESLint's shareable config.
As such, it is meant to be extended on each project configuration using a .eslintrc configuration file.
To extend a .eslintrc config just add the extends attribute to it.
{
"extends": [
"proteus",
"proteus/environments/browser"
]
}{
"extends": [
"proteus/configurations/errors",
"proteus/environments/node"
]
}{
"extends": [
"proteus/configurations/warnings",
"proteus/environments/browser",
"proteus/environments/node"
]
}{
"extends": "proteus/configurations/off"
}Configurations, environments and rules
eslint-config-proteus is divided into configurations, environments and rules.
Configurationsare basically a combination of rules.The predefined configurations are:
defaults- The default ESLint configuration.errors- All ESLint rules throw errors.warnings- All ESLint rules throw warnings.off- Turns off all ESLint rules.
Environmentsenable specific environments for either configurations or rules.The predefined environments are:
- amd
- applescript
- atomtest
- browser
- commonjs
- embertest
- es6
- greasemonkey
- jasmine
- jest
- jquery
- meteor
- mocha
- mongo
- nashorn
- node
- phantomjs
- prototypejs
- protractor
- qunit
- serviceworker
- shared-node-browser
- shelljs
- webextensions
- worker
Rulesare the backbone of the configuration. See ESLint Rules for more information.
All these can be combine to create specific configurations, they can also be overridden by the rules specified in the
.eslintrc configuration file.
{
"extends": [
"proteus/configurations/warnings",
"proteus/environments/browser",
"proteus/environments/node"
],
"rules": {
"eqeqeq": 0
}
}