@@ -18,7 +18,8 @@ import globals from "globals";
18
18
// @ts -expect-error no types for this
19
19
import pluginJsxA11y from "eslint-plugin-jsx-a11y" ;
20
20
// @ts -expect-error no types for this
21
- import PluginNext from "@next/eslint-plugin-next" ;
21
+ import pluginNext from "@next/eslint-plugin-next" ;
22
+ import pluginStorybook from 'eslint-plugin-storybook'
22
23
23
24
// re-export
24
25
export {
@@ -34,6 +35,8 @@ export {
34
35
pluginReactHooks ,
35
36
pluginTypescriptEslint ,
36
37
pluginJsxA11y ,
38
+ pluginNext ,
39
+ pluginStorybook ,
37
40
} ;
38
41
39
42
const flatCompat = new eslintrc . FlatCompat ( ) ;
@@ -123,7 +126,7 @@ export const react = () => [
123
126
'jsx-a11y' : pluginJsxA11y ,
124
127
} ,
125
128
rules : {
126
- ...pluginReact . configs . flat . recommended . rules as Linter . RulesRecord ,
129
+ ...pluginReact . configs . flat ! . recommended . rules as Linter . RulesRecord ,
127
130
"react/self-closing-comp" : "error" ,
128
131
"react/react-in-jsx-scope" : "off" ,
129
132
"react/jsx-no-target-blank" : "off" ,
@@ -159,10 +162,10 @@ export const react = () => [
159
162
] satisfies Linter . Config [ ] ;
160
163
161
164
/**
162
- * NOTE: eslint-plugin-nextがv9対応していないが @next/eslint-plugin-nextを利用して回避する
165
+ * NOTE: eslint-plugin-nextのリリースが頻繁ではないので @next/eslint-plugin-nextを利用して回避する
163
166
*/
164
167
export const nextJs = ( ) => {
165
- const patchedPluginNext = compat . fixupPluginRules ( PluginNext ) ;
168
+ const patchedPluginNext = compat . fixupPluginRules ( pluginNext ) ;
166
169
167
170
return [
168
171
// ...compat.fixupConfigRules(
@@ -182,9 +185,7 @@ export const nextJs = () => {
182
185
} ;
183
186
184
187
export const storybook = ( ) => [
185
- ...compat . fixupConfigRules (
186
- flatCompat . extends ( "plugin:storybook/recommended" )
187
- ) ,
188
+ ...pluginStorybook . configs [ 'flat/recommended' ] ,
188
189
] ;
189
190
190
191
export const imports = ( ) => [
0 commit comments