Skip to content

Commit 035aba2

Browse files
committed
Enhance ESLint configuration to exclude generated files from linting
- Import FlatCompat for compatibility with ESLint configurations. - Add ignores to the ESLint config to exclude generated Prisma client and build artifacts from linting. This improves the linting process by preventing unnecessary errors from generated files.
1 parent e740388 commit 035aba2

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/web/eslint.config.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
12
import { dirname } from "path";
23
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
44

55
const __filename = fileURLToPath(import.meta.url);
66
const __dirname = dirname(__filename);
@@ -11,6 +11,15 @@ const compat = new FlatCompat({
1111

1212
const eslintConfig = [
1313
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
{
15+
ignores: [
16+
// Exclude generated Prisma client from linting
17+
"src/generated/**/*",
18+
// Exclude other build artifacts
19+
".next/**/*",
20+
"out/**/*",
21+
],
22+
},
1423
];
1524

1625
export default eslintConfig;

0 commit comments

Comments
 (0)