-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
61 lines (60 loc) · 2.2 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
import globals from "globals";
import pluginJs from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
export default [
{
ignores: ["_docs", "_types", "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,
canvas: "readonly",
CONFIG: "readonly",
CONST: "readonly",
DetectionMode: "readonly",
foundry: "readonly",
game: "readonly",
Hooks: "readonly",
libWrapper: "readonly",
PIXI: "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 }],
},
},
];