eslint-config-airbnb-extended 1.0.0 → 1.0.1
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.
|
@@ -10,14 +10,17 @@ const getStylisticLegacyConfig = (language) => {
|
|
|
10
10
|
const REACT = 'react/';
|
|
11
11
|
const TYPESCRIPT = '@typescript-eslint/';
|
|
12
12
|
const rules = Object.entries((_a = legacyConfig.rules) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
13
|
-
if (language === 'javascript'
|
|
14
|
-
|
|
13
|
+
if (language === 'javascript') {
|
|
14
|
+
const condition = !key.startsWith(REACT) && !key.startsWith(TYPESCRIPT);
|
|
15
|
+
return Object.assign(Object.assign({}, acc), (condition ? { [key]: value } : null));
|
|
15
16
|
}
|
|
16
|
-
if (language === 'typescript'
|
|
17
|
-
|
|
17
|
+
if (language === 'typescript') {
|
|
18
|
+
const condition = key.startsWith(TYPESCRIPT);
|
|
19
|
+
return Object.assign(Object.assign({}, acc), (condition ? { [key]: value } : null));
|
|
18
20
|
}
|
|
19
|
-
if (language === 'react'
|
|
20
|
-
|
|
21
|
+
if (language === 'react') {
|
|
22
|
+
const condition = key.startsWith(REACT);
|
|
23
|
+
return Object.assign(Object.assign({}, acc), (condition ? { [key]: value } : null));
|
|
21
24
|
}
|
|
22
25
|
return null;
|
|
23
26
|
}, {});
|
|
@@ -120,7 +120,7 @@ const typescriptEslintStrictRules = {
|
|
|
120
120
|
{
|
|
121
121
|
checksConditionals: true,
|
|
122
122
|
checksSpreads: true,
|
|
123
|
-
checksVoidReturn:
|
|
123
|
+
checksVoidReturn: false,
|
|
124
124
|
},
|
|
125
125
|
],
|
|
126
126
|
// Disallow using the spread operator when it might cause unexpected behavior.
|
|
@@ -146,9 +146,6 @@ const typescriptEslintStrictRules = {
|
|
|
146
146
|
// Disallow unnecessary equality comparisons against boolean literals.
|
|
147
147
|
// https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
|
|
148
148
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
|
149
|
-
// Disallow calling a value with type any.
|
|
150
|
-
// https://typescript-eslint.io/rules/no-unsafe-call
|
|
151
|
-
'@typescript-eslint/no-unsafe-call': 'error',
|
|
152
149
|
// Disallow returning a value with type any from a function.
|
|
153
150
|
// https://typescript-eslint.io/rules/no-unsafe-return
|
|
154
151
|
'@typescript-eslint/no-unsafe-return': 'error',
|