@orderly.network/eslint-config 2.5.3 → 2.6.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/CHANGELOG.md +13 -0
- package/index.mjs +10 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
package/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
|
4
4
|
import monorepoCop from "eslint-plugin-monorepo-cop";
|
|
5
5
|
import reactPlugin from "eslint-plugin-react";
|
|
6
6
|
import * as reactHooks from "eslint-plugin-react-hooks";
|
|
7
|
+
import reactRefresh from "eslint-plugin-react-refresh";
|
|
7
8
|
import tailwind from "eslint-plugin-tailwindcss";
|
|
8
9
|
import { defineConfig, globalIgnores } from "eslint/config";
|
|
9
10
|
import globals from "globals";
|
|
@@ -103,6 +104,7 @@ export default defineConfig([
|
|
|
103
104
|
"@stylistic": stylistic,
|
|
104
105
|
"monorepo-cop": monorepoCop,
|
|
105
106
|
"react-hooks": reactHooks,
|
|
107
|
+
"react-refresh": reactRefresh,
|
|
106
108
|
},
|
|
107
109
|
rules: {
|
|
108
110
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
@@ -131,7 +133,14 @@ export default defineConfig([
|
|
|
131
133
|
|
|
132
134
|
// https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks#flat-config-eslintconfigjsts-1
|
|
133
135
|
"react-hooks/rules-of-hooks": "warn",
|
|
134
|
-
|
|
136
|
+
// it cause too many false positives, use eslint-plugin-react-hooks-configurable won't solve the problem either
|
|
137
|
+
// "react-hooks/exhaustive-deps": "warn",
|
|
138
|
+
|
|
139
|
+
// https://github.com/ArnaudBarre/eslint-plugin-react-refresh?tab=readme-ov-file#without-config
|
|
140
|
+
"react-refresh/only-export-components": [
|
|
141
|
+
"warn",
|
|
142
|
+
{ allowConstantExport: true },
|
|
143
|
+
],
|
|
135
144
|
},
|
|
136
145
|
},
|
|
137
146
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderly.network/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"main": "index.mjs",
|
|
5
5
|
"module": "index.mjs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"eslint-plugin-monorepo-cop": "^1.0.2",
|
|
18
18
|
"eslint-plugin-react": "^7.37.5",
|
|
19
19
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
20
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
20
21
|
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
21
22
|
"globals": "^16.0.0",
|
|
22
23
|
"typescript-eslint": "^8.31.0"
|