eslint-config-democracyos
v2.0.2
Published
ESLint Shareable Config for DemocracyOS's projects
Downloads
25
Maintainers
Readme
DemocracyOS' ESLint Shareable Config
An ESLint Shareable Config featuring Standard React and some other goodies.
Using this config you won't need to install any other dependencies/plugins, and you will profit from eslint, react, imports, etc...
Usage
npm install --save-dev eslint eslint-config-democracyos
And, in your .eslintrc
:
{
"extends": ["democracyos"]
}
If you want to include Node.js rules:
{
"extends": ["democracyos", "democracyos/node"]
}
Or the React ones:
{
"extends": ["democracyos", "democracyos/react"]
}
Rules Included
- Standard rules.
- Standard React rules.
- eslint-plugin-node
- With the default configuration.
- eslint-plugin-import
- eslint-plugin-promise
- Enforces the use of
catch
on un-returned promises. - Avoid wrapping values in
Promise.resolve
orPromise.reject
when not needed. - Enforce consistent param names when creating new promises.
- Avoid nested
.then()
or.catch()
statements.
- Enforces the use of
- Eslint Rules:
- Require parens in arrow function arguments (arrow-parens).
- Require curly braces
{}
on multi-line blocks (curly#multi-line). - Require spaces between braces (object-curly-spacing#always).
- React Rules:
- Enforce the closing bracket location for JSX multiline elements (jsx-closing-bracket-location).
- Validate spacing before closing bracket in JSX (jsx-space-before-closing).
Atom Usage
Just install: