-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.eslintrc.js
62 lines (61 loc) · 1.84 KB
/
.eslintrc.js
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
module.exports = {
env: {
es6: true,
browser: false,
node: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
globals: {
"__base": true,
},
extends: ["eslint:recommended"],
rules: {
"semi": ["warn", "always"],
"comma-dangle": ["warn", "always-multiline"],
"no-var": ["warn"],
"arrow-spacing": ["error", { "before": true, "after": true }],
"space-infix-ops": ["warn", { "int32Hint": true }],
"keyword-spacing": ["warn", { "before": true, "after": true }],
"space-unary-ops": [
"warn",
{
"words": true,
"nonwords": false,
},
],
"comma-spacing": ["warn", { "before": false, "after": true }],
"object-curly-spacing": ["warn", "always"],
//"arrow-parens": ["warn", "as-needed"],
"no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"varsIgnorePattern": "[iIgnored]", // except variable explicitly declared as "ignored"
"ignoreRestSiblings": false,
"argsIgnorePattern": "^_", // except arguments explicitly declared as "not used" with a _ prefix,
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^ignore", // if an error object should be ignored, call it "ignore/d"
}],
"no-console": "warn",
"no-extra-semi": "warn",
},
overrides: [
{
files: [
"tests/**/*tests.js",
],
env: {
es6: true,
browser: false,
node: true,
mocha: true,
jest: true,
},
rules: {
"no-console": "off",
},
},
],
};