forked from findthemasks/findthemasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
77 lines (64 loc) · 2.01 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"parserOptions": {
// Required for certain syntax usages
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"promise"
],
"extends": ["airbnb", "plugin:compat/recommended"],
"env": {
"browser": true,
"jquery": true
},
"rules": {
// Removed rule "disallow the use of console" from recommended eslint rules
"no-console": "off",
// Make line length longer.
"max-len": ["error", {
"code": 120,
"ignoreTemplateLiterals": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreRegExpLiterals": true
}],
// Most of our npm modules are for webpack and thus in devDependencies.
"import/no-extraneous-dependencies": "off",
// We use for..of loops and the rest of the airbnb disallowed syntax looks okay?
"no-restricted-syntax": 0,
// Client code is clearer with file extension.
"import/extensions": [2, "always"],
// Assigning into parameters isn't that hard to read in our code.
"no-param-reassign": "off",
// Nothing wrong with plusplus!
"no-plusplus": "off",
// Nothing wrong with continue either.
"no-continue": "off",
// Disable single-line statements (since we enforce curly braces for all)
"nonblock-statement-body-position": "off",
// All blocks require curly braces
"curly": [2, "all"],
"comma-dangle": [2, {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
"functions": "never"
}],
"object-curly-newline": [2, {
"ObjectExpression": { "multiline": true, "consistent": true },
"ObjectPattern": { "multiline": true, "consistent": true },
"ImportDeclaration": { "multiline": true, "consistent": true },
"ExportDeclaration": { "multiline": true, "consistent": true }
}],
"object-property-newline": 2,
"function-paren-newline": [2, "multiline-arguments"]
},
"settings": {
"polyfills": [
"Object.assign",
"Object.entries"
]
}
}