@10stars/config 13.2.0 → 13.2.2
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 +21 -1
- package/package.json +1 -1
package/eslint.config.ts
CHANGED
|
@@ -109,6 +109,25 @@ const addPluginReactHooksConfigurable = () =>
|
|
|
109
109
|
},
|
|
110
110
|
}) satisfies Linter.Config
|
|
111
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
|
+
|
|
122
|
+
const addStorybookOverrides = () =>
|
|
123
|
+
({
|
|
124
|
+
files: ["**/*stories.tsx"],
|
|
125
|
+
rules: {
|
|
126
|
+
"react/jsx-no-bind": 0, // allow inline functions
|
|
127
|
+
"@eslint-react/no-array-index-key": 0, // allow array index as key
|
|
128
|
+
},
|
|
129
|
+
}) satisfies Linter.Config
|
|
130
|
+
|
|
112
131
|
const addPluginImport = () =>
|
|
113
132
|
[
|
|
114
133
|
importPlugin.flatConfigs.recommended,
|
|
@@ -166,7 +185,7 @@ export default tseslint.config(
|
|
|
166
185
|
...addPluginRegexp(),
|
|
167
186
|
addPluginNoRelativeImportPaths(),
|
|
168
187
|
...addPluginReact(),
|
|
169
|
-
|
|
188
|
+
...addPluginReactExtra(),
|
|
170
189
|
addPluginReactHooksConfigurable(),
|
|
171
190
|
...addPluginImport(),
|
|
172
191
|
addPluginSimpleImportSort(),
|
|
@@ -304,4 +323,5 @@ export default tseslint.config(
|
|
|
304
323
|
"@typescript-eslint/no-useless-constructor": 1,
|
|
305
324
|
},
|
|
306
325
|
},
|
|
326
|
+
addStorybookOverrides(),
|
|
307
327
|
)
|