forked from zengm-games/zengm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
103 lines (103 loc) · 2.63 KB
/
.eslintrc
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"extraFileExtensions": [".mjs"]
},
"env": {
"browser": true,
"es2020": true
},
"plugins": [
"@typescript-eslint",
"react-hooks"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended",
"prettier"
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".mjs", ".js", ".json", ".ts", ".tsx"]
}
},
"import/extensions": [
".js",
".mjs",
".jsx",
".ts",
".tsx"
],
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
// Nice for catching if(0){} but too many false positives for object checks that can't be disabled
/*"@typescript-eslint/strict-boolean-expressions": ["error", {
"allowString": true,
"allowNumber": false,
"allowNullableObject": true,
"allowNullableBoolean": true,
"allowNullableString": true,
"allowNullableNumber": false,
"allowAny": true
}],*/
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/no-onchange": "off",
"jsx-a11y/no-static-element-interactions": "off",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-empty": "off",
"no-prototype-builtins": "off",
"prefer-const": ["error", {
"destructuring": "all"
}],
"react/display-name": "off",
"react/jsx-key": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
},
"overrides": [{
"files": "**/*.test.{js,ts}",
"env": {
"jest": true
}
}, {
"files": ["*.js", "tools/**/*.{js,ts}"],
"env": {
"node": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}, {
"files": "src/test/*.{js,ts}",
"env": {
"jest": true,
"mocha": true
}
}],
"globals": {
"process": false
}
}