forked from fewieden/MMM-NHL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
64 lines (62 loc) · 1.92 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
62
63
64
import eslintPluginJs from "@eslint/js";
import eslintPluginStylistic from "@stylistic/eslint-plugin";
import globals from "globals";
const config = [
eslintPluginJs.configs.all,
{
"ignores": ["docs/*"]
},
{
"files": ["**/*.js"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.browser,
...globals.node
},
"sourceType": "commonjs"
},
"plugins": {
...eslintPluginStylistic.configs["recommended-flat"].plugins
},
"rules": {
...eslintPluginStylistic.configs["recommended-flat"].rules,
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/comma-dangle": ["error", "always-multiline"],
"@stylistic/indent": ["error", 4],
"@stylistic/quote-props": "off",
"@stylistic/semi": ["error", "always"],
"camelcase": "off",
"consistent-return": "off",
"id-length": "off",
"max-lines": ["warn", 600],
"max-statements": ["error", 25],
"no-magic-numbers": "off",
"no-shadow": "off",
"no-ternary": "off",
"no-warning-comments": "off",
"one-var": "off",
"sort-keys": "off",
"strict": "off"
}
},
{
"files": ["**/*.mjs"],
"languageOptions": {
"ecmaVersion": "latest",
"globals": {
...globals.node
},
"sourceType": "module"
},
"plugins": {
...eslintPluginStylistic.configs["all-flat"].plugins
},
"rules": {
...eslintPluginStylistic.configs["all-flat"].rules,
"@stylistic/array-element-newline": ["error", "consistent"],
"no-magic-numbers": "off"
}
}
];
export default config;