-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
63 lines (62 loc) · 1.84 KB
/
eslint.config.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
63
// eslint.config.js
import js from "@eslint/js";
import globals from "globals";
export default [
js.configs.recommended,
{
// Ignore configuration
ignores: [
".dev-server/**/*",
".dev-server/**/*.js",
".dev-server/**/*.json"
]
},
{
// Main configuration
files: ["**/*.js"],
languageOptions: {
ecmaVersion: 2020,
sourceType: "module",
globals: {
...globals.es2020,
...globals.node,
...globals.mocha,
navigator: "readonly",
window: "readonly",
__REACT_DEVTOOLS_GLOBAL_HOOK__: "readonly"
}
},
rules: {
"indent": ["error", 4, { "SwitchCase": 1 }],
"no-console": "off",
"no-unused-vars": ["error", {
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"quotes": ["error", "double", {
"avoidEscape": true,
"allowTemplateLiterals": true
}],
"semi": ["error", "always"],
"no-undef": "error",
"no-prototype-builtins": "off",
"no-constant-condition": ["error", {
"checkLoops": false
}],
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"no-cond-assign": ["error", "except-parens"],
"no-func-assign": "error",
"no-useless-escape": "error",
"no-fallthrough": "error"
},
linterOptions: {
reportUnusedDisableDirectives: true
}
}
];