WARP ESLint Configuration
npm install --save-dev eslint eslint-config-warp
Usage
Create a .eslintrc.json
file in the project root containing the following:
Default usage
{
"extends": ["warp"],
"env": {
"browser": true
}
}
Always configure your environment.
Inside NodeJS ("env":{"node":true}
is implied)
{
"extends": ["warp/node"]
}
With ES6 support ("env":{"es6":true}
is implied)
{
"extends": ["warp/es6"]
}
ES6 module
{
"extends": ["warp/module"]
}
Combining rulesets
{
"extends": ["warp/node", "warp/es6"]
}
Overrides
- You can use
.eslintignore
to ignore paths. - You can override rules inside your
.eslintrc
file. - You can use
/*eslint rule:0*/
comments to override specific rules per file. - You can suppress eslint on a single line with
//eslint-disable-line
. - If you're confused: RTFM.
React JSX
npm install --save-dev eslint-config-standard-react
{
"extends": ["warp/jsx"]
}