-
Notifications
You must be signed in to change notification settings - Fork 149
/
eslint.config.mjs
61 lines (59 loc) · 1.46 KB
/
eslint.config.mjs
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
import eslintPluginImport from "eslint-plugin-import";
import eslintPluginJs from "@eslint/js";
import globals from "globals";
const config = [
eslintPluginImport.flatConfigs.recommended,
eslintPluginJs.configs.recommended,
{
"ignores": ["**/*.min.js"]
},
{
"files": ["**/*.js"],
"languageOptions": {
"globals": {
...globals.browser,
...globals.node
},
"sourceType": "commonjs"
},
"rules": {
"capitalized-comments": "off",
"consistent-this": "off",
"line-comment-position": "off",
"max-lines-per-function": ["warn", 200],
"max-statements": ["warn", 60],
"multiline-comment-style": "off",
"no-await-in-loop": "off",
"no-constant-binary-expression": "warn",
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-plusplus": "off",
"no-prototype-builtins": "warn",
"no-undef": "warn",
"no-unused-vars": "warn",
"no-useless-escape": "warn",
"no-var": "warn",
"one-var": "off",
"sort-keys": "off",
"strict": "off"
}
},
{
"files": ["**/*.mjs"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.node
},
"sourceType": "module"
},
"rules": {
"func-style": "off",
"max-lines-per-function": ["error", 100],
"no-magic-numbers": "off",
"one-var": "off",
"prefer-destructuring": "off"
}
}
];
export default config;