eslint-config-proteus
v1.2.3
Published
A ESLint shareable configuration
Downloads
42
Maintainers
Readme
eslint-config-proteus
Provides 4 different predefined configurations for ESLint.
Installation
Install this config package and ESLint:
$ npm install --save-dev eslint-config-proteus
Usage
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.
Configurations
are 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.
Environments
enable 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
Rules
are 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
}
}