-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.eslintrc.json
More file actions
63 lines (57 loc) · 1.9 KB
/
Copy path.eslintrc.json
File metadata and controls
63 lines (57 loc) · 1.9 KB
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
{
"ignorePatterns": ["build/"],
"env": {
"browser": true,
"node": true,
"jest": true,
"es2022": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
/** Errors **/
"camelcase": ["error", { "properties": "never" }],
"no-array-constructor": "error",
"no-iterator": "error",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-proto": "error",
/** Warnings **/
"max-depth": ["warn", { "max": 5 }],
"max-params": ["warn", { "max": 5 }],
"no-restricted-syntax": ["warn", "ClassDeclaration", "SwitchStatement"],
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
/** Fixable **/
"arrow-parens": ["warn", "always"],
"brace-style": ["warn", "stroustrup", { "allowSingleLine": true }],
"no-var": "warn",
"prefer-const": "warn",
"prefer-template": "warn",
"quotes": ["warn", "single", { "allowTemplateLiterals": true }],
"semi": ["warn", "always"],
/** Whitespace **/
"array-bracket-spacing": ["warn", "never"],
"arrow-spacing": ["warn", { "before": false, "after": false }],
"comma-spacing": ["warn", { "before": false, "after": true }],
"indent": ["warn", "tab", { "MemberExpression": "off" }],
"linebreak-style": "off",
"no-trailing-spaces": "warn",
"no-whitespace-before-property": "warn",
"object-curly-spacing": ["warn", "always"],
"space-in-parens": ["warn", "never"],
"template-curly-spacing": ["warn", "never"],
"keyword-spacing": ["warn", {
"before": true,
"after": true,
"overrides": {
"if": { "before": false, "after": false }
}
}],
"key-spacing": ["warn", {
"multiLine": { "beforeColon": true, "afterColon": true, "align": "colon" },
"singleLine": { "beforeColon": false, "afterColon": true }
}]
}
}