forked from spencers145/SharkGame
-
Notifications
You must be signed in to change notification settings - Fork 16
/
eslint.config.mjs
63 lines (61 loc) · 2.26 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
import neostandard from "neostandard";
import jsPlugin from "@eslint/js";
export default [
jsPlugin.configs.recommended,
neostandard.plugins.promise.configs["flat/recommended"],
...neostandard({
semi: true,
ignores: ["js/lib/**/*", ".pnp*"],
env: ["browser", "commonjs", "worker", "jquery", "es2021"],
globals: {
/* eslint-disable id-length */
_: "readonly",
ascii85: "readonly",
pako: "readonly",
SharkGame: "readonly",
Decimal: "readonly",
DecimalHalfRound: "readonly",
panzoom: "readonly",
res: "readonly",
main: "readonly",
rec: "readonly",
gateway: "readonly",
stats: "readonly",
world: "readonly",
home: "readonly",
tree: "readonly",
log: "readonly",
mem: "readonly",
sharktext: "readonly",
sharkmath: "readonly",
sharkcolor: "readonly",
sharkmisc: "readonly",
sharktime: "readonly",
cad: "readonly",
},
}),
{
rules: {
"no-unused-vars": [
"error",
{
varsIgnorePattern: "^__.+$",
argsIgnorePattern: "^_.+$",
args: "all",
},
],
"func-style": ["error", "declaration"],
"no-inner-declarations": "off",
"prefer-const": "error",
"no-var": "error",
"no-shadow": ["error", { builtinGlobals: true, hoist: "all", allow: ["name", "event"] }],
eqeqeq: ["error", "smart"],
"id-length": ["error", { min: 3, exceptionPatterns: ["i", "id", "to", "dt", "P", "A", "L", "R", "x", "y", "w", "h"] }],
"no-fallthrough": ["error", { commentPattern: "fallthrough", reportUnusedFallthroughComment: true }],
"@stylistic/indent": ["error", 4],
"@stylistic/quotes": ["error", "double", { avoidEscape: true }],
"@stylistic/comma-dangle": ["error", "always-multiline"],
"@stylistic/space-before-function-paren": ["error", { anonymous: "always", named: "never", asyncArrow: "always" }],
},
},
];