forked from guansss/pixi-live2d-display
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.cjs
59 lines (53 loc) · 1.68 KB
/
.eslintrc.cjs
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
module.exports = {
// addition to .eslintignore
ignorePatterns: ["/cubism"],
env: {
browser: true,
es2020: true,
node: true,
mocha: true,
},
extends: [
"eslint:recommended",
// enable this later
// "plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
root: true,
parserOptions: {
project: true,
},
rules: {
"@typescript-eslint/consistent-type-imports": ["warn", { disallowTypeAnnotations: false }],
// "warn" is for better DX in IDEs, and will be changed to "error" when running "npm run lint"
"prettier/prettier": "warn",
// IDEs already warn about unused vars
"@typescript-eslint/no-unused-vars": "off",
// makes code too verbose
"@typescript-eslint/unbound-method": "off",
// what's the point?
"@typescript-eslint/require-await": "off",
// maybe enable these later
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-explicit-any": "off",
},
overrides: [
{
files: ["*.js", "*.cjs"],
extends: ["plugin:@typescript-eslint/disable-type-checked"],
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
{
files: ["test/**/*"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
},
},
],
};