-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
33 lines (30 loc) · 946 Bytes
/
Copy patheslint.config.mjs
File metadata and controls
33 lines (30 loc) · 946 Bytes
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
// Flat ESLint config (ESLint 9) — Next.js rules via FlatCompat because
// eslint-config-next still ships eslintrc-style shareable configs.
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
});
const config = [
{
// Generated code (Prisma client, Next build output + type stubs) is not
// ours to lint.
ignores: [
"lib/generated/**",
".next/**",
"node_modules/**",
"next-env.d.ts",
],
},
...compat.extends("next/core-web-vitals", "next/typescript"),
{
// Plain-Node CommonJS scripts (Docker HEALTHCHECK, one-off seeds) —
// require() is correct there.
files: ["healthcheck.js", "scripts/**/*.mjs", "scripts/**/*.js"],
rules: {
"@typescript-eslint/no-require-imports": "off",
},
},
];
export default config;