@open-turo/eslint-config-react 17.0.12 → 17.0.13
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/index.cjs
CHANGED
|
@@ -5,8 +5,8 @@ const jsxA11yPlugin = require("eslint-plugin-jsx-a11y");
|
|
|
5
5
|
const reactPlugin = require("eslint-plugin-react");
|
|
6
6
|
const reactCompilerPlugin = require("eslint-plugin-react-compiler");
|
|
7
7
|
const reactHooksPlugin = require("eslint-plugin-react-hooks");
|
|
8
|
+
const eslintConfig = require("eslint/config");
|
|
8
9
|
const globals = require("globals");
|
|
9
|
-
const tseslint = require("typescript-eslint");
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @param {object} options ESLint configuration options
|
|
@@ -14,7 +14,7 @@ const tseslint = require("typescript-eslint");
|
|
|
14
14
|
* @returns Configuration Array
|
|
15
15
|
*/
|
|
16
16
|
module.exports = function config(options = {}) {
|
|
17
|
-
return
|
|
17
|
+
return eslintConfig.defineConfig(
|
|
18
18
|
{
|
|
19
19
|
extends: turoConfig({
|
|
20
20
|
...options.turo,
|
|
@@ -75,6 +75,7 @@ module.exports = function config(options = {}) {
|
|
|
75
75
|
reactPlugin.configs.flat["jsx-runtime"],
|
|
76
76
|
jsxA11yPlugin.flatConfigs.recommended,
|
|
77
77
|
reactCompilerPlugin.configs.recommended,
|
|
78
|
+
reactHooksPlugin.configs.recommended,
|
|
78
79
|
],
|
|
79
80
|
files: ["**/*.{jsx,tsx,mjsx,cjsx}"],
|
|
80
81
|
languageOptions: {
|
|
@@ -86,7 +87,6 @@ module.exports = function config(options = {}) {
|
|
|
86
87
|
"react-hooks": reactHooksPlugin,
|
|
87
88
|
},
|
|
88
89
|
rules: {
|
|
89
|
-
...reactHooksPlugin.configs.recommended.rules,
|
|
90
90
|
"jsx-a11y/anchor-is-valid": [
|
|
91
91
|
"warn",
|
|
92
92
|
{
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
8
8
|
"eslint-plugin-react": "7.37.5",
|
|
9
9
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
10
|
-
"eslint-plugin-react-hooks": "
|
|
10
|
+
"eslint-plugin-react-hooks": "6.1.1",
|
|
11
11
|
"globals": "16.4.0",
|
|
12
12
|
"typescript-eslint": "8.46.0"
|
|
13
13
|
},
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"repository": "https://github.com/open-turo/eslint-config-react",
|
|
52
|
-
"version": "17.0.
|
|
52
|
+
"version": "17.0.13"
|
|
53
53
|
}
|
package/recommended.cjs
CHANGED
|
@@ -6,7 +6,7 @@ module.exports = {
|
|
|
6
6
|
"@open-turo/eslint-config-typescript/recommended",
|
|
7
7
|
"plugin:react/recommended",
|
|
8
8
|
"plugin:react/jsx-runtime",
|
|
9
|
-
"plugin:react-hooks/recommended",
|
|
9
|
+
"plugin:react-hooks/recommended-legacy",
|
|
10
10
|
"plugin:jsx-a11y/recommended",
|
|
11
11
|
],
|
|
12
12
|
ignorePatterns: ["babel.config.js"],
|
|
Binary file
|