Upgrade to ESLint 9 for Next.js 16 compatibility
Next.js 16 requires ESLint 9 for proper flat config support. This commit: - Upgrades eslint from ^8 to ^9 - Migrates from .eslintrc.json to eslint.config.mjs (flat config) - Updates lint script to use eslint directly (next lint removed in Next.js 16) - Adds tsconfig.json includes for Next.js 16 dev types - Fixes layout.tsx to use proper theme CSS link tags Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
|
||||
|
||||
const eslintConfig = defineConfig([
|
||||
...nextCoreWebVitals,
|
||||
globalIgnores(['.next/**', 'dist/**', 'node_modules/**']),
|
||||
{
|
||||
rules: {
|
||||
'notice/notice': 'off',
|
||||
'react/forbid-elements': 'off',
|
||||
'jsx-a11y/alt-text': 'off',
|
||||
'@next/next/no-css-tags': 'off',
|
||||
'react-hooks/set-state-in-effect': 'warn',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
export default eslintConfig;
|
||||
Reference in New Issue
Block a user