-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
48 lines (45 loc) · 1.19 KB
/
eslint.config.mjs
File metadata and controls
48 lines (45 loc) · 1.19 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
import globals from "globals";
import { defineConfig } from "eslint/config";
const rules = {
indent: ["off", 4],
"linebreak-style": ["off", "unix"],
quotes: ["off", "single"],
semi: ["error", "always"],
eqeqeq: ["error", "always"],
"no-irregular-whitespace": ["off"],
"no-self-assign": ["off"],
"no-empty": ["off"],
"no-useless-escape": ["off"],
"no-extra-boolean-cast": ["off"],
"no-prototype-builtins": ["error"],
"no-use-before-define": ["error"],
"no-undef": ["error"],
"no-unused-vars": [
"error",
{
caughtErrors: "none"
}
]
};
export default defineConfig([{
files: ["**/*.{js,mjs,cjs}"],
ignores: [
"scripts/**", "build/**",
"plugins/*/client/**", "common/common-util.js",
"common/keys.js"
],
languageOptions: { globals: globals.node },
rules
}, {
files: ["plugins/*/client/**.{js,mjs,cjs}"],
languageOptions: {
globals: { ...globals.browser, ...globals.amd }
},
rules
}, {
files: ["common/common-util.js", "common/keys.js"],
languageOptions: {
globals: { ...globals.node, ...globals.browser, ...globals.amd }
},
rules
}]);