-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mts
More file actions
61 lines (58 loc) · 1.4 KB
/
eslint.config.mts
File metadata and controls
61 lines (58 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { FlatCompat } from "@eslint/eslintrc"
import js from "@eslint/js"
import tailwindcss from "eslint-plugin-tailwindcss"
import unusedImports from "eslint-plugin-unused-imports"
import { defineConfig } from "eslint/config"
const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
})
export default defineConfig([
{
ignores: [
".next/**",
".open-next/**",
".wrangler/**",
"node_modules/**",
"out/**",
"public/**",
".contentlayer/**",
"drizzle/**",
"contentlayer/**",
"next-env.d.ts",
"cloudflare-env.d.ts",
"worktrees/**",
],
},
js.configs.recommended,
...compat.config({
extends: ["next/core-web-vitals", "next/typescript", "prettier"],
}),
...tailwindcss.configs["flat/recommended"],
{
plugins: {
"unused-imports": unusedImports,
},
rules: {
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"import/no-unresolved": [
"error",
{
ignore: ["node_modules", "contentlayer/generated"],
},
],
"react-hooks/exhaustive-deps": "error",
},
settings: {
"import/ignore": ["node_modules", ".contentlayer", ".next"],
},
},
])