-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy patheslint.config.mjs
40 lines (39 loc) · 970 Bytes
/
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
import globals from "globals";
export default [
{
files: ["**/*.js"],
ignores: ["**/.eslintrc.js", "admin/words.js", "lib/map/zones.js"],
languageOptions: {
ecmaVersion: 2020,
sourceType: "module",
globals: {
...globals.node,
...globals.mocha,
},
},
rules: {
indent: ["error", "tab", { SwitchCase: 1 }],
"no-console": "off",
"no-unused-vars": ["error", { ignoreRestSiblings: true, argsIgnorePattern: "^_" }],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
semi: ["error", "always"],
},
},
{
files: ["lib/map/zones.js"],
languageOptions: {
ecmaVersion: 2020,
sourceType: "script",
globals: {
...globals.browser,
...Object.fromEntries(Object.entries(globals.node).map(([key]) => [key, false])),
},
},
rules: {
// Specific rules for zones.js can be defined here
},
},
];