1- import { fixupPluginRules } from '@eslint/compat' ;
21import { FlatCompat } from '@eslint/eslintrc' ;
32import js from '@eslint/js' ;
43import importX from 'eslint-plugin-import-x' ;
@@ -9,27 +8,16 @@ import storybook from 'eslint-plugin-storybook';
98import tseslint from 'typescript-eslint' ;
109
1110const compat = new FlatCompat ( ) ;
12- const pluginToPatch = '@next/next' ;
1311
14- const compatConfig = compat
15- . config ( {
16- extends : [
17- // https://github.com/vercel/next.js/discussions/49337
18- 'plugin:@next/eslint-plugin-next/core-web-vitals' ,
19-
20- // https://github.com/facebook/react/issues/28313
21- 'plugin:react-hooks/recommended' ,
22- ] ,
23- } )
24- . map ( entry => {
25- if ( Object . hasOwn ( entry . plugins , pluginToPatch ) ) {
26- entry . plugins [ pluginToPatch ] = fixupPluginRules (
27- entry . plugins [ pluginToPatch ]
28- ) ;
29- }
12+ const compatConfig = compat . config ( {
13+ extends : [
14+ // https://github.com/vercel/next.js/discussions/49337
15+ 'plugin:@next/eslint-plugin-next/core-web-vitals' ,
3016
31- return entry ;
32- } ) ;
17+ // https://github.com/facebook/react/issues/28313
18+ 'plugin:react-hooks/recommended' ,
19+ ] ,
20+ } ) ;
3321
3422export default tseslint . config (
3523 {
@@ -58,6 +46,7 @@ export default tseslint.config(
5846 'no-relative-import-paths' : noRelativeImportPaths ,
5947 } ,
6048 rules : {
49+ '@next/next/no-duplicate-head' : 'off' ,
6150 '@typescript-eslint/array-type' : [ 'error' , { default : 'generic' } ] ,
6251 '@typescript-eslint/consistent-type-imports' : 'error' ,
6352 '@typescript-eslint/no-require-imports' : 'off' ,
0 commit comments