forked from DestinyItemManager/DIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
194 lines (194 loc) · 6.64 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es6": true,
"serviceworker": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:array-func/all",
"plugin:css-modules/recommended",
"plugin:radar/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"$featureFlags": "readonly",
"ga": true,
"$DIM_FLAVOR": "readonly",
"$DIM_VERSION": "readonly",
"$DIM_BUILD_DATE": "readonly",
"$DIM_WEB_API_KEY": "readonly",
"$DIM_WEB_CLIENT_ID": "readonly",
"$DIM_WEB_CLIENT_SECRET": "readonly",
"$DIM_API_KEY": "readonly",
"$BROWSERS": "readonly",
"workbox": true,
"React": true,
"require": true,
"module": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"settings": {
"react": {
"version": "detect"
}
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"lodash",
"jsx-a11y",
"array-func",
"react-redux",
"css-modules",
"radar"
],
"rules": {
"no-console": "error",
"no-debugger": "error",
"no-empty": "off",
"no-implicit-coercion": "error",
"no-restricted-properties": [
1,
{
"object": "_",
"property": "forEach",
"message": "Please use a for in loop."
},
{
"object": "_",
"property": "filter",
"message": "Please use the native js filter."
}
],
"arrow-body-style": ["error", "as-needed"],
"curly": ["error", "all"],
"eqeqeq": ["error", "always"],
"no-return-await": "off",
"@typescript-eslint/return-await": ["error", "in-try-catch"],
"prefer-regex-literals": "error",
"prefer-promise-reject-errors": "error",
"require-atomic-updates": "off",
"class-methods-use-this": ["error", { "exceptMethods": ["render"] }],
"react/no-unescaped-entities": "off",
"react/jsx-no-target-blank": "off",
"react/display-name": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prefer-stateless-function": "warn",
"react/no-access-state-in-setstate": "error",
"react/no-this-in-sfc": "error",
"react/no-unused-state": "error",
"react/button-has-type": "error",
"react/prop-types": "off",
"react/function-component-definition": "error",
"react/no-redundant-should-component-update": "error",
"react/no-unsafe": "error",
"react/jsx-no-constructed-context-values": "error",
"react/jsx-pascal-case": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/autocomplete-valid": "error",
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/no-noninteractive-element-interactions": "error",
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
"jsx-a11y/no-noninteractive-tabindex": "error",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/role-has-required-aria-props": "error",
"jsx-a11y/role-supports-aria-props": "error",
"lodash/collection-method-value": "error",
"lodash/collection-return": "error",
"lodash/no-extra-args": "error",
"lodash/chaining": ["error", "never"],
"lodash/identity-shorthand": ["error", "never"],
"lodash/matches-shorthand": ["error", "never"],
"lodash/matches-prop-shorthand": ["error", "never"],
"lodash/prop-shorthand": ["error", "never"],
"lodash/prefer-compact": "error",
"lodash/prefer-filter": "error",
"lodash/prefer-find": "error",
"lodash/prefer-flat-map": "error",
"lodash/prefer-immutable-method": "error",
"lodash/prefer-map": "error",
"lodash/prefer-reject": "error",
"lodash/prefer-times": "error",
"lodash/preferred-alias": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"BigInt": "BigInt isn't supported in old versions (pre-14) of Safari",
"bigint": "BigInt isn't supported in old versions (pre-14) of Safari"
},
"extendDefaults": false
}
],
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_.",
"argsIgnorePattern": "^_.",
"ignoreRestSiblings": true
}
],
"array-func/prefer-array-from": "off",
"react-redux/mapStateToProps-prefer-hoisted": "error",
"react-redux/no-unused-prop-types": "error",
"react/no-unused-prop-types": "off",
"css-modules/no-undef-class": "off",
"radar/cognitive-complexity": "off",
"radar/no-small-switch": "off",
"radar/no-duplicate-string": "off",
"radar/prefer-immediate-return": "off"
}
}