eslint-config-decent 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -502,10 +502,18 @@ const configs$4 = {
502
502
  };
503
503
 
504
504
  const base$3 = {
505
+ settings: {
506
+ react: {
507
+ version: "detect"
508
+ }
509
+ },
510
+ languageOptions: {
511
+ ...react__default.configs["jsx-runtime"].languageOptions
512
+ },
505
513
  plugins: {
506
514
  "jsx-a11y": a11y__default,
507
515
  react: react__default,
508
- "react-hooks": reactHooks__default,
516
+ "react-hooks": compat.fixupPluginRules(reactHooks__default),
509
517
  "testing-library": compat.fixupPluginRules(testingLibrary__default)
510
518
  },
511
519
  rules: {
@@ -515,6 +523,7 @@ const base$3 = {
515
523
  "jsx-a11y/aria-unsupported-elements": "error",
516
524
  "jsx-a11y/role-has-required-aria-props": "error",
517
525
  ...react__default.configs.recommended.rules,
526
+ ...react__default.configs["jsx-runtime"].rules,
518
527
  "react/default-props-match-prop-types": "error",
519
528
  "react/display-name": ["error", { ignoreTranspilerName: false }],
520
529
  "react/forbid-foreign-prop-types": ["error", { allowInPropTypes: true }],
package/dist/index.mjs CHANGED
@@ -483,10 +483,18 @@ const configs$4 = {
483
483
  };
484
484
 
485
485
  const base$3 = {
486
+ settings: {
487
+ react: {
488
+ version: "detect"
489
+ }
490
+ },
491
+ languageOptions: {
492
+ ...react.configs["jsx-runtime"].languageOptions
493
+ },
486
494
  plugins: {
487
495
  "jsx-a11y": a11y,
488
496
  react,
489
- "react-hooks": reactHooks,
497
+ "react-hooks": fixupPluginRules(reactHooks),
490
498
  "testing-library": fixupPluginRules(testingLibrary)
491
499
  },
492
500
  rules: {
@@ -496,6 +504,7 @@ const base$3 = {
496
504
  "jsx-a11y/aria-unsupported-elements": "error",
497
505
  "jsx-a11y/role-has-required-aria-props": "error",
498
506
  ...react.configs.recommended.rules,
507
+ ...react.configs["jsx-runtime"].rules,
499
508
  "react/default-props-match-prop-types": "error",
500
509
  "react/display-name": ["error", { ignoreTranspilerName: false }],
501
510
  "react/forbid-foreign-prop-types": ["error", { allowInPropTypes: true }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-decent",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "A decent ESLint configuration",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/src/react.ts CHANGED
@@ -6,10 +6,18 @@ import reactHooks from 'eslint-plugin-react-hooks';
6
6
  import testingLibrary from 'eslint-plugin-testing-library';
7
7
 
8
8
  const base: TSESLint.FlatConfig.Config = {
9
+ settings: {
10
+ react: {
11
+ version: 'detect',
12
+ },
13
+ },
14
+ languageOptions: {
15
+ ...react.configs['jsx-runtime'].languageOptions,
16
+ },
9
17
  plugins: {
10
18
  'jsx-a11y': a11y,
11
19
  react,
12
- 'react-hooks': reactHooks,
20
+ 'react-hooks': fixupPluginRules(reactHooks) as typeof reactHooks,
13
21
  'testing-library': fixupPluginRules(testingLibrary) as typeof testingLibrary,
14
22
  },
15
23
  rules: {
@@ -20,6 +28,7 @@ const base: TSESLint.FlatConfig.Config = {
20
28
  'jsx-a11y/role-has-required-aria-props': 'error',
21
29
 
22
30
  ...react.configs.recommended.rules,
31
+ ...react.configs['jsx-runtime'].rules,
23
32
  'react/default-props-match-prop-types': 'error',
24
33
  'react/display-name': ['error', { ignoreTranspilerName: false }],
25
34
  'react/forbid-foreign-prop-types': ['error', { allowInPropTypes: true }],
@@ -2,7 +2,9 @@ declare module 'eslint-plugin-react' {
2
2
  import type { TSESLint } from '@typescript-eslint/utils';
3
3
  const value: TSESLint.FlatConfig.Plugin & {
4
4
  configs: {
5
+ all: TSESLint.FlatConfig.Config;
5
6
  recommended: TSESLint.FlatConfig.Config;
7
+ 'jsx-runtime': TSESLint.FlatConfig.Config;
6
8
  };
7
9
  };
8
10
  export default value;