@will-stone/eslint-config 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/built-in.js +1 -1
- package/rules/react.js +4 -1
- package/rules/typescript.js +4 -8
package/package.json
CHANGED
package/rules/built-in.js
CHANGED
|
@@ -629,7 +629,7 @@ module.exports = {
|
|
|
629
629
|
'no-useless-escape': 'error',
|
|
630
630
|
|
|
631
631
|
// Disallow renaming import, export, and destructured assignments to the same name.
|
|
632
|
-
'no-useless-rename': '
|
|
632
|
+
'no-useless-rename': 'warn',
|
|
633
633
|
|
|
634
634
|
// Require let or const instead of var.
|
|
635
635
|
'no-var': 'warn',
|
package/rules/react.js
CHANGED
|
@@ -23,7 +23,10 @@ module.exports = {
|
|
|
23
23
|
'jsx-a11y/lang': 'error',
|
|
24
24
|
|
|
25
25
|
// Only allow JSX in these file types:
|
|
26
|
-
'react/jsx-filename-extension': [
|
|
26
|
+
'react/jsx-filename-extension': [
|
|
27
|
+
'error',
|
|
28
|
+
{ extensions: ['.jsx', '.tsx', '.mdx'] },
|
|
29
|
+
],
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* React
|
package/rules/typescript.js
CHANGED
|
@@ -187,7 +187,8 @@ module.exports = {
|
|
|
187
187
|
// Disallow duplicate class members
|
|
188
188
|
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
// Deleting missing key/value is safe
|
|
191
|
+
'@typescript-eslint/no-dynamic-delete': 'off',
|
|
191
192
|
|
|
192
193
|
// ❌ const bar = foo!!!.bar
|
|
193
194
|
// ✅ const bar = foo!.bar
|
|
@@ -234,13 +235,8 @@ module.exports = {
|
|
|
234
235
|
'no-shadow': 'off',
|
|
235
236
|
'@typescript-eslint/no-shadow': ['error'],
|
|
236
237
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
{
|
|
240
|
-
allowGenerics: 'always',
|
|
241
|
-
allowMappedTypes: 'always',
|
|
242
|
-
},
|
|
243
|
-
],
|
|
238
|
+
// Aliasing can be useful
|
|
239
|
+
'@typescript-eslint/no-type-alias': 'off',
|
|
244
240
|
|
|
245
241
|
// Disallows unnecessary constraints on generic types
|
|
246
242
|
'@typescript-eslint/no-unnecessary-type-constraint': 'warn',
|