@rpcbase/eslint-config 0.24.0 → 0.26.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.
- package/eslint.config.js +10 -1
- package/package.json +2 -1
package/eslint.config.js
CHANGED
|
@@ -8,11 +8,12 @@ import pluginReact from "eslint-plugin-react"
|
|
|
8
8
|
import reactRefresh from "eslint-plugin-react-refresh"
|
|
9
9
|
import pluginPlaywright from "eslint-plugin-playwright"
|
|
10
10
|
import pluginVitest from "@vitest/eslint-plugin"
|
|
11
|
+
import pluginReactHooks from "eslint-plugin-react-hooks"
|
|
11
12
|
|
|
12
13
|
import noLoneTextNode from "./src/rules/no-lone-text-node"
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
/** @type {import(
|
|
16
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
16
17
|
export const config = [
|
|
17
18
|
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
|
18
19
|
gitignore(),
|
|
@@ -128,4 +129,12 @@ export const config = [
|
|
|
128
129
|
...pluginPlaywright.configs["flat/recommended"].rules,
|
|
129
130
|
},
|
|
130
131
|
},
|
|
132
|
+
{
|
|
133
|
+
files: ["**/*.{js,ts,tsx}"],
|
|
134
|
+
plugins: { "react-hooks": pluginReactHooks },
|
|
135
|
+
rules: {
|
|
136
|
+
"react-hooks/rules-of-hooks": "error",
|
|
137
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
138
|
+
}
|
|
139
|
+
},
|
|
131
140
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"eslint-plugin-import": "2.31.0",
|
|
42
42
|
"eslint-plugin-playwright": "2.2.0",
|
|
43
43
|
"eslint-plugin-react": "7.37.5",
|
|
44
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
44
45
|
"eslint-plugin-react-refresh": "0.4.20",
|
|
45
46
|
"globals": "16.2.0",
|
|
46
47
|
"typescript-eslint": "8.35.0"
|