eslint-config-airbnb-extended 0.9.3 → 0.10.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/dist/@types/index.d.ts +8 -7
- package/dist/configs/base/config.js +2 -0
- package/dist/configs/base/configExtended.js +1 -2
- package/dist/configs/base/recommended.js +2 -0
- package/dist/configs/base/typescript.js +2 -0
- package/dist/configs/react/config.js +8 -6
- package/dist/configs/react/configExtended.js +9 -0
- package/dist/configs/react/recommended.js +15 -5
- package/dist/configs/typescript/config.js +4 -0
- package/dist/helpers/getStylisticLegacyConfig.js +26 -0
- package/dist/index.js +1 -1
- package/dist/plugins/index.js +3 -0
- package/dist/plugins/stylisticPlugin.js +13 -0
- package/dist/rules/index.js +1 -1
- package/dist/rules/{react.js → react/react.js} +4 -4
- package/dist/rules/react/reactStylistic.js +93 -0
- package/dist/rules/style.js +1 -1
- package/dist/rules/stylistic.js +232 -237
- package/dist/rules/stylisticPlus.js +14 -0
- package/dist/rules/typescript/typescriptBase.js +4 -1
- package/dist/rules/typescript/typescriptEslint.js +0 -61
- package/dist/rules/typescript/typescriptStylistic.js +147 -0
- package/dist/rules/typescript/typescriptStylisticPlus.js +14 -0
- package/package.json +10 -5
- /package/dist/rules/{react-hooks.js → react/reactHooks.js} +0 -0
- /package/dist/rules/{react-jsx-a11y.js → react/reactJsxA11y.js} +0 -0
- /package/dist/rules/{reactStrict.js → react/reactStrict.js} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const stylisticPlusRules = {
|
|
4
|
+
name: 'airbnb/config/stylistic-plus',
|
|
5
|
+
rules: {
|
|
6
|
+
// A number of style guides require or disallow line breaks inside of block statements and block-like code.
|
|
7
|
+
// https://eslint.style/rules/plus/curly-newline
|
|
8
|
+
'@stylistic/curly-newline': 'off',
|
|
9
|
+
// Indentation for binary operators in multiline expressions
|
|
10
|
+
// https://eslint.style/rules/plus/indent-binary-ops
|
|
11
|
+
'@stylistic/indent-binary-ops': 'off',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
exports.default = stylisticPlusRules;
|
|
@@ -5,16 +5,19 @@ const typescriptBaseRules = {
|
|
|
5
5
|
rules: {
|
|
6
6
|
// The following rules are enabled in Airbnb config, but are already checked (more thoroughly) by the TypeScript compiler
|
|
7
7
|
// Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended-raw.ts
|
|
8
|
+
// no-var, prefer-const, prefer-rest-params and prefer-spread is already declared in previous configs
|
|
8
9
|
'constructor-super': 'off', // ts(2335) & ts(2377)
|
|
9
10
|
'getter-return': 'off', // ts(2378)
|
|
10
11
|
'no-class-assign': 'off', // ts(2629)
|
|
11
12
|
'no-const-assign': 'off', // ts(2588)
|
|
12
13
|
'no-dupe-args': 'off', // ts(2300)
|
|
14
|
+
'no-dupe-class-members': 'off', // ts(2393) & ts(2300)
|
|
13
15
|
'no-dupe-keys': 'off', // ts(1117)
|
|
14
16
|
'no-func-assign': 'off', // ts(2630)
|
|
15
17
|
'no-import-assign': 'off', // ts(2632) & ts(2540)
|
|
16
|
-
'no-new-
|
|
18
|
+
'no-new-symbol': 'off', // ts(7009)
|
|
17
19
|
'no-obj-calls': 'off', // ts(2349)
|
|
20
|
+
'no-redeclare': 'off', // ts(2451)
|
|
18
21
|
'no-setter-return': 'off', // ts(2408)
|
|
19
22
|
'no-this-before-super': 'off', // ts(2376) & ts(17009)
|
|
20
23
|
'no-undef': 'off', // ts(2304) & ts(2552)
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const best_practices_1 = __importDefault(require("../../rules/best-practices"));
|
|
7
7
|
const es6_1 = __importDefault(require("../../rules/es6"));
|
|
8
8
|
const style_1 = __importDefault(require("../../rules/style"));
|
|
9
|
-
const stylistic_1 = __importDefault(require("../../rules/stylistic"));
|
|
10
9
|
const variables_1 = __importDefault(require("../../rules/variables"));
|
|
11
10
|
const typescriptEslintRules = {
|
|
12
11
|
name: 'airbnb/config/typescript/typescript-eslint',
|
|
@@ -16,10 +15,6 @@ const typescriptEslintRules = {
|
|
|
16
15
|
},
|
|
17
16
|
},
|
|
18
17
|
rules: {
|
|
19
|
-
// Replace Airbnb 'brace-style' rule with '@typescript-eslint' version
|
|
20
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md
|
|
21
|
-
'brace-style': 'off',
|
|
22
|
-
'@typescript-eslint/brace-style': stylistic_1.default.rules['brace-style'],
|
|
23
18
|
// Replace Airbnb 'camelcase' rule with '@typescript-eslint/naming-convention'
|
|
24
19
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
25
20
|
camelcase: 'off',
|
|
@@ -42,18 +37,6 @@ const typescriptEslintRules = {
|
|
|
42
37
|
format: ['PascalCase'],
|
|
43
38
|
},
|
|
44
39
|
],
|
|
45
|
-
// Replace Airbnb 'comma-dangle' rule with '@typescript-eslint' version
|
|
46
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md
|
|
47
|
-
// The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config
|
|
48
|
-
'comma-dangle': 'off',
|
|
49
|
-
'@typescript-eslint/comma-dangle': [
|
|
50
|
-
stylistic_1.default.rules['comma-dangle'][0],
|
|
51
|
-
Object.assign(Object.assign({}, stylistic_1.default.rules['comma-dangle'][1]), { enums: stylistic_1.default.rules['comma-dangle'][1].arrays, generics: stylistic_1.default.rules['comma-dangle'][1].arrays, tuples: stylistic_1.default.rules['comma-dangle'][1].arrays }),
|
|
52
|
-
],
|
|
53
|
-
// Replace Airbnb 'comma-spacing' rule with '@typescript-eslint' version
|
|
54
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md
|
|
55
|
-
'comma-spacing': 'off',
|
|
56
|
-
'@typescript-eslint/comma-spacing': stylistic_1.default.rules['comma-spacing'],
|
|
57
40
|
// Replace Airbnb 'default-param-last' rule with '@typescript-eslint' version
|
|
58
41
|
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/default-param-last.md
|
|
59
42
|
'default-param-last': 'off',
|
|
@@ -62,18 +45,6 @@ const typescriptEslintRules = {
|
|
|
62
45
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md
|
|
63
46
|
'dot-notation': 'off',
|
|
64
47
|
'@typescript-eslint/dot-notation': best_practices_1.default.rules['dot-notation'],
|
|
65
|
-
// Replace Airbnb 'func-call-spacing' rule with '@typescript-eslint' version
|
|
66
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md
|
|
67
|
-
'func-call-spacing': 'off',
|
|
68
|
-
'@typescript-eslint/func-call-spacing': stylistic_1.default.rules['func-call-spacing'],
|
|
69
|
-
// Replace Airbnb 'indent' rule with '@typescript-eslint' version
|
|
70
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md
|
|
71
|
-
indent: 'off',
|
|
72
|
-
'@typescript-eslint/indent': stylistic_1.default.rules.indent,
|
|
73
|
-
// Replace Airbnb 'keyword-spacing' rule with '@typescript-eslint' version
|
|
74
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md
|
|
75
|
-
'keyword-spacing': 'off',
|
|
76
|
-
'@typescript-eslint/keyword-spacing': stylistic_1.default.rules['keyword-spacing'],
|
|
77
48
|
// Replace Airbnb 'no-array-constructor' rule with '@typescript-eslint' version
|
|
78
49
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md
|
|
79
50
|
'no-array-constructor': 'off',
|
|
@@ -86,14 +57,6 @@ const typescriptEslintRules = {
|
|
|
86
57
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
|
|
87
58
|
'no-empty-function': 'off',
|
|
88
59
|
'@typescript-eslint/no-empty-function': best_practices_1.default.rules['no-empty-function'],
|
|
89
|
-
// Replace Airbnb 'no-extra-parens' rule with '@typescript-eslint' version
|
|
90
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md
|
|
91
|
-
'no-extra-parens': 'off',
|
|
92
|
-
'@typescript-eslint/no-extra-parens': stylistic_1.default.rules['no-extra-parens'],
|
|
93
|
-
// Replace Airbnb 'no-extra-semi' rule with '@typescript-eslint' version
|
|
94
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md
|
|
95
|
-
'no-extra-semi': 'off',
|
|
96
|
-
'@typescript-eslint/no-extra-semi': stylistic_1.default.rules['no-extra-semi'],
|
|
97
60
|
// Replace Airbnb 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version
|
|
98
61
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md
|
|
99
62
|
'no-implied-eval': 'off',
|
|
@@ -115,10 +78,6 @@ const typescriptEslintRules = {
|
|
|
115
78
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
|
116
79
|
'no-shadow': 'off',
|
|
117
80
|
'@typescript-eslint/no-shadow': variables_1.default.rules['no-shadow'],
|
|
118
|
-
// Replace Airbnb 'space-before-blocks' rule with '@typescript-eslint' version
|
|
119
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-blocks.md
|
|
120
|
-
'space-before-blocks': 'off',
|
|
121
|
-
'@typescript-eslint/space-before-blocks': stylistic_1.default.rules['space-before-blocks'],
|
|
122
81
|
// Replace Airbnb 'no-throw-literal' rule with '@typescript-eslint' version
|
|
123
82
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md
|
|
124
83
|
'no-throw-literal': 'off',
|
|
@@ -139,18 +98,6 @@ const typescriptEslintRules = {
|
|
|
139
98
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md
|
|
140
99
|
'no-useless-constructor': 'off',
|
|
141
100
|
'@typescript-eslint/no-useless-constructor': es6_1.default.rules['no-useless-constructor'],
|
|
142
|
-
// Replace Airbnb 'quotes' rule with '@typescript-eslint' version
|
|
143
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
|
|
144
|
-
quotes: 'off',
|
|
145
|
-
'@typescript-eslint/quotes': stylistic_1.default.rules.quotes,
|
|
146
|
-
// Replace Airbnb 'semi' rule with '@typescript-eslint' version
|
|
147
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
|
|
148
|
-
semi: 'off',
|
|
149
|
-
'@typescript-eslint/semi': stylistic_1.default.rules.semi,
|
|
150
|
-
// Replace Airbnb 'space-before-function-paren' rule with '@typescript-eslint' version
|
|
151
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
|
|
152
|
-
'space-before-function-paren': 'off',
|
|
153
|
-
'@typescript-eslint/space-before-function-paren': stylistic_1.default.rules['space-before-function-paren'],
|
|
154
101
|
// Replace Airbnb 'require-await' rule with '@typescript-eslint' version
|
|
155
102
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md
|
|
156
103
|
'require-await': 'off',
|
|
@@ -159,14 +106,6 @@ const typescriptEslintRules = {
|
|
|
159
106
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md
|
|
160
107
|
// Its Base rule is deprecated
|
|
161
108
|
'@typescript-eslint/return-await': ['error', 'in-try-catch'],
|
|
162
|
-
// Replace Airbnb 'space-infix-ops' rule with '@typescript-eslint' version
|
|
163
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md
|
|
164
|
-
'space-infix-ops': 'off',
|
|
165
|
-
'@typescript-eslint/space-infix-ops': stylistic_1.default.rules['space-infix-ops'],
|
|
166
|
-
// Replace Airbnb 'object-curly-spacing' rule with '@typescript-eslint' version
|
|
167
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/object-curly-spacing.md
|
|
168
|
-
'object-curly-spacing': 'off',
|
|
169
|
-
'@typescript-eslint/object-curly-spacing': stylistic_1.default.rules['object-curly-spacing'],
|
|
170
109
|
},
|
|
171
110
|
};
|
|
172
111
|
exports.default = typescriptEslintRules;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.deprecatedTypescriptStylisticRules = void 0;
|
|
37
|
+
const stylistic_1 = __importStar(require("../../rules/stylistic"));
|
|
38
|
+
const typescriptStylisticRules = {
|
|
39
|
+
name: 'airbnb/config/typescript/typescript-stylistic',
|
|
40
|
+
rules: {
|
|
41
|
+
// enforce spacing inside single-line blocks
|
|
42
|
+
// https://eslint.style/rules/ts/block-spacing
|
|
43
|
+
'@stylistic/block-spacing': stylistic_1.default.rules['@stylistic/block-spacing'],
|
|
44
|
+
// enforce one true brace style
|
|
45
|
+
// https://eslint.style/rules/ts/brace-style
|
|
46
|
+
'@stylistic/brace-style': stylistic_1.default.rules['@stylistic/brace-style'],
|
|
47
|
+
// require trailing commas in multiline object literals
|
|
48
|
+
// https://eslint.style/rules/ts/comma-dangle
|
|
49
|
+
'@stylistic/comma-dangle': [
|
|
50
|
+
stylistic_1.default.rules['@stylistic/comma-dangle'][0],
|
|
51
|
+
Object.assign(Object.assign({}, stylistic_1.default.rules['@stylistic/comma-dangle'][1]), { enums: stylistic_1.default.rules['@stylistic/comma-dangle'][1].arrays, generics: stylistic_1.default.rules['@stylistic/comma-dangle'][1].arrays, tuples: stylistic_1.default.rules['@stylistic/comma-dangle'][1].arrays }),
|
|
52
|
+
],
|
|
53
|
+
// enforce spacing before and after comma
|
|
54
|
+
// https://eslint.style/rules/ts/comma-spacing
|
|
55
|
+
'@stylistic/comma-spacing': stylistic_1.default.rules['@stylistic/comma-spacing'],
|
|
56
|
+
// enforce spacing between functions and their invocations
|
|
57
|
+
// https://eslint.style/rules/ts/function-call-spacing
|
|
58
|
+
'@stylistic/function-call-spacing': stylistic_1.default.rules['@stylistic/function-call-spacing'],
|
|
59
|
+
// this option sets a specific tab width for your code
|
|
60
|
+
// https://eslint.style/rules/ts/indent
|
|
61
|
+
'@stylistic/indent': stylistic_1.default.rules['@stylistic/indent'],
|
|
62
|
+
// enforces spacing between keys and values in object literal properties
|
|
63
|
+
// https://eslint.style/rules/ts/key-spacing
|
|
64
|
+
'@stylistic/key-spacing': stylistic_1.default.rules['@stylistic/key-spacing'],
|
|
65
|
+
// require a space before & after certain keywords
|
|
66
|
+
// https://eslint.style/rules/ts/keyword-spacing
|
|
67
|
+
'@stylistic/keyword-spacing': stylistic_1.default.rules['@stylistic/keyword-spacing'],
|
|
68
|
+
// enforces empty lines around comments
|
|
69
|
+
// https://eslint.style/rules/ts/lines-around-comment
|
|
70
|
+
'@stylistic/lines-around-comment': stylistic_1.default.rules['@stylistic/lines-around-comment'],
|
|
71
|
+
// require or disallow an empty line between class members
|
|
72
|
+
// https://eslint.style/rules/ts/lines-between-class-members
|
|
73
|
+
'@stylistic/lines-between-class-members': stylistic_1.default.rules['@stylistic/lines-between-class-members'],
|
|
74
|
+
// enforce consistent member delimiter style
|
|
75
|
+
// https://eslint.style/rules/ts/member-delimiter-style
|
|
76
|
+
'@stylistic/member-delimiter-style': 'error',
|
|
77
|
+
// disallow unnecessary parentheses
|
|
78
|
+
// https://eslint.style/rules/ts/no-extra-parens
|
|
79
|
+
'@stylistic/no-extra-parens': stylistic_1.default.rules['@stylistic/no-extra-parens'],
|
|
80
|
+
// disallow unnecessary semicolons
|
|
81
|
+
// https://eslint.style/rules/ts/no-extra-semi
|
|
82
|
+
'@stylistic/no-extra-semi': stylistic_1.default.rules['@stylistic/no-extra-semi'],
|
|
83
|
+
// enforce line breaks between braces
|
|
84
|
+
// https://eslint.style/rules/ts/object-curly-newline
|
|
85
|
+
'@stylistic/object-curly-newline': stylistic_1.default.rules['@stylistic/object-curly-newline'],
|
|
86
|
+
// require padding inside curly braces
|
|
87
|
+
// https://eslint.style/rules/ts/object-curly-spacing
|
|
88
|
+
'@stylistic/object-curly-spacing': stylistic_1.default.rules['@stylistic/object-curly-spacing'],
|
|
89
|
+
// enforce "same line" or "multiple line" on object properties.
|
|
90
|
+
// https://eslint.style/rules/ts/object-property-newline
|
|
91
|
+
'@stylistic/object-property-newline': stylistic_1.default.rules['@stylistic/object-property-newline'],
|
|
92
|
+
// Require or disallow padding lines between statements
|
|
93
|
+
// https://eslint.style/rules/ts/padding-line-between-statements
|
|
94
|
+
'@stylistic/padding-line-between-statements': stylistic_1.default.rules['@stylistic/padding-line-between-statements'],
|
|
95
|
+
// require quotes around object literal property names
|
|
96
|
+
// https://eslint.style/rules/ts/quote-props
|
|
97
|
+
'@stylistic/quote-props': stylistic_1.default.rules['@stylistic/quote-props'],
|
|
98
|
+
// specify whether double or single quotes should be used
|
|
99
|
+
// https://eslint.style/rules/ts/quotes
|
|
100
|
+
'@stylistic/quotes': stylistic_1.default.rules['@stylistic/quotes'],
|
|
101
|
+
// require or disallow use of semicolons instead of ASI
|
|
102
|
+
// https://eslint.style/rules/ts/semi
|
|
103
|
+
'@stylistic/semi': stylistic_1.default.rules['@stylistic/semi'],
|
|
104
|
+
// enforce spacing before and after semicolons
|
|
105
|
+
// https://eslint.style/rules/ts/semi-spacing
|
|
106
|
+
'@stylistic/semi-spacing': stylistic_1.default.rules['@stylistic/semi-spacing'],
|
|
107
|
+
// require or disallow space before blocks
|
|
108
|
+
// https://eslint.style/rules/ts/space-before-blocks
|
|
109
|
+
'@stylistic/space-before-blocks': stylistic_1.default.rules['@stylistic/space-before-blocks'],
|
|
110
|
+
// require or disallow space before function opening parenthesis
|
|
111
|
+
// https://eslint.style/rules/ts/space-before-function-paren
|
|
112
|
+
'@stylistic/space-before-function-paren': stylistic_1.default.rules['@stylistic/space-before-function-paren'],
|
|
113
|
+
// require spaces around operators
|
|
114
|
+
// https://eslint.style/rules/ts/space-infix-ops
|
|
115
|
+
'@stylistic/space-infix-ops': [
|
|
116
|
+
stylistic_1.default.rules['@stylistic/space-infix-ops'][0],
|
|
117
|
+
Object.assign(Object.assign({}, stylistic_1.default.rules['@stylistic/space-infix-ops'][1]), { ignoreTypes: false }),
|
|
118
|
+
],
|
|
119
|
+
// enforce consistent spacing in type annotation
|
|
120
|
+
// https://eslint.style/rules/ts/type-annotation-spacing
|
|
121
|
+
'@stylistic/type-annotation-spacing': [
|
|
122
|
+
'error',
|
|
123
|
+
{
|
|
124
|
+
before: false,
|
|
125
|
+
after: true,
|
|
126
|
+
overrides: {
|
|
127
|
+
arrow: {
|
|
128
|
+
before: true,
|
|
129
|
+
after: true,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
// enforce consistent spacing inside TypeScript type generics
|
|
135
|
+
// https://eslint.style/rules/plus/type-generic-spacing
|
|
136
|
+
'@stylistic/type-generic-spacing': 'error',
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
exports.deprecatedTypescriptStylisticRules = {
|
|
140
|
+
name: 'airbnb/config/typescript/typescript-stylistic/deprecated',
|
|
141
|
+
rules: {
|
|
142
|
+
// enforce spacing between functions and their invocations
|
|
143
|
+
// https://eslint.style/rules/ts/function-call-spacing
|
|
144
|
+
'@stylistic/func-call-spacing': stylistic_1.deprecatedStylisticRules.rules['@stylistic/func-call-spacing'],
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
exports.default = typescriptStylisticRules;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const typescriptStylisticPlusRules = {
|
|
4
|
+
name: 'airbnb/config/typescript/typescript-stylistic-plus',
|
|
5
|
+
rules: {
|
|
6
|
+
// enforce consistent spacing inside TypeScript type generics
|
|
7
|
+
// https://eslint.style/rules/plus/type-generic-spacing
|
|
8
|
+
'@stylistic/type-generic-spacing': 'error',
|
|
9
|
+
// Expect space before the type declaration in the named tuple.
|
|
10
|
+
// https://eslint.style/rules/plus/type-named-tuple-spacing
|
|
11
|
+
'@stylistic/type-named-tuple-spacing': 'off',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
exports.default = typescriptStylisticPlusRules;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-airbnb-extended",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Eslint Airbnb Config Extended",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"globals": "^16.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@stylistic/eslint-plugin": "^3.1.0",
|
|
38
39
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
39
40
|
"@types/node": "^22.14.1",
|
|
40
41
|
"ts-node": "^10.9.2",
|
|
@@ -44,13 +45,14 @@
|
|
|
44
45
|
"typescript-eslint": "^8.30.1"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"@next/eslint-plugin-next": "
|
|
48
|
-
"@
|
|
48
|
+
"@next/eslint-plugin-next": "15.x",
|
|
49
|
+
"@stylistic/eslint-plugin": "3.x",
|
|
50
|
+
"@types/eslint-plugin-jsx-a11y": "6.x",
|
|
49
51
|
"eslint": "9.x",
|
|
50
|
-
"eslint-import-resolver-typescript": "
|
|
52
|
+
"eslint-import-resolver-typescript": "4.x",
|
|
51
53
|
"eslint-plugin-import-x": "4.x",
|
|
52
54
|
"eslint-plugin-jsx-a11y": "6.x",
|
|
53
|
-
"eslint-plugin-n": "
|
|
55
|
+
"eslint-plugin-n": "17.x",
|
|
54
56
|
"eslint-plugin-react": "7.x",
|
|
55
57
|
"eslint-plugin-react-hooks": "5.x",
|
|
56
58
|
"typescript-eslint": "8.x"
|
|
@@ -59,6 +61,9 @@
|
|
|
59
61
|
"@next/eslint-plugin-next": {
|
|
60
62
|
"optional": true
|
|
61
63
|
},
|
|
64
|
+
"@stylistic/eslint-plugin": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
62
67
|
"@types/eslint-plugin-jsx-a11y": {
|
|
63
68
|
"optional": true
|
|
64
69
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|