-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
40 lines (36 loc) · 1.4 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"extends": "airbnb-base",
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
// Airbnb preset sets this to "module"
// but everything outside of lib is a script
"sourceType": "script"
},
"rules": {
// Have to override the airbnb rules, which want training commas for function
// arguments, even though these are only supported in ES2017 and up.
// Overriding this rule involves setting all of the same options except for
// "functions". https://github.com/eslint/eslint/issues/7851#issuecomment-270428874
"comma-dangle": ["warn", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never" // This is the actual change from the airbnb rules
}],
// The Airbnb style guide says nothing about using console,
// and we legitimately need it for output
"no-console": "off",
// Airbnb sets this to "never" even though their written style guide
// never actually mentions it. Babel inserts it for them, but we're
// not using Babel.
"strict": ["error", "safe"],
// The Airbnb style guide never mentions this, but the airbnb eslint rules
// consider it an error. Shadowing is a useful language feature, and now
// that we have lexical scoping, it's not as dangerous as it once was.
"no-shadow": "off"
}
}