@withdouble/eslint-config
Install
npm i -D @withdouble/eslint-config
Usage
Add this to your .eslintrc file:
{
"extends": "@withdouble"
}
or in your package.json
:
"eslintConfig": {
"extends": "@withdouble"
}
Rules
Follows JavaScript Standard Style and Flowtype plugin recommended rules, with additions/exceptions:
-
Else/Catch/Finally statements must be on their own line after the preceding closing brace.
eslint: brace-style
if (condition) {
}
else {
}
if (condition) {
} else {
}
-
Trailing commas on each line if multiline
eslint: comma-dangle
const him = {
name: 'John',
message: 'hello'
}
const her = {
name: 'Jane',
message: 'hi',
}
-
No var
, use const
or let
instead
eslint: no-var
var him = 'John'
const her = 'Jane'
let it = 'Rex'