Switch ESLint config to eslint-config-next/core-web-vitals
Replaces @eslint/eslintrc and FlatCompat with eslint-config-next/core-web-vitals for ESLint configuration. Updates linting scripts in package.json to use eslint directly instead of next lint. Removes @eslint/eslintrc from devDependencies.
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
import { FlatCompat } from "@eslint/eslintrc";
|
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
const compat = new FlatCompat({
|
|
||||||
baseDirectory: import.meta.dirname,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default tseslint.config(
|
export default tseslint.config(
|
||||||
{
|
{
|
||||||
ignores: [".next"],
|
ignores: [".next"],
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "next build --webpack",
|
"build": "next build --webpack",
|
||||||
"check": "next lint && tsc --noEmit",
|
"check": "eslint . && tsc --noEmit",
|
||||||
"dev": "next dev --webpack",
|
"dev": "next dev --webpack",
|
||||||
"dev:server": "node server.js",
|
"dev:server": "node server.js",
|
||||||
"dev:next": "next dev --webpack",
|
"dev:next": "next dev --webpack",
|
||||||
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
||||||
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
|
||||||
"lint": "next lint",
|
"lint": "eslint .",
|
||||||
"lint:fix": "next lint --fix",
|
"lint:fix": "eslint --fix .",
|
||||||
"preview": "next build && next start",
|
"preview": "next build && next start",
|
||||||
"start": "node server.js",
|
"start": "node server.js",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
@@ -61,7 +61,6 @@
|
|||||||
"zod": "^4.1.13"
|
"zod": "^4.1.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3.3.1",
|
|
||||||
"@tailwindcss/postcss": "^4.1.17",
|
"@tailwindcss/postcss": "^4.1.17",
|
||||||
"@testing-library/jest-dom": "^6.9.1",
|
"@testing-library/jest-dom": "^6.9.1",
|
||||||
"@testing-library/react": "^16.3.0",
|
"@testing-library/react": "^16.3.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user