eslint-config-airbnb-extended 0.3.0 → 0.4.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.
Files changed (64) hide show
  1. package/README.md +10 -0
  2. package/dist/@types/index.d.ts +22 -0
  3. package/dist/configs/base/index.js +24 -0
  4. package/dist/{base → configs/base}/recommended.js +4 -3
  5. package/dist/configs/index.js +34 -0
  6. package/dist/{react → configs/react}/index.js +5 -4
  7. package/dist/{react → configs/react}/recommended.js +5 -6
  8. package/dist/configs/typescript/index.js +14 -0
  9. package/dist/{typescript → configs/typescript}/recommended.js +6 -5
  10. package/dist/helpers/getDevDepsList.js +1 -2
  11. package/dist/index.js +11 -37
  12. package/dist/plugins/index.js +21 -0
  13. package/dist/plugins/nextPlugin.js +12 -0
  14. package/dist/plugins/reactA11yPlugin.js +12 -0
  15. package/dist/plugins/reactHooksPlugin.js +51 -0
  16. package/dist/plugins/reactPlugin.js +13 -0
  17. package/dist/plugins/typescriptEslintPlugin.js +16 -0
  18. package/dist/rules/best-practices.js +2 -1
  19. package/dist/rules/errors.js +2 -1
  20. package/dist/rules/es6.js +2 -1
  21. package/dist/rules/imports.js +8 -13
  22. package/dist/rules/importsStrict.js +3 -16
  23. package/dist/rules/index.js +21 -0
  24. package/dist/rules/next.js +2 -4
  25. package/dist/rules/node.js +2 -1
  26. package/dist/rules/react-a11y.js +2 -7
  27. package/dist/rules/react-hooks.js +2 -38
  28. package/dist/rules/react.js +2 -5
  29. package/dist/rules/strict.js +2 -1
  30. package/dist/rules/style.js +2 -1
  31. package/dist/rules/typescript/typescriptBase.js +3 -2
  32. package/dist/rules/typescript/typescriptEslint.js +11 -17
  33. package/dist/rules/typescript/typescriptImports.js +8 -4
  34. package/dist/rules/variables.js +2 -1
  35. package/package.json +3 -3
  36. package/dist/base/index.d.ts +0 -990
  37. package/dist/base/index.js +0 -23
  38. package/dist/base/recommended.d.ts +0 -990
  39. package/dist/helpers/getDevDepsList.d.ts +0 -3
  40. package/dist/index.d.ts +0 -17982
  41. package/dist/react/index.d.ts +0 -1793
  42. package/dist/react/recommended.d.ts +0 -2786
  43. package/dist/rules/best-practices.d.ts +0 -177
  44. package/dist/rules/errors.d.ts +0 -69
  45. package/dist/rules/es6.d.ts +0 -146
  46. package/dist/rules/imports.d.ts +0 -151
  47. package/dist/rules/importsStrict.d.ts +0 -43
  48. package/dist/rules/next.d.ts +0 -8
  49. package/dist/rules/node.d.ts +0 -90
  50. package/dist/rules/react-a11y.d.ts +0 -117
  51. package/dist/rules/react-hooks.d.ts +0 -19
  52. package/dist/rules/react.d.ts +0 -1659
  53. package/dist/rules/strict.d.ts +0 -7
  54. package/dist/rules/style.d.ts +0 -320
  55. package/dist/rules/typescript/typescriptBase.d.ts +0 -23
  56. package/dist/rules/typescript/typescriptEslint.d.ts +0 -3
  57. package/dist/rules/typescript/typescriptImports.d.ts +0 -37
  58. package/dist/rules/typescript.d.ts +0 -47
  59. package/dist/rules/typescript.js +0 -9
  60. package/dist/rules/variables.d.ts +0 -35
  61. package/dist/typescript/index.d.ts +0 -58
  62. package/dist/typescript/index.js +0 -11
  63. package/dist/typescript/recommended.d.ts +0 -112
  64. package/dist/utils/index.d.ts +0 -13
package/README.md CHANGED
@@ -53,3 +53,13 @@ If you're working in a monorepo setup, it's recommended to run the installation
53
53
  ### Why did we switch from `import` to `import-x`?
54
54
 
55
55
  The switch from the `import` ESLint plugin to `import-x` is due to several improvements. `import-x` provides **better TypeScript support**, ensuring more accurate linting for TypeScript projects. It is **actively maintained**, with regular updates and bug fixes, unlike the original plugin. It also has **fewer issues reported on GitHub**, indicating better stability. Additionally, `import-x` offers a **more performant and lightweight version**, reducing linting overhead and improving build performance. These factors make `import-x` a more reliable and efficient choice.
56
+
57
+ ### Why are `plugins` separated from the `config` in this package?
58
+
59
+ The main reason for separating `plugins` from the config is to avoid a common issue developers face when extending multiple ESLint configurations. Specifically, many run into the error:
60
+ `Config "package": Key "plugins": Cannot redefine plugin "key".`
61
+ Unfortunately, there's no built-in way to resolve this conflict when plugins are directly included within shared configs.
62
+
63
+ This package combines multiple ESLint configurations (see [Packages Used](https://github.com/NishargShah/eslint-config-airbnb-extended/tree/master/packages/eslint-config-airbnb-extended#packages-used)), and based on experience, it's better to keep `plugins` separate. If you'd like to use the recommended plugins, you can import them directly from the `plugins` export provided by the package.
64
+
65
+ By doing this, you can safely use this package alongside official ESLint configs without running into plugin redefinition issues.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Direct export not allowed, it will increase the size of d.ts
3
+ */
4
+ export declare const rules: {
5
+ base: Record<"imports" | "variables" | "bestPractices" | "errors" | "es6" | "node" | "strict" | "style" | "importsStrict", import("eslint").Linter.Config>;
6
+ react: Record<"react" | "reactA11y" | "reactHooks", import("eslint").Linter.Config>;
7
+ next: import("eslint").Linter.Config;
8
+ typescript: Record<"imports" | "base" | "typescriptEslint", import("eslint").Linter.Config>;
9
+ };
10
+ export declare const configs: {
11
+ base: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
12
+ react: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
13
+ next: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
14
+ node: Record<"all" | "recommended" | "typescript", import("eslint").Linter.Config[]>;
15
+ };
16
+ export declare const plugins: {
17
+ next: import("eslint").Linter.Config;
18
+ react: import("eslint").Linter.Config;
19
+ reactA11y: import("eslint").Linter.Config;
20
+ reactHooks: import("eslint").Linter.Config;
21
+ typescriptEslint: import("eslint").Linter.Config;
22
+ };
@@ -0,0 +1,24 @@
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 best_practices_1 = __importDefault(require("../../rules/best-practices"));
7
+ const errors_1 = __importDefault(require("../../rules/errors"));
8
+ const es6_1 = __importDefault(require("../../rules/es6"));
9
+ const imports_1 = __importDefault(require("../../rules/imports"));
10
+ const node_1 = __importDefault(require("../../rules/node"));
11
+ const strict_1 = __importDefault(require("../../rules/strict"));
12
+ const style_1 = __importDefault(require("../../rules/style"));
13
+ const variables_1 = __importDefault(require("../../rules/variables"));
14
+ const baseConfig = {
15
+ bestPractices: best_practices_1.default,
16
+ errors: errors_1.default,
17
+ es6: es6_1.default,
18
+ imports: imports_1.default,
19
+ node: node_1.default,
20
+ strict: strict_1.default,
21
+ style: style_1.default,
22
+ variables: variables_1.default,
23
+ };
24
+ exports.default = baseConfig;
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const base_1 = __importDefault(require("../base"));
7
- exports.default = [
8
- ...Object.values(base_1.default),
6
+ const index_1 = __importDefault(require("../../configs/base/index"));
7
+ const baseRecommendedConfig = [
8
+ ...Object.values(index_1.default),
9
9
  {
10
10
  name: 'airbnb/config/language-configurations',
11
11
  languageOptions: {
@@ -17,3 +17,4 @@ exports.default = [
17
17
  rules: {},
18
18
  },
19
19
  ];
20
+ exports.default = baseRecommendedConfig;
@@ -0,0 +1,34 @@
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 recommended_1 = __importDefault(require("../configs/base/recommended"));
7
+ const recommended_2 = __importDefault(require("../configs/react/recommended"));
8
+ const recommended_3 = __importDefault(require("../configs/typescript/recommended"));
9
+ const next_1 = __importDefault(require("../rules/next"));
10
+ const base = {
11
+ recommended: recommended_1.default,
12
+ typescript: recommended_3.default.base,
13
+ all: [...recommended_1.default, ...recommended_3.default.base],
14
+ };
15
+ const react = {
16
+ recommended: recommended_2.default,
17
+ typescript: recommended_3.default.react,
18
+ all: [...recommended_1.default, ...recommended_2.default, ...recommended_3.default.react],
19
+ };
20
+ const next = {
21
+ recommended: [...react.recommended, next_1.default],
22
+ typescript: react.typescript,
23
+ all: [...react.all, next_1.default],
24
+ };
25
+ /**
26
+ * as is given due to less size of index.d.ts
27
+ */
28
+ const configs = {
29
+ base: base,
30
+ react: react,
31
+ next: next,
32
+ node: base,
33
+ };
34
+ exports.default = configs;
@@ -3,11 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("../rules/react"));
7
- const react_a11y_1 = __importDefault(require("../rules/react-a11y"));
8
- const react_hooks_1 = __importDefault(require("../rules/react-hooks"));
9
- exports.default = {
6
+ const react_1 = __importDefault(require("../../rules/react"));
7
+ const react_a11y_1 = __importDefault(require("../../rules/react-a11y"));
8
+ const react_hooks_1 = __importDefault(require("../../rules/react-hooks"));
9
+ const reactConfig = {
10
10
  react: react_1.default,
11
11
  reactA11y: react_a11y_1.default,
12
12
  reactHooks: react_hooks_1.default,
13
13
  };
14
+ exports.default = reactConfig;
@@ -3,12 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const recommended_1 = __importDefault(require("../base/recommended"));
7
- const react_1 = __importDefault(require("../react"));
8
- const utils_1 = require("../utils");
9
- exports.default = [
10
- ...recommended_1.default,
11
- ...Object.values(react_1.default),
6
+ const index_1 = __importDefault(require("../../configs/react/index"));
7
+ const utils_1 = require("../../utils");
8
+ const reactRecommendedConfig = [
9
+ ...Object.values(index_1.default),
12
10
  {
13
11
  name: 'airbnb/config/react-settings',
14
12
  settings: {
@@ -20,3 +18,4 @@ exports.default = [
20
18
  },
21
19
  },
22
20
  ];
21
+ exports.default = reactRecommendedConfig;
@@ -0,0 +1,14 @@
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 typescriptBase_1 = __importDefault(require("../../rules/typescript/typescriptBase"));
7
+ const typescriptEslint_1 = __importDefault(require("../../rules/typescript/typescriptEslint"));
8
+ const typescriptImports_1 = __importDefault(require("../../rules/typescript/typescriptImports"));
9
+ const typescriptConfig = {
10
+ base: typescriptBase_1.default,
11
+ typescriptEslint: typescriptEslint_1.default,
12
+ imports: typescriptImports_1.default,
13
+ };
14
+ exports.default = typescriptConfig;
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const typescript_1 = __importDefault(require("../typescript"));
7
- const utils_1 = require("../utils");
8
- exports.default = {
9
- base: typescript_1.default.typescript,
6
+ const index_1 = __importDefault(require("../../configs/typescript/index"));
7
+ const utils_1 = require("../../utils");
8
+ const typescriptRecommendedConfig = {
9
+ base: Object.values(index_1.default),
10
10
  react: [
11
- ...typescript_1.default.typescript,
11
+ ...Object.values(index_1.default),
12
12
  {
13
13
  name: 'airbnb/config/typescript-react',
14
14
  rules: {
@@ -33,3 +33,4 @@ exports.default = {
33
33
  },
34
34
  ],
35
35
  };
36
+ exports.default = typescriptRecommendedConfig;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDevDepsList = void 0;
4
3
  const getDevDepsList = (extensions) => [
5
4
  'test/**',
6
5
  'tests/**',
@@ -28,4 +27,4 @@ const getDevDepsList = (extensions) => [
28
27
  `**/eslint.config.{${extensions}}`,
29
28
  `**/prettier.config.{${extensions}}`,
30
29
  ];
31
- exports.getDevDepsList = getDevDepsList;
30
+ exports.default = getDevDepsList;
package/dist/index.js CHANGED
@@ -1,42 +1,16 @@
1
1
  "use strict";
2
+ /* eslint-disable import-x/no-rename-default, unicorn/prefer-export-from */
2
3
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
5
  };
5
6
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.configs = exports.rules = void 0;
7
- const base_1 = __importDefault(require("./base"));
8
- const recommended_1 = __importDefault(require("./base/recommended"));
9
- const react_1 = __importDefault(require("./react"));
10
- const recommended_2 = __importDefault(require("./react/recommended"));
11
- const typescript_1 = __importDefault(require("./typescript"));
12
- const recommended_3 = __importDefault(require("./typescript/recommended"));
13
- const importsStrict_1 = __importDefault(require("./rules/importsStrict"));
14
- const next_1 = __importDefault(require("./rules/next"));
15
- exports.rules = {
16
- base: Object.assign(Object.assign({}, base_1.default), { importsStrict: importsStrict_1.default }),
17
- react: react_1.default,
18
- next: next_1.default,
19
- typescript: typescript_1.default,
20
- };
21
- exports.configs = {
22
- base: {
23
- recommended: recommended_1.default,
24
- typescript: recommended_3.default.base,
25
- all: [...recommended_1.default, ...recommended_3.default.base],
26
- },
27
- react: {
28
- recommended: recommended_2.default,
29
- typescript: recommended_3.default.react,
30
- all: [...recommended_2.default, ...recommended_3.default.react],
31
- },
32
- next: {
33
- recommended: [...recommended_2.default, next_1.default],
34
- typescript: recommended_3.default.react,
35
- all: [...recommended_2.default, ...recommended_3.default.react, next_1.default],
36
- },
37
- node: {
38
- recommended: recommended_1.default,
39
- typescript: recommended_3.default.base,
40
- all: [...recommended_1.default, ...recommended_3.default.base],
41
- },
42
- };
7
+ exports.plugins = exports.configs = exports.rules = void 0;
8
+ const configs_1 = __importDefault(require("./configs"));
9
+ const plugins_1 = __importDefault(require("./plugins"));
10
+ const rules_1 = __importDefault(require("./rules"));
11
+ /**
12
+ * Direct export not allowed, it will increase the size of d.ts
13
+ */
14
+ exports.rules = rules_1.default;
15
+ exports.configs = configs_1.default;
16
+ exports.plugins = plugins_1.default;
@@ -0,0 +1,21 @@
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 nextPlugin_1 = __importDefault(require("../plugins/nextPlugin"));
7
+ const reactA11yPlugin_1 = __importDefault(require("../plugins/reactA11yPlugin"));
8
+ const reactHooksPlugin_1 = __importDefault(require("../plugins/reactHooksPlugin"));
9
+ const reactPlugin_1 = __importDefault(require("../plugins/reactPlugin"));
10
+ const typescriptEslintPlugin_1 = __importDefault(require("../plugins/typescriptEslintPlugin"));
11
+ /**
12
+ * as is given due to less size of index.d.ts
13
+ */
14
+ const plugins = {
15
+ next: nextPlugin_1.default,
16
+ react: reactPlugin_1.default,
17
+ reactA11y: reactA11yPlugin_1.default,
18
+ reactHooks: reactHooksPlugin_1.default,
19
+ typescriptEslint: typescriptEslintPlugin_1.default,
20
+ };
21
+ exports.default = plugins;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-expect-error eslint-plugin-import not working in import
4
+ // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
5
+ const ESLintPluginNext = require('@next/eslint-plugin-next');
6
+ const nextPlugin = {
7
+ name: 'airbnb/config/plugin/next',
8
+ plugins: {
9
+ '@next/next': ESLintPluginNext,
10
+ },
11
+ };
12
+ exports.default = nextPlugin;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-expect-error eslint-plugin-import not working in import
4
+ // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
5
+ const EsLintPluginJSXA11y = require('eslint-plugin-jsx-a11y');
6
+ const reactA11yPlugin = {
7
+ name: 'airbnb/config/plugin/react-a11y',
8
+ plugins: {
9
+ 'jsx-a11y': EsLintPluginJSXA11y,
10
+ },
11
+ };
12
+ exports.default = reactA11yPlugin;
@@ -0,0 +1,51 @@
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
+ // eslint-disable-next-line import-x/no-namespace
37
+ const EsLintPluginReactHooks = __importStar(require("eslint-plugin-react-hooks"));
38
+ const reactHooksPlugin = {
39
+ name: 'airbnb/config/plugin/react-hooks',
40
+ plugins: {
41
+ 'react-hooks': EsLintPluginReactHooks,
42
+ },
43
+ languageOptions: {
44
+ parserOptions: {
45
+ ecmaFeatures: {
46
+ jsx: true,
47
+ },
48
+ },
49
+ },
50
+ };
51
+ exports.default = reactHooksPlugin;
@@ -0,0 +1,13 @@
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 eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
7
+ const reactPlugin = {
8
+ name: 'airbnb/config/plugin/react',
9
+ plugins: {
10
+ react: eslint_plugin_react_1.default,
11
+ },
12
+ };
13
+ exports.default = reactPlugin;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const typescript_eslint_1 = require("typescript-eslint");
4
+ const typescriptEslintPlugin = {
5
+ name: 'airbnb/config/plugin/typescript-eslint',
6
+ plugins: {
7
+ '@typescript-eslint': typescript_eslint_1.plugin,
8
+ },
9
+ languageOptions: {
10
+ parser: typescript_eslint_1.parser,
11
+ parserOptions: {
12
+ projectService: true,
13
+ },
14
+ },
15
+ };
16
+ exports.default = typescriptEslintPlugin;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
3
+ const bestPracticesRules = {
4
4
  name: 'airbnb/config/best-practices',
5
5
  rules: {
6
6
  // enforces getter/setter pairs in objects
@@ -377,3 +377,4 @@ exports.default = {
377
377
  yoda: 'error',
378
378
  },
379
379
  };
380
+ exports.default = bestPracticesRules;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
3
+ const errorsRules = {
4
4
  name: 'airbnb/config/errors',
5
5
  rules: {
6
6
  // Enforce “for” loop update clause moving the counter in the right direction
@@ -149,3 +149,4 @@ exports.default = {
149
149
  'valid-typeof': ['error', { requireStringLiterals: true }],
150
150
  },
151
151
  };
152
+ exports.default = errorsRules;
package/dist/rules/es6.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const globals_1 = __importDefault(require("globals"));
7
- exports.default = {
7
+ const es6Rules = {
8
8
  name: 'airbnb/config/es6',
9
9
  languageOptions: {
10
10
  globals: Object.assign({}, globals_1.default.es2015),
@@ -190,3 +190,4 @@ exports.default = {
190
190
  'yield-star-spacing': ['error', 'after'],
191
191
  },
192
192
  };
193
+ exports.default = es6Rules;
@@ -3,11 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("../utils");
7
6
  const eslint_plugin_import_x_1 = require("eslint-plugin-import-x");
8
7
  const globals_1 = __importDefault(require("globals"));
9
- const getDevDepsList_1 = require("../helpers/getDevDepsList");
10
- exports.default = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatConfigs.recommended), { name: 'airbnb/config/imports', languageOptions: {
8
+ const getDevDepsList_1 = __importDefault(require("../helpers/getDevDepsList"));
9
+ const utils_1 = require("../utils");
10
+ const importsRules = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatConfigs.recommended), { name: 'airbnb/config/import-x', languageOptions: {
11
11
  globals: Object.assign({}, globals_1.default.es2015),
12
12
  parserOptions: {
13
13
  ecmaVersion: 6,
@@ -61,7 +61,7 @@ exports.default = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatC
61
61
  'import-x/named': 'error',
62
62
  // Enforces names exist at the time they are dereferenced
63
63
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
64
- 'import-x/namespaces': 'error',
64
+ 'import-x/namespace': 'error',
65
65
  // Require a newline after the last import/require in a group
66
66
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
67
67
  'import-x/newline-after-import': 'error',
@@ -100,7 +100,7 @@ exports.default = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatC
100
100
  'import-x/no-extraneous-dependencies': [
101
101
  'error',
102
102
  {
103
- devDependencies: (0, getDevDepsList_1.getDevDepsList)(utils_1.jsExtensions.join(',')),
103
+ devDependencies: (0, getDevDepsList_1.default)(utils_1.jsExtensions.map((ext) => ext.slice(1)).join(',')),
104
104
  optionalDependencies: false,
105
105
  peerDependencies: true,
106
106
  bundledDependencies: true,
@@ -168,14 +168,8 @@ exports.default = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatC
168
168
  ],
169
169
  // Reports modules without any exports, or with unused exports
170
170
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
171
- 'import-x/no-unused-modules': [
172
- 'off',
173
- {
174
- ignoreExports: [],
175
- missingExports: true,
176
- unusedExports: true,
177
- },
178
- ],
171
+ // No Common.js support
172
+ 'import-x/no-unused-modules': 'off',
179
173
  // Ensures that there are no useless path segments
180
174
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-useless-path-segments.md
181
175
  'import-x/no-useless-path-segments': [
@@ -201,3 +195,4 @@ exports.default = Object.assign(Object.assign({}, eslint_plugin_import_x_1.flatC
201
195
  // At the moment, it's not a thing.
202
196
  'import-x/unambiguous': 'off',
203
197
  } });
198
+ exports.default = importsRules;
@@ -1,13 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- name: 'airbnb/config/imports-strict',
3
+ const importsStrictRules = {
4
+ name: 'airbnb/config/import-x/strict',
5
5
  rules: {
6
- // Reports when named exports are not grouped together in a single export declaration
7
- // or when multiple assignments to CommonJS module.exports or exports object are present
8
- // in a single file.
9
- // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
10
- 'import-x/group-exports': 'error',
11
6
  // Reports if a module's default export is unnamed
12
7
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
13
8
  'import-x/no-anonymous-default-export': [
@@ -20,15 +15,6 @@ exports.default = {
20
15
  // disallow namespace imports
21
16
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
22
17
  'import-x/no-namespace': 'error',
23
- // Reports modules without any exports, or with unused exports
24
- // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
25
- 'import-x/no-unused-modules': [
26
- 'warn',
27
- {
28
- missingExports: true,
29
- unusedExports: true,
30
- },
31
- ],
32
18
  // ensure absolute imports are above relative imports and that unassigned imports are ignored
33
19
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
34
20
  'import-x/order': [
@@ -72,3 +58,4 @@ exports.default = {
72
58
  ],
73
59
  },
74
60
  };
61
+ exports.default = importsStrictRules;
@@ -0,0 +1,21 @@
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 base_1 = __importDefault(require("../configs/base"));
7
+ const react_1 = __importDefault(require("../configs/react"));
8
+ const typescript_1 = __importDefault(require("../configs/typescript"));
9
+ const importsStrict_1 = __importDefault(require("../rules/importsStrict"));
10
+ const next_1 = __importDefault(require("../rules/next"));
11
+ const baseRules = Object.assign(Object.assign({}, base_1.default), { importsStrict: importsStrict_1.default });
12
+ /**
13
+ * as is given due to less size of index.d.ts
14
+ */
15
+ const rules = {
16
+ base: baseRules,
17
+ react: react_1.default,
18
+ next: next_1.default,
19
+ typescript: typescript_1.default,
20
+ };
21
+ exports.default = rules;
@@ -3,10 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // @ts-expect-error eslint-plugin-import not working in import
4
4
  // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
5
5
  const ESLintPluginNext = require('@next/eslint-plugin-next');
6
- exports.default = {
6
+ const nextRules = {
7
7
  name: 'airbnb/config/next',
8
- plugins: {
9
- '@next/next': ESLintPluginNext,
10
- },
11
8
  rules: Object.assign(Object.assign({}, ESLintPluginNext.configs.recommended.rules), ESLintPluginNext.configs['core-web-vitals'].rules),
12
9
  };
10
+ exports.default = nextRules;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const globals_1 = __importDefault(require("globals"));
7
- exports.default = {
7
+ const nodeRules = {
8
8
  name: 'airbnb/config/node',
9
9
  languageOptions: {
10
10
  globals: Object.assign({}, globals_1.default.nodeBuiltin),
@@ -37,3 +37,4 @@ exports.default = {
37
37
  'no-sync': 'off',
38
38
  },
39
39
  };
40
+ exports.default = nodeRules;
@@ -1,13 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // @ts-expect-error eslint-plugin-import not working in import
4
- // eslint-disable-next-line @typescript-eslint/no-require-imports,unicorn/prefer-module
5
- const EsLintPluginJSXA11y = require('eslint-plugin-jsx-a11y');
6
- exports.default = {
3
+ const reactA11yRules = {
7
4
  name: 'airbnb/config/react-a11y',
8
- plugins: {
9
- 'jsx-a11y': EsLintPluginJSXA11y,
10
- },
11
5
  languageOptions: {
12
6
  parserOptions: {
13
7
  ecmaFeatures: {
@@ -253,3 +247,4 @@ exports.default = {
253
247
  'jsx-a11y/prefer-tag-over-role': 'off',
254
248
  },
255
249
  };
250
+ exports.default = reactA11yRules;