Update EsLint packages and other dependencies. Remove Next.js FlatConfig. Remove typescript-eslint (included by Next.js) (#400)
This commit is contained in:
committed by
GitHub
parent
fc8db0b128
commit
c74beb27ac
@@ -1,14 +1,12 @@
|
||||
import { defineConfig } from '@eslint/config-helpers';
|
||||
import eslint from '@eslint/js';
|
||||
import turbo from 'eslint-config-turbo';
|
||||
import tsEsLint from 'typescript-eslint';
|
||||
|
||||
import nextConfig from './nextjs.js';
|
||||
import { nextEslintConfig, rules as nextjsEslintRules } from './nextjs.js';
|
||||
|
||||
export default defineConfig(
|
||||
eslint.configs.recommended,
|
||||
tsEsLint.configs.recommended,
|
||||
nextConfig,
|
||||
...nextEslintConfig,
|
||||
{
|
||||
plugins: {
|
||||
turbo,
|
||||
@@ -26,6 +24,8 @@ export default defineConfig(
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
...nextjsEslintRules,
|
||||
'no-undef': 'off',
|
||||
'@typescript-eslint/triple-slash-reference': 'off',
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'import/no-anonymous-default-export': 'off',
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
import { FlatCompat } from '@eslint/eslintrc';
|
||||
import nextCoreVitals from 'eslint-config-next/core-web-vitals';
|
||||
import nextTypescript from 'eslint-config-next/typescript';
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: import.meta.dirname,
|
||||
});
|
||||
const nextEslintConfig = [...nextCoreVitals, ...nextTypescript];
|
||||
|
||||
const nextEslintConfig = [
|
||||
...compat.config({
|
||||
extends: ['next/core-web-vitals', 'next/typescript'],
|
||||
rules: {
|
||||
'@next/next/no-html-link-for-pages': 'off',
|
||||
'no-undef': 'off',
|
||||
},
|
||||
}),
|
||||
];
|
||||
const rules = {
|
||||
'@next/next/no-html-link-for-pages': 'off',
|
||||
};
|
||||
|
||||
export default nextEslintConfig;
|
||||
export { nextEslintConfig, rules };
|
||||
|
||||
@@ -13,17 +13,14 @@
|
||||
"format": "prettier --check \"**/*.{js,json}\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "16.0.0-beta.0",
|
||||
"@next/eslint-plugin-next": "16.0.0",
|
||||
"@types/eslint": "9.6.1",
|
||||
"eslint-config-next": "16.0.0-beta.0",
|
||||
"eslint-config-turbo": "^2.5.8",
|
||||
"typescript-eslint": "8.46.2"
|
||||
"eslint-config-next": "16.0.0",
|
||||
"eslint-config-turbo": "^2.5.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"eslint": "^9.38.0",
|
||||
"typescript": "^5.9.3"
|
||||
"eslint": "^9.38.0"
|
||||
},
|
||||
"prettier": "@kit/prettier-config"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user