eslint-config-airbnb-extended 0.0.8 → 0.0.9

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.
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.importResolverExtensions = void 0;
7
+ const typescript_eslint_1 = require("typescript-eslint");
8
+ const best_practices_1 = __importDefault(require("./best-practices"));
9
+ const errors_1 = __importDefault(require("./errors"));
10
+ const es6_1 = __importDefault(require("./es6"));
11
+ const imports_1 = require("./imports");
12
+ const style_1 = __importDefault(require("./style"));
13
+ const variables_1 = __importDefault(require("./variables"));
14
+ exports.importResolverExtensions = [
15
+ ...imports_1.importConfig.settings['import/resolver'].node.extensions,
16
+ '.ts',
17
+ '.cts',
18
+ '.mts',
19
+ '.d.ts',
20
+ ];
21
+ exports.default = [
22
+ {
23
+ name: 'airbnb/config/typescript',
24
+ plugins: {
25
+ '@typescript-eslint': typescript_eslint_1.plugin,
26
+ },
27
+ languageOptions: {
28
+ parser: typescript_eslint_1.parser,
29
+ parserOptions: {
30
+ projectService: true,
31
+ },
32
+ },
33
+ settings: {
34
+ // Append 'ts' extensions to Airbnb 'import/resolver' setting
35
+ 'import/resolver': {
36
+ node: {
37
+ extensions: exports.importResolverExtensions,
38
+ },
39
+ },
40
+ // Append 'ts' extensions to Airbnb 'import/extensions' setting
41
+ 'import/extensions': [...imports_1.importConfig.settings['import/extensions'], '.ts', '.tsx', '.d.ts'],
42
+ // Resolve type definition packages
43
+ 'import/external-module-folders': ['node_modules', 'node_modules/@types'],
44
+ },
45
+ rules: {
46
+ // Replace Airbnb 'brace-style' rule with '@typescript-eslint' version
47
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md
48
+ 'brace-style': 'off',
49
+ '@typescript-eslint/brace-style': style_1.default.rules['brace-style'],
50
+ // Replace Airbnb 'camelcase' rule with '@typescript-eslint/naming-convention'
51
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md
52
+ camelcase: 'off',
53
+ // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.
54
+ '@typescript-eslint/naming-convention': [
55
+ 'error',
56
+ // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)
57
+ {
58
+ selector: 'variable',
59
+ format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
60
+ },
61
+ // Allow camelCase functions (23.2), and PascalCase functions (23.8)
62
+ {
63
+ selector: 'function',
64
+ format: ['camelCase', 'PascalCase'],
65
+ },
66
+ // Airbnb recommends PascalCase for classes (23.3), and although Airbnb does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything "type like", including interfaces, type aliases, and enums
67
+ {
68
+ selector: 'typeLike',
69
+ format: ['PascalCase'],
70
+ },
71
+ ],
72
+ // Replace Airbnb 'comma-dangle' rule with '@typescript-eslint' version
73
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md
74
+ // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config
75
+ 'comma-dangle': 'off',
76
+ '@typescript-eslint/comma-dangle': [
77
+ style_1.default.rules['comma-dangle'][0],
78
+ Object.assign(Object.assign({}, style_1.default.rules['comma-dangle'][1]), { enums: style_1.default.rules['comma-dangle'][1].arrays, generics: style_1.default.rules['comma-dangle'][1].arrays, tuples: style_1.default.rules['comma-dangle'][1].arrays }),
79
+ ],
80
+ // Replace Airbnb 'comma-spacing' rule with '@typescript-eslint' version
81
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md
82
+ 'comma-spacing': 'off',
83
+ '@typescript-eslint/comma-spacing': style_1.default.rules['comma-spacing'],
84
+ // Replace Airbnb 'default-param-last' rule with '@typescript-eslint' version
85
+ // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/default-param-last.md
86
+ 'default-param-last': 'off',
87
+ '@typescript-eslint/default-param-last': best_practices_1.default.rules['default-param-last'],
88
+ // Replace Airbnb 'dot-notation' rule with '@typescript-eslint' version
89
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md
90
+ 'dot-notation': 'off',
91
+ '@typescript-eslint/dot-notation': best_practices_1.default.rules['dot-notation'],
92
+ // Replace Airbnb 'func-call-spacing' rule with '@typescript-eslint' version
93
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md
94
+ 'func-call-spacing': 'off',
95
+ '@typescript-eslint/func-call-spacing': style_1.default.rules['func-call-spacing'],
96
+ // Replace Airbnb 'indent' rule with '@typescript-eslint' version
97
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md
98
+ indent: 'off',
99
+ '@typescript-eslint/indent': style_1.default.rules.indent,
100
+ // Replace Airbnb 'keyword-spacing' rule with '@typescript-eslint' version
101
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md
102
+ 'keyword-spacing': 'off',
103
+ '@typescript-eslint/keyword-spacing': style_1.default.rules['keyword-spacing'],
104
+ // Replace Airbnb 'lines-between-class-members' rule with '@typescript-eslint' version
105
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md
106
+ 'lines-between-class-members': 'off',
107
+ '@typescript-eslint/lines-between-class-members': style_1.default.rules['lines-between-class-members'],
108
+ // Replace Airbnb 'no-array-constructor' rule with '@typescript-eslint' version
109
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md
110
+ 'no-array-constructor': 'off',
111
+ '@typescript-eslint/no-array-constructor': style_1.default.rules['no-array-constructor'],
112
+ // Replace Airbnb 'no-dupe-class-members' rule with '@typescript-eslint' version
113
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md
114
+ 'no-dupe-class-members': 'off',
115
+ '@typescript-eslint/no-dupe-class-members': es6_1.default.rules['no-dupe-class-members'],
116
+ // Replace Airbnb 'no-empty-function' rule with '@typescript-eslint' version
117
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
118
+ 'no-empty-function': 'off',
119
+ '@typescript-eslint/no-empty-function': best_practices_1.default.rules['no-empty-function'],
120
+ // Replace Airbnb 'no-extra-parens' rule with '@typescript-eslint' version
121
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md
122
+ 'no-extra-parens': 'off',
123
+ '@typescript-eslint/no-extra-parens': errors_1.default.rules['no-extra-parens'],
124
+ // Replace Airbnb 'no-extra-semi' rule with '@typescript-eslint' version
125
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md
126
+ 'no-extra-semi': 'off',
127
+ '@typescript-eslint/no-extra-semi': errors_1.default.rules['no-extra-semi'],
128
+ // Replace Airbnb 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version
129
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md
130
+ 'no-implied-eval': 'off',
131
+ 'no-new-func': 'off',
132
+ '@typescript-eslint/no-implied-eval': best_practices_1.default.rules['no-implied-eval'],
133
+ // Replace Airbnb 'no-loss-of-precision' rule with '@typescript-eslint' version
134
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loss-of-precision.md
135
+ 'no-loss-of-precision': 'off',
136
+ '@typescript-eslint/no-loss-of-precision': errors_1.default.rules['no-loss-of-precision'],
137
+ // Replace Airbnb 'no-loop-func' rule with '@typescript-eslint' version
138
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md
139
+ 'no-loop-func': 'off',
140
+ '@typescript-eslint/no-loop-func': best_practices_1.default.rules['no-loop-func'],
141
+ // Replace Airbnb 'no-magic-numbers' rule with '@typescript-eslint' version
142
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md
143
+ 'no-magic-numbers': 'off',
144
+ '@typescript-eslint/no-magic-numbers': best_practices_1.default.rules['no-magic-numbers'],
145
+ // Replace Airbnb 'no-redeclare' rule with '@typescript-eslint' version
146
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
147
+ 'no-redeclare': 'off',
148
+ '@typescript-eslint/no-redeclare': best_practices_1.default.rules['no-redeclare'],
149
+ // Replace Airbnb 'no-shadow' rule with '@typescript-eslint' version
150
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
151
+ 'no-shadow': 'off',
152
+ '@typescript-eslint/no-shadow': variables_1.default.rules['no-shadow'],
153
+ // Replace Airbnb 'space-before-blocks' rule with '@typescript-eslint' version
154
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-blocks.md
155
+ 'space-before-blocks': 'off',
156
+ '@typescript-eslint/space-before-blocks': style_1.default.rules['space-before-blocks'],
157
+ // Replace Airbnb 'no-throw-literal' rule with '@typescript-eslint' version
158
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md
159
+ 'no-throw-literal': 'off',
160
+ '@typescript-eslint/no-throw-literal': best_practices_1.default.rules['no-throw-literal'],
161
+ // Replace Airbnb 'no-unused-expressions' rule with '@typescript-eslint' version
162
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md
163
+ 'no-unused-expressions': 'off',
164
+ '@typescript-eslint/no-unused-expressions': best_practices_1.default.rules['no-unused-expressions'],
165
+ // Replace Airbnb 'no-unused-vars' rule with '@typescript-eslint' version
166
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
167
+ 'no-unused-vars': 'off',
168
+ '@typescript-eslint/no-unused-vars': variables_1.default.rules['no-unused-vars'],
169
+ // Replace Airbnb 'no-use-before-define' rule with '@typescript-eslint' version
170
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md
171
+ 'no-use-before-define': 'off',
172
+ '@typescript-eslint/no-use-before-define': variables_1.default.rules['no-use-before-define'],
173
+ // Replace Airbnb 'no-useless-constructor' rule with '@typescript-eslint' version
174
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md
175
+ 'no-useless-constructor': 'off',
176
+ '@typescript-eslint/no-useless-constructor': es6_1.default.rules['no-useless-constructor'],
177
+ // Replace Airbnb 'quotes' rule with '@typescript-eslint' version
178
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
179
+ quotes: 'off',
180
+ '@typescript-eslint/quotes': style_1.default.rules.quotes,
181
+ // Replace Airbnb 'semi' rule with '@typescript-eslint' version
182
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
183
+ semi: 'off',
184
+ '@typescript-eslint/semi': style_1.default.rules.semi,
185
+ // Replace Airbnb 'space-before-function-paren' rule with '@typescript-eslint' version
186
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
187
+ 'space-before-function-paren': 'off',
188
+ '@typescript-eslint/space-before-function-paren': style_1.default.rules['space-before-function-paren'],
189
+ // Replace Airbnb 'require-await' rule with '@typescript-eslint' version
190
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md
191
+ 'require-await': 'off',
192
+ '@typescript-eslint/require-await': best_practices_1.default.rules['require-await'],
193
+ // Replace Airbnb 'no-return-await' rule with '@typescript-eslint' version
194
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md
195
+ 'no-return-await': 'off',
196
+ '@typescript-eslint/return-await': [best_practices_1.default.rules['no-return-await'], 'in-try-catch'],
197
+ // Replace Airbnb 'space-infix-ops' rule with '@typescript-eslint' version
198
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md
199
+ 'space-infix-ops': 'off',
200
+ '@typescript-eslint/space-infix-ops': style_1.default.rules['space-infix-ops'],
201
+ // Replace Airbnb 'object-curly-spacing' rule with '@typescript-eslint' version
202
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/object-curly-spacing.md
203
+ 'object-curly-spacing': 'off',
204
+ '@typescript-eslint/object-curly-spacing': style_1.default.rules['object-curly-spacing'],
205
+ // Append 'ts' and 'tsx' to Airbnb 'import/extensions' rule
206
+ // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
207
+ 'import/extensions': [
208
+ imports_1.importConfig.rules['import/extensions'][0],
209
+ imports_1.importConfig.rules['import/extensions'][1],
210
+ Object.assign(Object.assign({}, imports_1.importConfig.rules['import/extensions'][2]), { ts: 'never', tsx: 'never' }),
211
+ ],
212
+ // Append 'ts' and 'tsx' extensions to Airbnb 'import/no-extraneous-dependencies' rule
213
+ // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
214
+ 'import/no-extraneous-dependencies': [
215
+ imports_1.importConfig.rules['import/no-extraneous-dependencies'][0],
216
+ Object.assign(Object.assign({}, imports_1.importConfig.rules['import/no-extraneous-dependencies'][1]), { devDependencies: imports_1.importConfig.rules['import/no-extraneous-dependencies'][1].devDependencies.reduce((result, devDep) => {
217
+ const toAppend = [devDep];
218
+ const devDepWithTs = devDep.replaceAll(/\bjs(x?)\b/g, 'ts$1');
219
+ if (devDepWithTs !== devDep) {
220
+ toAppend.push(devDepWithTs);
221
+ }
222
+ return [...result, ...toAppend];
223
+ }, []) }),
224
+ ],
225
+ },
226
+ },
227
+ {
228
+ name: 'airbnb/config/typescript-overrides',
229
+ files: ['*.ts', '*.tsx'],
230
+ rules: {
231
+ // The following rules are enabled in Airbnb config, but are already checked (more thoroughly) by the TypeScript compiler
232
+ // Rules are inspired by: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended-raw.ts
233
+ 'constructor-super': 'off', // ts(2335) & ts(2377)
234
+ 'getter-return': 'off', // ts(2378)
235
+ 'no-class-assign': 'off', // ts(2629)
236
+ 'no-const-assign': 'off', // ts(2588)
237
+ 'no-dupe-args': 'off', // ts(2300)
238
+ 'no-dupe-class-members': 'off', // ts(2393) & ts(2300)
239
+ 'no-dupe-keys': 'off', // ts(1117)
240
+ 'no-func-assign': 'off', // ts(2630)
241
+ 'no-import-assign': 'off', // ts(2632) & ts(2540)
242
+ 'no-new-native-nonconstructor': 'off', // ts(7009)
243
+ 'no-obj-calls': 'off', // ts(2349)
244
+ 'no-redeclare': 'off', // ts(2451)
245
+ 'no-setter-return': 'off', // ts(2408)
246
+ 'no-this-before-super': 'off', // ts(2376) & ts(17009)
247
+ 'no-undef': 'off', // ts(2304) & ts(2552)
248
+ 'no-unreachable': 'off', // ts(7027)
249
+ 'no-unsafe-negation': 'off', // ts(2365) & ts(2322) & ts(2358)
250
+ 'no-with': 'off', // ts(1101) & ts(2410)
251
+ 'valid-typeof': 'off',
252
+ },
253
+ },
254
+ {
255
+ name: 'airbnb/config/typescript-import-overrides',
256
+ files: ['*.ts', '*.tsx'],
257
+ rules: {
258
+ // The following rules are enabled in Airbnb config, but are recommended to be disabled within TypeScript projects
259
+ // See: https://github.com/typescript-eslint/typescript-eslint/blob/13583e65f5973da2a7ae8384493c5e00014db51b/docs/linting/TROUBLESHOOTING.md#eslint-plugin-import
260
+ 'import/named': 'off',
261
+ 'import/no-named-as-default-member': 'off',
262
+ },
263
+ },
264
+ ];
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
14
5
  Object.defineProperty(exports, "__esModule", { value: true });
15
- var confusing_browser_globals_1 = __importDefault(require("confusing-browser-globals"));
6
+ const confusing_browser_globals_1 = __importDefault(require("confusing-browser-globals"));
16
7
  exports.default = {
17
8
  name: 'airbnb/config/variables',
18
9
  rules: {
@@ -26,7 +17,7 @@ exports.default = {
26
17
  // https://eslint.org/docs/rules/no-label-var
27
18
  'no-label-var': 'error',
28
19
  // disallow specific globals
29
- 'no-restricted-globals': __spreadArray([
20
+ 'no-restricted-globals': [
30
21
  'error',
31
22
  {
32
23
  name: 'isFinite',
@@ -35,11 +26,12 @@ exports.default = {
35
26
  {
36
27
  name: 'isNaN',
37
28
  message: 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
38
- }
39
- ], confusing_browser_globals_1.default.map(function (g) { return ({
40
- name: g,
41
- message: "Use window.".concat(g, " instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md"),
42
- }); }), true),
29
+ },
30
+ ...confusing_browser_globals_1.default.map((g) => ({
31
+ name: g,
32
+ message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
33
+ })),
34
+ ],
43
35
  // disallow declaration of variables already declared in the outer scope
44
36
  'no-shadow': 'error',
45
37
  // disallow shadowing of names such as arguments
@@ -0,0 +1,5 @@
1
+ import type { Linter } from 'eslint';
2
+ declare const _default: {
3
+ typescript: Linter.Config<Linter.RulesRecord>[];
4
+ };
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const typescript_1 = __importDefault(require("../rules/typescript"));
7
+ exports.default = {
8
+ typescript: typescript_1.default,
9
+ };
@@ -0,0 +1,6 @@
1
+ import type { Linter } from 'eslint';
2
+ declare const _default: {
3
+ base: Linter.Config<Linter.RulesRecord>[];
4
+ react: Linter.Config<Linter.RulesRecord>[];
5
+ };
6
+ export default _default;
@@ -0,0 +1,62 @@
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
+ const typescript_1 = __importStar(require("../rules/typescript"));
37
+ exports.default = {
38
+ base: typescript_1.default,
39
+ react: [
40
+ ...typescript_1.default,
41
+ {
42
+ name: 'airbnb/config/typescript-react',
43
+ settings: {
44
+ // Append 'tsx' extensions to Airbnb 'import/resolver' setting
45
+ 'import/resolver': {
46
+ node: {
47
+ extensions: [...typescript_1.importResolverExtensions, '.tsx'],
48
+ },
49
+ },
50
+ },
51
+ rules: {
52
+ // Append 'tsx' to Airbnb 'react/jsx-filename-extension' rule
53
+ 'react/jsx-filename-extension': [
54
+ 'error',
55
+ {
56
+ extensions: ['.jsx', '.tsx'],
57
+ },
58
+ ],
59
+ },
60
+ },
61
+ ],
62
+ };
package/package.json CHANGED
@@ -1,25 +1,21 @@
1
1
  {
2
2
  "name": "eslint-config-airbnb-extended",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Eslint Airbnb Config Extended",
5
5
  "keywords": [
6
6
  "eslint",
7
7
  "airbnb",
8
- "eslint-airbnb",
9
- "airbnb-eslint",
10
- "eslint-airbnb-config",
11
- "eslint-airbnb-config-x",
12
- "eslint-airbnb-config-base",
13
- "eslint-airbnb-config-typescript",
14
- "eslint-airbnb-config-extended",
15
- "eslint airbnb config",
16
- "eslint airbnb config x",
17
- "eslint airbnb config base",
18
- "eslint airbnb config typescript",
19
- "eslint airbnb config extended",
20
8
  "airbnb config",
21
- "airbnb config base",
22
- "airbnb config typescript"
9
+ "eslint config airbnb",
10
+ "eslint config airbnb x",
11
+ "eslint config airbnb base",
12
+ "eslint config airbnb typescript",
13
+ "eslint config airbnb extended",
14
+ "eslint airbnb",
15
+ "eslint airbnb x",
16
+ "eslint airbnb base",
17
+ "eslint airbnb typescript",
18
+ "eslint airbnb extended"
23
19
  ],
24
20
  "bugs": {
25
21
  "url": "https://github.com/NishargShah/eslint-config-airbnb-extended/issues"
@@ -82,6 +78,17 @@
82
78
  "eslint-plugin-react": "7.x",
83
79
  "eslint-plugin-react-hooks": "5.x"
84
80
  },
81
+ "peerDependenciesMeta": {
82
+ "eslint-plugin-jsx-a11y": {
83
+ "optional": true
84
+ },
85
+ "eslint-plugin-react": {
86
+ "optional": true
87
+ },
88
+ "eslint-plugin-react-hooks": {
89
+ "optional": true
90
+ }
91
+ },
85
92
  "packageManager": "pnpm@10.7.1",
86
93
  "engines": {
87
94
  "node": ">=16"