fix eslint
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"next/core-web-vitals",
|
||||
"next/typescript"
|
||||
]
|
||||
}
|
||||
@@ -28,4 +28,4 @@ jobs:
|
||||
run: pnpm install
|
||||
|
||||
- name: Run check
|
||||
run: pnpm run check
|
||||
run: pnpm run lint
|
||||
|
||||
37
eslint.config.mjs
Normal file
37
eslint.config.mjs
Normal file
@@ -0,0 +1,37 @@
|
||||
// @ts-check
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import nextVitals from "eslint-config-next/core-web-vitals";
|
||||
import nextTs from "eslint-config-next/typescript";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
const eslintConfig = defineConfig([
|
||||
// Next.js core-web-vitals and TypeScript configs
|
||||
...nextVitals,
|
||||
...nextTs,
|
||||
// Add strict TypeScript rules on top
|
||||
...tseslint.configs.strictTypeChecked,
|
||||
...tseslint.configs.stylisticTypeChecked,
|
||||
// Configure TypeScript parser options
|
||||
{
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
// Override default ignores of eslint-config-next
|
||||
globalIgnores([
|
||||
// Default ignores of eslint-config-next:
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"next-env.d.ts",
|
||||
// Additional ignores:
|
||||
"*.mjs",
|
||||
"tailwind.config.ts",
|
||||
]),
|
||||
]);
|
||||
|
||||
export default eslintConfig;
|
||||
@@ -6,9 +6,10 @@
|
||||
"dev": "next dev --turbopack",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"check": "next lint && npx tsc --noEmit"
|
||||
"lint": "next typegen && eslint . && npx tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@hookform/resolvers": "^5.1.1",
|
||||
"@radix-ui/react-label": "^2.1.7",
|
||||
"@radix-ui/react-popover": "^1.1.14",
|
||||
@@ -42,7 +43,8 @@
|
||||
"postcss": "8.5.6",
|
||||
"tailwindcss": "4.1.17",
|
||||
"turbo": "2.6.1",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "^8.46.4"
|
||||
},
|
||||
"packageManager": "pnpm@10.21.0",
|
||||
"pnpm": {
|
||||
|
||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -12,6 +12,9 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@eslint/js':
|
||||
specifier: ^9.39.1
|
||||
version: 9.39.1
|
||||
'@hookform/resolvers':
|
||||
specifier: ^5.1.1
|
||||
version: 5.2.2(react-hook-form@7.66.0(react@19.2.0))
|
||||
@@ -109,6 +112,9 @@ importers:
|
||||
typescript:
|
||||
specifier: 5.9.3
|
||||
version: 5.9.3
|
||||
typescript-eslint:
|
||||
specifier: ^8.46.4
|
||||
version: 8.46.4(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3)
|
||||
|
||||
packages:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
@@ -22,6 +22,13 @@
|
||||
},
|
||||
"target": "ES2023"
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "event-dates.json"],
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
"event-dates.json",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user