-
Notifications
You must be signed in to change notification settings - Fork 13
/
eslint.config.mjs
74 lines (73 loc) · 2.72 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
65
66
67
68
69
70
71
72
73
74
import globals from "globals";
import pluginJs from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
export default [
{
ignores: ["script.js"],
},
pluginJs.configs.recommended,
stylistic.configs.customize({
indent: 4,
quotes: "double",
semi: true,
jsx: false,
arrowParens: "always",
braceStyle: "1tbs",
blockSpacing: true,
quoteProps: "consistent-as-needed",
commaDangle: "always-multiline",
}),
{
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
AbstractBaseFilter: "readonly",
BaseSamplerShader: "readonly",
canvas: "readonly",
ClipperLib: "readonly",
CONFIG: "readonly",
CONST: "readonly",
Color: "readonly",
ColorAdjustmentsSamplerShader: "readonly",
DetectionMode: "readonly",
dnd5e: "readonly",
foundry: "readonly",
game: "readonly",
GlowOverlayFilter: "readonly",
Hooks: "readonly",
loadTexture: "readonly",
OutlineOverlayFilter: "readonly",
PIXI: "readonly",
PointSourcePolygon: "readonly",
Roll: "readonly",
SpriteMesh: "readonly",
Token: "readonly",
VisionMode: "readonly",
},
},
rules: {
"no-unused-vars": ["error", {
vars: "all",
args: "none",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
ignoreRestSiblings: false,
reportUsedIgnorePattern: false,
}],
"@stylistic/padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "*", next: ["block-like", "break", "class", "continue", "function", "return"] },
{ blankLine: "always", prev: ["block-like", "class", "function"], next: "*" },
{ blankLine: "always", prev: "expression", next: ["const", "let", "var"] },
{ blankLine: "always", prev: ["const", "let", "var"], next: "expression" },
{ blankLine: "never", prev: ["break", "continue", "return"], next: "*" },
{ blankLine: "never", prev: "*", next: "case" },
],
"@stylistic/no-mixed-operators": "off",
"@stylistic/no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
},
},
];