@10stars/config 13.1.2 → 13.2.1
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.ts +15 -0
- package/package.json +3 -4
package/eslint.config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { builtinModules } from "node:module"
|
|
2
2
|
|
|
3
3
|
import eslint from "@eslint/js"
|
|
4
|
+
import eslintReact from "@eslint-react/eslint-plugin"
|
|
4
5
|
import stylistic from "@stylistic/eslint-plugin"
|
|
5
6
|
import type { Linter } from "eslint"
|
|
6
7
|
import eslintConfigPrettier from "eslint-config-prettier"
|
|
@@ -103,8 +104,21 @@ const addPluginReact = () =>
|
|
|
103
104
|
const addPluginReactHooksConfigurable = () =>
|
|
104
105
|
({
|
|
105
106
|
plugins: { "react-hooks-configurable": reactHooksConfigurable },
|
|
107
|
+
rules: {
|
|
108
|
+
"react-hooks-configurable/rules-of-hooks": 2,
|
|
109
|
+
},
|
|
106
110
|
}) satisfies Linter.Config
|
|
107
111
|
|
|
112
|
+
const addPluginReactExtra = () =>
|
|
113
|
+
[
|
|
114
|
+
eslintReact.configs["recommended-typescript"],
|
|
115
|
+
{
|
|
116
|
+
rules: {
|
|
117
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml": 0, // we use for specific cases
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
] satisfies Linter.Config[]
|
|
121
|
+
|
|
108
122
|
const addPluginImport = () =>
|
|
109
123
|
[
|
|
110
124
|
importPlugin.flatConfigs.recommended,
|
|
@@ -162,6 +176,7 @@ export default tseslint.config(
|
|
|
162
176
|
...addPluginRegexp(),
|
|
163
177
|
addPluginNoRelativeImportPaths(),
|
|
164
178
|
...addPluginReact(),
|
|
179
|
+
...addPluginReactExtra(),
|
|
165
180
|
addPluginReactHooksConfigurable(),
|
|
166
181
|
...addPluginImport(),
|
|
167
182
|
addPluginSimpleImportSort(),
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"name": "@10stars/config",
|
|
7
|
-
"version": "13.1
|
|
7
|
+
"version": "13.2.1",
|
|
8
8
|
"author": "10stars.dev <web@alexandrov.co> (https://alexandrov.co)",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"bin": {
|
|
@@ -25,15 +25,14 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@commitlint/cli": "^19.0.0",
|
|
27
27
|
"@commitlint/config-conventional": "^19.0.0",
|
|
28
|
+
"@eslint/js": "^9.0.0",
|
|
29
|
+
"@eslint-react/eslint-plugin": "^1.30.0",
|
|
28
30
|
"@stylistic/eslint-plugin": "^4.0.0",
|
|
29
31
|
"@types/lodash": "^4.0.0",
|
|
30
32
|
"@types/node": "^22.0.0",
|
|
31
33
|
"@types/react": "^18.0.0",
|
|
32
34
|
"esbuild": "~0.25.0",
|
|
33
35
|
"tsx": "4.11.2",
|
|
34
|
-
"@eslint/compat": "^1.0.0",
|
|
35
|
-
"@eslint/eslintrc": "^3.0.0",
|
|
36
|
-
"@eslint/js": "^9.0.0",
|
|
37
36
|
"eslint-config-prettier": "^10.0.0",
|
|
38
37
|
"eslint-plugin-import": "^2.0.0",
|
|
39
38
|
"eslint-plugin-no-relative-import-paths": "^1.5.4",
|