-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.mjs
56 lines (54 loc) · 1.06 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
import globals from "globals"
const rules = {
"require-await": "warn",
"comma-style": [1, "last"],
curly: [1, "multi-line"],
"eol-last": [1, "always"],
eqeqeq: [1, "allow-null"],
"func-call-spacing": 1,
"no-unused-vars": 1,
indent: ["warn", "tab"],
"no-cond-assign": [1, "always"],
"no-return-assign": [1, "always"],
"no-shadow": ["error", {
builtinGlobals: false,
hoist: "functions",
allow: [],
ignoreOnInitialization: true,
}],
"no-var": 1,
"object-curly-spacing": [1, "always"],
"one-var": [1, "never"],
"prefer-const": 2,
quotes: [1, "double", {
allowTemplateLiterals: true,
avoidEscape: true,
}],
"semi-style": ["error", "first"],
semi: [1, "never"],
}
export default [
{
ignores: ["dist/*"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser
}
},
rules
},
{
files: ["**/*.test.js", "test/**/*.js", "rollup.userscript.config.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
...globals.node
}
},
rules
}
]