Skip to content

Commit 51796b7

Browse files
committed
chore: silence TS error for @next/eslint-plugin-next in eslint config
1 parent c1ca5c7 commit 51796b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

eslint.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { fileURLToPath } from 'url';
1616
*/
1717

1818
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url));
19+
const nextPluginAny = nextPlugin as any;
1920

2021
export default defineConfig(
2122
// register all of the plugins up-front
@@ -26,7 +27,7 @@ export default defineConfig(
2627
'simple-import-sort': simpleImportSortPlugin,
2728
'@typescript-eslint': tsEslint.plugin,
2829
react,
29-
'@next/next': nextPlugin,
30+
'@next/next': nextPluginAny,
3031
},
3132
},
3233
{
@@ -106,8 +107,8 @@ export default defineConfig(
106107
},
107108
],
108109
// Next.js
109-
...nextPlugin.configs.recommended.rules,
110-
...nextPlugin.configs['core-web-vitals'].rules,
110+
...nextPluginAny.configs.recommended.rules,
111+
...nextPluginAny.configs['core-web-vitals'].rules,
111112
'@next/next/no-sync-scripts': 'warn',
112113
},
113114
},

0 commit comments

Comments
 (0)