eslint-config-airbnb-extended 0.7.0 → 0.9.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 (34) hide show
  1. package/dist/@types/index.d.ts +6 -4
  2. package/dist/configs/base/config.js +24 -0
  3. package/dist/configs/base/index.js +7 -18
  4. package/dist/configs/base/recommended.js +2 -2
  5. package/dist/configs/base/typescript.js +8 -0
  6. package/dist/configs/index.js +8 -27
  7. package/dist/configs/next/config.js +12 -0
  8. package/dist/configs/next/index.js +7 -4
  9. package/dist/configs/next/recommended.js +2 -2
  10. package/dist/configs/next/typescript.js +8 -0
  11. package/dist/configs/node/config.js +16 -0
  12. package/dist/configs/node/index.js +4 -10
  13. package/dist/configs/node/recommended.js +2 -2
  14. package/dist/configs/react/config.js +14 -0
  15. package/dist/configs/react/index.js +7 -8
  16. package/dist/configs/react/recommended.js +43 -3
  17. package/dist/configs/{typescript/recommended.js → react/typescript.js} +2 -11
  18. package/dist/plugins/importXPlugin.js +13 -0
  19. package/dist/plugins/index.js +5 -1
  20. package/dist/plugins/nextPlugin.js +2 -2
  21. package/dist/plugins/nodePlugin.js +2 -2
  22. package/dist/plugins/reactA11yPlugin.js +5 -4
  23. package/dist/plugins/reactHooksPlugin.js +5 -36
  24. package/dist/rules/imports.js +19 -10
  25. package/dist/rules/index.js +10 -10
  26. package/dist/rules/next/nextBase.js +71 -0
  27. package/dist/rules/next/nextCoreWebVitals.js +12 -0
  28. package/dist/rules/node/nodeBase.js +10 -4
  29. package/dist/rules/node/nodeNoUnsupportedFeatures.js +1 -1
  30. package/dist/rules/{react-a11y.js → react-jsx-a11y.js} +18 -15
  31. package/dist/rules/react.js +12 -42
  32. package/package.json +15 -10
  33. package/dist/rules/next.js +0 -10
  34. /package/dist/configs/typescript/{index.js → config.js} +0 -0
@@ -2,10 +2,10 @@
2
2
  * Direct export not allowed, it will increase the size of d.ts
3
3
  */
4
4
  export declare const rules: {
5
- base: Record<"bestPractices" | "errors" | "es6" | "imports" | "strict" | "style" | "stylistic" | "variables" | "importsStrict" | "reactStrict", import("eslint").Linter.Config>;
5
+ base: Record<"strict" | "imports" | "variables" | "bestPractices" | "errors" | "es6" | "style" | "stylistic" | "importsStrict" | "reactStrict", import("eslint").Linter.Config>;
6
6
  node: Record<"globals" | "base" | "promises" | "noUnsupportedFeatures", import("eslint").Linter.Config>;
7
- react: Record<"react" | "reactA11y" | "reactHooks", import("eslint").Linter.Config>;
8
- next: Record<"next", import("eslint").Linter.Config>;
7
+ react: Record<"react" | "reactJsxA11y" | "reactHooks", import("eslint").Linter.Config>;
8
+ next: Record<"base" | "coreWebVitals", import("eslint").Linter.Config>;
9
9
  typescript: Record<"imports" | "base" | "typescriptEslint", import("eslint").Linter.Config>;
10
10
  };
11
11
  export declare const configs: {
@@ -15,9 +15,11 @@ export declare const configs: {
15
15
  node: Record<"recommended", import("eslint").Linter.Config[]>;
16
16
  };
17
17
  export declare const plugins: {
18
- next: import("eslint").Linter.Config;
18
+ importX: import("eslint").Linter.Config;
19
+ node: import("eslint").Linter.Config;
19
20
  react: import("eslint").Linter.Config;
20
21
  reactA11y: import("eslint").Linter.Config;
21
22
  reactHooks: import("eslint").Linter.Config;
23
+ next: import("eslint").Linter.Config;
22
24
  typescriptEslint: import("eslint").Linter.Config;
23
25
  };
@@ -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 strict_1 = __importDefault(require("../../rules/strict"));
11
+ const style_1 = __importDefault(require("../../rules/style"));
12
+ const stylistic_1 = __importDefault(require("../../rules/stylistic"));
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
+ strict: strict_1.default,
20
+ style: style_1.default,
21
+ stylistic: stylistic_1.default,
22
+ variables: variables_1.default,
23
+ };
24
+ exports.default = baseConfig;
@@ -3,22 +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 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 strict_1 = __importDefault(require("../../rules/strict"));
11
- const style_1 = __importDefault(require("../../rules/style"));
12
- const stylistic_1 = __importDefault(require("../../rules/stylistic"));
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
- strict: strict_1.default,
20
- style: style_1.default,
21
- stylistic: stylistic_1.default,
22
- variables: variables_1.default,
6
+ const recommended_1 = __importDefault(require("../../configs/base/recommended"));
7
+ const typescript_1 = __importDefault(require("../../configs/base/typescript"));
8
+ const base = {
9
+ recommended: recommended_1.default,
10
+ typescript: typescript_1.default,
11
+ all: [...recommended_1.default, ...typescript_1.default],
23
12
  };
24
- exports.default = baseConfig;
13
+ exports.default = base;
@@ -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("../../configs/base"));
6
+ const config_1 = __importDefault(require("../../configs/base/config"));
7
7
  const baseRecommendedConfig = [
8
- ...Object.values(base_1.default),
8
+ ...Object.values(config_1.default),
9
9
  {
10
10
  name: 'airbnb/config/language-configurations',
11
11
  languageOptions: {
@@ -0,0 +1,8 @@
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 config_1 = __importDefault(require("../../configs/typescript/config"));
7
+ const baseTypescriptConfig = Object.values(config_1.default);
8
+ exports.default = baseTypescriptConfig;
@@ -3,36 +3,17 @@ 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("../configs/base/recommended"));
7
- const recommended_2 = __importDefault(require("../configs/next/recommended"));
8
- const recommended_3 = __importDefault(require("../configs/node/recommended"));
9
- const recommended_4 = __importDefault(require("../configs/react/recommended"));
10
- const recommended_5 = __importDefault(require("../configs/typescript/recommended"));
11
- const base = {
12
- recommended: recommended_1.default,
13
- typescript: recommended_5.default.base,
14
- all: [...recommended_1.default, ...recommended_5.default.base],
15
- };
16
- const react = {
17
- recommended: recommended_4.default,
18
- typescript: recommended_5.default.react,
19
- all: [...recommended_4.default, ...recommended_5.default.react],
20
- };
21
- const next = {
22
- recommended: recommended_2.default,
23
- typescript: recommended_5.default.next,
24
- all: [...recommended_2.default, ...recommended_5.default.next],
25
- };
26
- const node = {
27
- recommended: recommended_3.default,
28
- };
6
+ const base_1 = __importDefault(require("../configs/base"));
7
+ const next_1 = __importDefault(require("../configs/next"));
8
+ const node_1 = __importDefault(require("../configs/node"));
9
+ const react_1 = __importDefault(require("../configs/react"));
29
10
  /**
30
11
  * as is given due to less size of index.d.ts
31
12
  */
32
13
  const configs = {
33
- base: base,
34
- react: react,
35
- next: next,
36
- node: node,
14
+ base: base_1.default,
15
+ react: react_1.default,
16
+ next: next_1.default,
17
+ node: node_1.default,
37
18
  };
38
19
  exports.default = configs;
@@ -0,0 +1,12 @@
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 nextBase_1 = __importDefault(require("../../rules/next/nextBase"));
7
+ const nextCoreWebVitals_1 = __importDefault(require("../../rules/next/nextCoreWebVitals"));
8
+ const nextConfig = {
9
+ base: nextBase_1.default,
10
+ coreWebVitals: nextCoreWebVitals_1.default,
11
+ };
12
+ exports.default = nextConfig;
@@ -3,8 +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 next_1 = __importDefault(require("../../rules/next"));
7
- const nextConfig = {
8
- next: next_1.default,
6
+ const recommended_1 = __importDefault(require("../../configs/next/recommended"));
7
+ const typescript_1 = __importDefault(require("../../configs/next/typescript"));
8
+ const next = {
9
+ recommended: recommended_1.default,
10
+ typescript: typescript_1.default,
11
+ all: [...recommended_1.default, ...typescript_1.default],
9
12
  };
10
- exports.default = nextConfig;
13
+ exports.default = next;
@@ -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 next_1 = __importDefault(require("../../configs/next"));
6
+ const config_1 = __importDefault(require("../../configs/next/config"));
7
7
  const recommended_1 = __importDefault(require("../../configs/react/recommended"));
8
8
  const nextRecommendedConfig = [
9
9
  ...recommended_1.default,
10
- ...Object.values(next_1.default),
10
+ ...Object.values(config_1.default),
11
11
  {
12
12
  name: 'airbnb/config/next-import-x',
13
13
  files: ['**/app/**/route.ts', '**/middleware.ts'],
@@ -0,0 +1,8 @@
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("../../configs/react/typescript"));
7
+ const nextTypescriptConfig = typescript_1.default;
8
+ exports.default = nextTypescriptConfig;
@@ -0,0 +1,16 @@
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 nodeBase_1 = __importDefault(require("../../rules/node/nodeBase"));
7
+ const nodeGlobals_1 = __importDefault(require("../../rules/node/nodeGlobals"));
8
+ const nodeNoUnsupportedFeatures_1 = __importDefault(require("../../rules/node/nodeNoUnsupportedFeatures"));
9
+ const nodePromises_1 = __importDefault(require("../../rules/node/nodePromises"));
10
+ const nodeConfig = {
11
+ base: nodeBase_1.default,
12
+ globals: nodeGlobals_1.default,
13
+ promises: nodePromises_1.default,
14
+ noUnsupportedFeatures: nodeNoUnsupportedFeatures_1.default,
15
+ };
16
+ exports.default = nodeConfig;
@@ -3,14 +3,8 @@ 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 nodeBase_1 = __importDefault(require("../../rules/node/nodeBase"));
7
- const nodeGlobals_1 = __importDefault(require("../../rules/node/nodeGlobals"));
8
- const nodeNoUnsupportedFeatures_1 = __importDefault(require("../../rules/node/nodeNoUnsupportedFeatures"));
9
- const nodePromises_1 = __importDefault(require("../../rules/node/nodePromises"));
10
- const nodeConfig = {
11
- base: nodeBase_1.default,
12
- globals: nodeGlobals_1.default,
13
- promises: nodePromises_1.default,
14
- noUnsupportedFeatures: nodeNoUnsupportedFeatures_1.default,
6
+ const recommended_1 = __importDefault(require("../../configs/node/recommended"));
7
+ const node = {
8
+ recommended: recommended_1.default,
15
9
  };
16
- exports.default = nodeConfig;
10
+ exports.default = node;
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  var _a, _b;
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const eslint_plugin_n_1 = __importDefault(require("eslint-plugin-n"));
8
- const node_1 = __importDefault(require("../../configs/node"));
8
+ const config_1 = __importDefault(require("../../configs/node/config"));
9
9
  const nodeNoUnsupportedFeatures_1 = __importDefault(require("../../rules/node/nodeNoUnsupportedFeatures"));
10
10
  const flatNodeConfig = eslint_plugin_n_1.default.configs['flat/recommended'];
11
11
  const nodeRecommendedConfig = [
12
- ...Object.values(node_1.default),
12
+ ...Object.values(config_1.default),
13
13
  Object.assign({ name: 'airbnb/config/node-configurations' }, (flatNodeConfig
14
14
  ? {
15
15
  languageOptions: flatNodeConfig.languageOptions,
@@ -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 react_1 = __importDefault(require("../../rules/react"));
7
+ const react_hooks_1 = __importDefault(require("../../rules/react-hooks"));
8
+ const react_jsx_a11y_1 = __importDefault(require("../../rules/react-jsx-a11y"));
9
+ const reactConfig = {
10
+ react: react_1.default,
11
+ reactJsxA11y: react_jsx_a11y_1.default,
12
+ reactHooks: react_hooks_1.default,
13
+ };
14
+ exports.default = reactConfig;
@@ -3,12 +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 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
- react: react_1.default,
11
- reactA11y: react_a11y_1.default,
12
- reactHooks: react_hooks_1.default,
6
+ const recommended_1 = __importDefault(require("../../configs/react/recommended"));
7
+ const typescript_1 = __importDefault(require("../../configs/react/typescript"));
8
+ const react = {
9
+ recommended: recommended_1.default,
10
+ typescript: typescript_1.default,
11
+ all: [...recommended_1.default, ...typescript_1.default],
13
12
  };
14
- exports.default = reactConfig;
13
+ exports.default = react;
@@ -3,12 +3,14 @@ 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("../../configs/react"));
6
+ const config_1 = __importDefault(require("../../configs/react/config"));
7
+ const style_1 = __importDefault(require("../../rules/style"));
7
8
  const utils_1 = require("../../utils");
9
+ const dangleRules = style_1.default.rules['no-underscore-dangle'];
8
10
  const reactRecommendedConfig = [
9
- ...Object.values(react_1.default),
11
+ ...Object.values(config_1.default),
10
12
  {
11
- name: 'airbnb/config/react-settings',
13
+ name: 'airbnb/config/react-import-x',
12
14
  settings: {
13
15
  'import-x/resolver': {
14
16
  node: {
@@ -17,5 +19,43 @@ const reactRecommendedConfig = [
17
19
  },
18
20
  },
19
21
  },
22
+ {
23
+ name: 'airbnb/config/react-configurations',
24
+ rules: {
25
+ // Allow Redux devtools variable
26
+ 'no-underscore-dangle': [
27
+ dangleRules[0],
28
+ Object.assign(Object.assign({}, dangleRules[1]), { allow: [...dangleRules[1].allow, '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'] }),
29
+ ],
30
+ // Specify whether double or single quotes should be used in JSX attributes
31
+ // https://eslint.org/docs/rules/jsx-quotes
32
+ // @deprecated
33
+ 'jsx-quotes': ['error', 'prefer-double'],
34
+ // Class Methods can be used in react
35
+ 'class-methods-use-this': [
36
+ 'error',
37
+ {
38
+ exceptMethods: [
39
+ 'render',
40
+ 'getInitialState',
41
+ 'getDefaultProps',
42
+ 'getChildContext',
43
+ 'componentWillMount',
44
+ 'UNSAFE_componentWillMount',
45
+ 'componentDidMount',
46
+ 'componentWillReceiveProps',
47
+ 'UNSAFE_componentWillReceiveProps',
48
+ 'shouldComponentUpdate',
49
+ 'componentWillUpdate',
50
+ 'UNSAFE_componentWillUpdate',
51
+ 'componentDidUpdate',
52
+ 'componentWillUnmount',
53
+ 'componentDidCatch',
54
+ 'getSnapshotBeforeUpdate',
55
+ ],
56
+ },
57
+ ],
58
+ },
59
+ },
20
60
  ];
21
61
  exports.default = reactRecommendedConfig;
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const typescript_1 = __importDefault(require("../../configs/typescript"));
7
3
  const utils_1 = require("../../utils");
8
- const react = [
4
+ const reactTypescriptConfig = [
9
5
  {
10
6
  name: 'airbnb/config/typescript-react',
11
7
  rules: {
@@ -30,9 +26,4 @@ const react = [
30
26
  },
31
27
  },
32
28
  ];
33
- const typescriptRecommendedConfig = {
34
- base: Object.values(typescript_1.default),
35
- react,
36
- next: react,
37
- };
38
- exports.default = typescriptRecommendedConfig;
29
+ exports.default = reactTypescriptConfig;
@@ -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_import_x_1 = __importDefault(require("eslint-plugin-import-x"));
7
+ const importXPluginConfig = {
8
+ name: 'airbnb/config/plugin/import-x',
9
+ plugins: {
10
+ 'import-x': eslint_plugin_import_x_1.default,
11
+ },
12
+ };
13
+ exports.default = importXPluginConfig;
@@ -3,7 +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 importXPlugin_1 = __importDefault(require("../plugins/importXPlugin"));
6
7
  const nextPlugin_1 = __importDefault(require("../plugins/nextPlugin"));
8
+ const nodePlugin_1 = __importDefault(require("../plugins/nodePlugin"));
7
9
  const reactA11yPlugin_1 = __importDefault(require("../plugins/reactA11yPlugin"));
8
10
  const reactHooksPlugin_1 = __importDefault(require("../plugins/reactHooksPlugin"));
9
11
  const reactPlugin_1 = __importDefault(require("../plugins/reactPlugin"));
@@ -12,10 +14,12 @@ const typescriptEslintPlugin_1 = __importDefault(require("../plugins/typescriptE
12
14
  * as is given due to less size of index.d.ts
13
15
  */
14
16
  const plugins = {
15
- next: nextPlugin_1.default,
17
+ importX: importXPlugin_1.default,
18
+ node: nodePlugin_1.default,
16
19
  react: reactPlugin_1.default,
17
20
  reactA11y: reactA11yPlugin_1.default,
18
21
  reactHooks: reactHooksPlugin_1.default,
22
+ next: nextPlugin_1.default,
19
23
  typescriptEslint: typescriptEslintPlugin_1.default,
20
24
  };
21
25
  exports.default = plugins;
@@ -2,11 +2,11 @@
2
2
  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
- const ESLintPluginNext = require('@next/eslint-plugin-next');
5
+ const plugin = require('@next/eslint-plugin-next');
6
6
  const nextPlugin = {
7
7
  name: 'airbnb/config/plugin/next',
8
8
  plugins: {
9
- '@next/next': ESLintPluginNext,
9
+ '@next/next': plugin,
10
10
  },
11
11
  };
12
12
  exports.default = nextPlugin;
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const eslint_plugin_n_1 = __importDefault(require("eslint-plugin-n"));
7
- const reactPlugin = {
7
+ const nodePlugin = {
8
8
  name: 'airbnb/config/plugin/node',
9
9
  plugins: {
10
10
  n: eslint_plugin_n_1.default,
11
11
  },
12
12
  };
13
- exports.default = reactPlugin;
13
+ exports.default = nodePlugin;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  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 eslint_plugin_jsx_a11y_1 = __importDefault(require("eslint-plugin-jsx-a11y"));
6
7
  const reactA11yPlugin = {
7
8
  name: 'airbnb/config/plugin/react-a11y',
8
9
  plugins: {
9
- 'jsx-a11y': EsLintPluginJSXA11y,
10
+ 'jsx-a11y': eslint_plugin_jsx_a11y_1.default,
10
11
  },
11
12
  };
12
13
  exports.default = reactA11yPlugin;
@@ -1,44 +1,13 @@
1
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
- })();
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
35
5
  Object.defineProperty(exports, "__esModule", { value: true });
36
- // eslint-disable-next-line import-x/no-namespace
37
- const EsLintPluginReactHooks = __importStar(require("eslint-plugin-react-hooks"));
6
+ const eslint_plugin_react_hooks_1 = __importDefault(require("eslint-plugin-react-hooks"));
38
7
  const reactHooksPlugin = {
39
8
  name: 'airbnb/config/plugin/react-hooks',
40
9
  plugins: {
41
- 'react-hooks': EsLintPluginReactHooks,
10
+ 'react-hooks': eslint_plugin_react_hooks_1.default,
42
11
  },
43
12
  };
44
13
  exports.default = reactHooksPlugin;
@@ -3,17 +3,20 @@ 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 eslint_plugin_import_x_1 = require("eslint-plugin-import-x");
6
+ exports.deprecatedImportsRules = void 0;
7
7
  const globals_1 = __importDefault(require("globals"));
8
8
  const getDevDepsList_1 = __importDefault(require("../helpers/getDevDepsList"));
9
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: {
10
+ const importsRules = {
11
+ name: 'airbnb/config/import-x',
12
+ languageOptions: {
11
13
  globals: Object.assign({}, globals_1.default.es2015),
12
14
  parserOptions: {
13
- ecmaVersion: 6,
15
+ ecmaVersion: 2018,
14
16
  sourceType: 'module',
15
17
  },
16
- }, settings: {
18
+ },
19
+ settings: {
17
20
  'import-x/resolver': {
18
21
  node: {
19
22
  extensions: utils_1.jsExtensionsResolver,
@@ -22,7 +25,8 @@ const importsRules = Object.assign(Object.assign({}, eslint_plugin_import_x_1.fl
22
25
  'import-x/extensions': utils_1.jsExtensionsWithReact,
23
26
  'import-x/core-modules': [],
24
27
  'import-x/ignore': ['node_modules', String.raw `\.(coffee|scss|css|less|hbs|svg|json)$`],
25
- }, rules: {
28
+ },
29
+ rules: {
26
30
  // enforce a consistent style for type specifiers (inline or top-level)
27
31
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
28
32
  'import-x/consistent-type-specifier-style': 'off',
@@ -49,10 +53,6 @@ const importsRules = Object.assign(Object.assign({}, eslint_plugin_import_x_1.fl
49
53
  // in a single file.
50
54
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
51
55
  'import-x/group-exports': 'off',
52
- // disallow non-import statements appearing before import statements
53
- // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/imports-first.md
54
- // @deprecated: use `import-x/first`
55
- // 'import-x/imports-first': 'off',
56
56
  // Forbid modules to have too many dependencies
57
57
  // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
58
58
  'import-x/max-dependencies': 'off',
@@ -194,5 +194,14 @@ const importsRules = Object.assign(Object.assign({}, eslint_plugin_import_x_1.fl
194
194
  // this should not be enabled until this proposal has at least been *presented* to TC39.
195
195
  // At the moment, it's not a thing.
196
196
  'import-x/unambiguous': 'off',
197
- } });
197
+ },
198
+ };
199
+ exports.deprecatedImportsRules = {
200
+ name: 'airbnb/config/import-x/deprecated',
201
+ rules: {
202
+ // disallow non-import statements appearing before import statements
203
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/imports-first.md
204
+ 'import-x/imports-first': 'off',
205
+ },
206
+ };
198
207
  exports.default = importsRules;
@@ -3,22 +3,22 @@ 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("../configs/base"));
7
- const next_1 = __importDefault(require("../configs/next"));
8
- const node_1 = __importDefault(require("../configs/node"));
9
- const react_1 = __importDefault(require("../configs/react"));
10
- const typescript_1 = __importDefault(require("../configs/typescript"));
6
+ const config_1 = __importDefault(require("../configs/base/config"));
7
+ const config_2 = __importDefault(require("../configs/next/config"));
8
+ const config_3 = __importDefault(require("../configs/node/config"));
9
+ const config_4 = __importDefault(require("../configs/react/config"));
10
+ const config_5 = __importDefault(require("../configs/typescript/config"));
11
11
  const importsStrict_1 = __importDefault(require("../rules/importsStrict"));
12
12
  const reactStrict_1 = __importDefault(require("../rules/reactStrict"));
13
- const baseRules = Object.assign(Object.assign({}, base_1.default), { importsStrict: importsStrict_1.default, reactStrict: reactStrict_1.default });
13
+ const baseRules = Object.assign(Object.assign({}, config_1.default), { importsStrict: importsStrict_1.default, reactStrict: reactStrict_1.default });
14
14
  /**
15
15
  * as is given due to less size of index.d.ts
16
16
  */
17
17
  const rules = {
18
18
  base: baseRules,
19
- node: node_1.default,
20
- react: react_1.default,
21
- next: next_1.default,
22
- typescript: typescript_1.default,
19
+ node: config_3.default,
20
+ react: config_4.default,
21
+ next: config_2.default,
22
+ typescript: config_5.default,
23
23
  };
24
24
  exports.default = rules;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const nextBaseRules = {
4
+ name: 'airbnb/config/next/base',
5
+ rules: {
6
+ // Enforce font-display behavior with Google Fonts.
7
+ // https://nextjs.org/docs/messages/google-font-display
8
+ '@next/next/google-font-display': 'warn',
9
+ // Ensure preconnect is used with Google Fonts.
10
+ // https://nextjs.org/docs/messages/google-font-preconnect
11
+ '@next/next/google-font-preconnect': 'warn',
12
+ // Enforce id attribute on next/script components with inline content.
13
+ // https://nextjs.org/docs/messages/inline-script-id
14
+ '@next/next/inline-script-id': 'error',
15
+ // Prefer next/script component when using the inline script for Google Analytics.
16
+ // https://nextjs.org/docs/messages/next-script-for-ga
17
+ '@next/next/next-script-for-ga': 'warn',
18
+ // Prevent assignment to the module variable.
19
+ // https://nextjs.org/docs/messages/no-assign-module-variable
20
+ '@next/next/no-assign-module-variable': 'error',
21
+ // Prevent client components from being async functions.
22
+ // https://nextjs.org/docs/messages/no-async-client-component
23
+ '@next/next/no-async-client-component': 'warn',
24
+ // Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js.
25
+ // https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
26
+ '@next/next/no-before-interactive-script-outside-document': 'warn',
27
+ // Prevent manual stylesheet tags.
28
+ // https://nextjs.org/docs/messages/no-css-tags
29
+ '@next/next/no-css-tags': 'warn',
30
+ // Prevent importing next/document outside of pages/_document.js.
31
+ // https://nextjs.org/docs/messages/no-document-import-in-page
32
+ '@next/next/no-document-import-in-page': 'error',
33
+ // Prevent duplicate usage of <Head> in pages/_document.js.
34
+ // https://nextjs.org/docs/messages/no-duplicate-head
35
+ '@next/next/no-duplicate-head': 'error',
36
+ // Prevent usage of <head> element.
37
+ // https://nextjs.org/docs/messages/no-head-element
38
+ '@next/next/no-head-element': 'warn',
39
+ // Prevent usage of next/head in pages/_document.js.
40
+ // https://nextjs.org/docs/messages/no-head-import-in-document
41
+ '@next/next/no-head-import-in-document': 'error',
42
+ // Prevent usage of <a> elements to navigate to internal Next.js pages.
43
+ // https://nextjs.org/docs/messages/no-html-link-for-pages
44
+ '@next/next/no-html-link-for-pages': 'warn',
45
+ // Prevent usage of <img> element due to slower LCP and higher bandwidth.
46
+ // https://nextjs.org/docs/messages/no-img-element
47
+ '@next/next/no-img-element': 'warn',
48
+ // Prevent page-only custom fonts.
49
+ // https://nextjs.org/docs/messages/no-page-custom-font
50
+ '@next/next/no-page-custom-font': 'warn',
51
+ // Prevent usage of next/script in next/head component.
52
+ // https://nextjs.org/docs/messages/no-script-component-in-head
53
+ '@next/next/no-script-component-in-head': 'error',
54
+ // Prevent usage of styled-jsx in pages/_document.js.
55
+ // https://nextjs.org/docs/messages/no-styled-jsx-in-document
56
+ '@next/next/no-styled-jsx-in-document': 'warn',
57
+ // Prevent synchronous scripts.
58
+ // https://nextjs.org/docs/messages/no-sync-scripts
59
+ '@next/next/no-sync-scripts': 'warn',
60
+ // Prevent usage of <title> with Head component from next/document.
61
+ // https://nextjs.org/docs/messages/no-title-in-document-head
62
+ '@next/next/no-title-in-document-head': 'warn',
63
+ // Prevent common typos in Next.js's data fetching functions
64
+ // https://nextjs.org/docs/pages/building-your-application/data-fetching
65
+ '@next/next/no-typos': 'warn',
66
+ // Prevent duplicate polyfills from Polyfill.io.
67
+ // https://nextjs.org/docs/messages/no-unwanted-polyfillio
68
+ '@next/next/no-unwanted-polyfillio': 'warn',
69
+ },
70
+ };
71
+ exports.default = nextBaseRules;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const nextCoreWebVitalsRules = {
4
+ name: 'airbnb/config/next/core-web-vitals',
5
+ rules: {
6
+ // Prevent usage of `<a>` elements to navigate to internal Next.js pages.
7
+ '@next/next/no-html-link-for-pages': 'error',
8
+ // Prevent synchronous scripts.
9
+ '@next/next/no-sync-scripts': 'error',
10
+ },
11
+ };
12
+ exports.default = nextCoreWebVitalsRules;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deprecatedNodeBaseRules = void 0;
3
4
  const nodeBaseRules = {
4
5
  name: 'airbnb/config/node/base',
5
6
  rules: {
@@ -45,10 +46,6 @@ const nodeBaseRules = {
45
46
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-extraneous-require.md
46
47
  // Off due to 'import-x/no-extraneous-dependencies'
47
48
  'n/no-extraneous-require': 'off',
48
- // Disallow third-party modules which are hiding core modules
49
- // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-hide-core-modules.md
50
- // @deprecated
51
- 'n/no-hide-core-modules': 'off',
52
49
  // Disallow import declarations which import non-existence modules
53
50
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-missing-import.md
54
51
  // Off due to 'import-x/no-unresolved'
@@ -106,6 +103,15 @@ const nodeBaseRules = {
106
103
  // Require that process.exit() expressions use the same code path as throw
107
104
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/process-exit-as-throw.md
108
105
  'n/process-exit-as-throw': 'error',
106
+ },
107
+ };
108
+ exports.deprecatedNodeBaseRules = {
109
+ name: 'airbnb/config/node/base/deprecated',
110
+ rules: {
111
+ // Disallow third-party modules which are hiding core modules
112
+ // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-hide-core-modules.md
113
+ // @deprecated
114
+ 'n/no-hide-core-modules': 'off',
109
115
  // Require correct usage of hashbang
110
116
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/shebang.md
111
117
  // @deprecated
@@ -5,7 +5,7 @@ const nodeNoUnsupportedFeaturesRules = {
5
5
  rules: {
6
6
  // Disallow unsupported ECMAScript built-ins on the specified version
7
7
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/es-builtins.md
8
- 'n/no-unsupported-features/es-builtin': 'error',
8
+ 'n/no-unsupported-features/es-builtins': 'error',
9
9
  // Disallow unsupported ECMAScript syntax on the specified version
10
10
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-unsupported-features/es-syntax.md
11
11
  'n/no-unsupported-features/es-syntax': 'error',
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const reactA11yRules = {
4
- name: 'airbnb/config/react-a11y',
3
+ exports.deprecatedReactJsxA11yRules = void 0;
4
+ const reactJsxA11yRules = {
5
+ name: 'airbnb/config/react-jsx-a11y',
5
6
  languageOptions: {
6
7
  parserOptions: {
7
8
  ecmaFeatures: {
@@ -10,10 +11,6 @@ const reactA11yRules = {
10
11
  },
11
12
  },
12
13
  rules: {
13
- // ensure emoji are accessible
14
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/accessible-emoji.md
15
- // @deprecated
16
- // 'jsx-a11y/accessible-emoji': 'off',
17
14
  // Enforce that all elements that require alternative text have meaningful information
18
15
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-text.md
19
16
  'jsx-a11y/alt-text': [
@@ -134,10 +131,6 @@ const reactA11yRules = {
134
131
  depth: 25,
135
132
  },
136
133
  ],
137
- // require that JSX labels use "htmlFor"
138
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-for.md
139
- // @deprecated: replaced by `label-has-associated-control` rule
140
- // 'jsx-a11y/label-has-for': 'off',
141
134
  // require HTML element's lang prop to be valid
142
135
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/lang.md
143
136
  'jsx-a11y/lang': 'error',
@@ -214,10 +207,6 @@ const reactA11yRules = {
214
207
  allowExpressionValues: true,
215
208
  },
216
209
  ],
217
- // require onBlur instead of onChange
218
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-onchange.md
219
- // @deprecated
220
- // 'jsx-a11y/no-onchange': 'off',
221
210
  // ensure HTML elements do not specify redundant ARIA roles
222
211
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-redundant-roles.md
223
212
  'jsx-a11y/no-redundant-roles': [
@@ -253,4 +242,18 @@ const reactA11yRules = {
253
242
  'jsx-a11y/tabindex-no-positive': 'error',
254
243
  },
255
244
  };
256
- exports.default = reactA11yRules;
245
+ exports.deprecatedReactJsxA11yRules = {
246
+ name: 'airbnb/config/react-jsx-a11y/deprecated',
247
+ rules: {
248
+ // ensure emoji are accessible
249
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/accessible-emoji.md
250
+ 'jsx-a11y/accessible-emoji': 'off',
251
+ // require that JSX labels use "htmlFor"
252
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-for.md
253
+ 'jsx-a11y/label-has-for': 'off',
254
+ // require onBlur instead of onChange
255
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-onchange.md
256
+ 'jsx-a11y/no-onchange': 'off',
257
+ },
258
+ };
259
+ exports.default = reactJsxA11yRules;
@@ -3,9 +3,8 @@ 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
+ exports.deprecatedReactRules = void 0;
6
7
  const globals_1 = __importDefault(require("globals"));
7
- const style_1 = __importDefault(require("../rules/style"));
8
- const dangleRules = style_1.default.rules['no-underscore-dangle'];
9
8
  const reactRules = {
10
9
  name: 'airbnb/config/react',
11
10
  languageOptions: {
@@ -24,38 +23,6 @@ const reactRules = {
24
23
  // View link below for react rules documentation
25
24
  // https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules
26
25
  rules: {
27
- // Allow Redux devtools variable
28
- 'no-underscore-dangle': [
29
- dangleRules[0],
30
- Object.assign(Object.assign({}, dangleRules[1]), { allow: [...dangleRules[1].allow, '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'] }),
31
- ],
32
- // Specify whether double or single quotes should be used in JSX attributes
33
- // https://eslint.org/docs/rules/jsx-quotes
34
- 'jsx-quotes': ['error', 'prefer-double'],
35
- // Class Methods can be used in react
36
- 'class-methods-use-this': [
37
- 'error',
38
- {
39
- exceptMethods: [
40
- 'render',
41
- 'getInitialState',
42
- 'getDefaultProps',
43
- 'getChildContext',
44
- 'componentWillMount',
45
- 'UNSAFE_componentWillMount',
46
- 'componentDidMount',
47
- 'componentWillReceiveProps',
48
- 'UNSAFE_componentWillReceiveProps',
49
- 'shouldComponentUpdate',
50
- 'componentWillUpdate',
51
- 'UNSAFE_componentWillUpdate',
52
- 'componentDidUpdate',
53
- 'componentWillUnmount',
54
- 'componentDidCatch',
55
- 'getSnapshotBeforeUpdate',
56
- ],
57
- },
58
- ],
59
26
  // Enforces consistent naming for boolean props
60
27
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md
61
28
  'react/boolean-prop-naming': 'off',
@@ -314,17 +281,9 @@ const reactRules = {
314
281
  // Disallow JSX props spreading
315
282
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
316
283
  'react/jsx-props-no-spreading': 'off',
317
- // Enforce defaultProps declarations alphabetical sorting
318
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
319
- // @deprecated
320
- 'react/jsx-sort-default-props': 'off',
321
284
  // Enforce props alphabetical sorting
322
285
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
323
286
  'react/jsx-sort-props': 'off',
324
- // Enforce spaces before the closing bracket of self-closing JSX elements, Deprecated in favor of jsx-tag-spacing
325
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
326
- // @deprecated
327
- 'react/jsx-space-before-closing': 'off',
328
287
  // Validate whitespace in and around the JSX opening and closing brackets
329
288
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md
330
289
  'react/jsx-tag-spacing': [
@@ -609,4 +568,15 @@ const reactRules = {
609
568
  'react/void-dom-elements-no-children': 'error',
610
569
  },
611
570
  };
571
+ exports.deprecatedReactRules = {
572
+ name: 'airbnb/config/react/deprecated',
573
+ rules: {
574
+ // Enforce defaultProps declarations alphabetical sorting
575
+ // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
576
+ 'react/jsx-sort-default-props': 'off',
577
+ // Enforce spaces before the closing bracket of self-closing JSX elements, Deprecated in favor of jsx-tag-spacing
578
+ // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
579
+ 'react/jsx-space-before-closing': 'off',
580
+ },
581
+ };
612
582
  exports.default = reactRules;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-airbnb-extended",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Eslint Airbnb Config Extended",
5
5
  "keywords": [
6
6
  "eslint",
@@ -36,18 +36,15 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/confusing-browser-globals": "^1.0.3",
39
- "@types/eslint-plugin-jsx-a11y": "^6.10.0",
40
- "eslint": "^9.24.0",
41
- "eslint-plugin-import-x": "^4.10.2",
42
- "eslint-plugin-jsx-a11y": "^6.10.2",
43
- "eslint-plugin-react": "^7.37.5",
44
- "eslint-plugin-react-hooks": "^5.2.0",
45
- "tsc-alias": "^1.8.14",
39
+ "ts-node": "^10.9.2",
40
+ "tsc-alias": "^1.8.15",
41
+ "tsconfig-paths": "^4.2.0",
46
42
  "typescript": "^5.8.3",
47
43
  "typescript-eslint": "^8.29.1"
48
44
  },
49
45
  "peerDependencies": {
50
46
  "@next/eslint-plugin-next": "^15.2.4",
47
+ "@types/eslint-plugin-jsx-a11y": "^6.10.0",
51
48
  "eslint": "9.x",
52
49
  "eslint-import-resolver-typescript": "^4.3.1",
53
50
  "eslint-plugin-import-x": "4.x",
@@ -61,11 +58,17 @@
61
58
  "@next/eslint-plugin-next": {
62
59
  "optional": true
63
60
  },
64
- "eslint-import-resolver-typescript": {
61
+ "@types/eslint-plugin-jsx-a11y": {
65
62
  "optional": true
66
63
  },
64
+ "eslint": {
65
+ "optional": false
66
+ },
67
+ "eslint-import-resolver-typescript": {
68
+ "optional": false
69
+ },
67
70
  "eslint-plugin-jsx-a11y": {
68
- "optional": true
71
+ "optional": false
69
72
  },
70
73
  "eslint-plugin-n": {
71
74
  "optional": true
@@ -81,8 +84,10 @@
81
84
  }
82
85
  },
83
86
  "scripts": {
87
+ "prebuild": "pnpm check:updates && rm -rf ./dist",
84
88
  "build": "tsc -b",
85
89
  "postbuild": "tsc-alias",
90
+ "check:updates": "ts-node script/checkUpdates.ts",
86
91
  "typecheck": "tsc --noEmit"
87
92
  }
88
93
  }
@@ -1,10 +0,0 @@
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 nextRules = {
7
- name: 'airbnb/config/next',
8
- rules: Object.assign(Object.assign({}, ESLintPluginNext.configs.recommended.rules), ESLintPluginNext.configs['core-web-vitals'].rules),
9
- };
10
- exports.default = nextRules;
File without changes