-
SummaryI know i have eslint issues which get caught in the build command. but simply running // https://www.prisma.io/docs/guides/nextjs
generator client {
provider = "prisma-client-js"
output = "../src/generated/client"
} No lint issuenpm run lint ✔ took 4s at 12:16:33
> neet-and-clear@0.1.0 lint
> next lint
✔ No ESLint warnings or errors Shows lint issuesnpm run build ✔ took 4s at 12:16:53
> neet-and-clear@0.1.0 build
> prettier --check . && next build
Checking formatting...
All matched files use Prettier code style!
▲ Next.js 15.2.5
- Environments: .env.local, .env
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ...Failed to compile.
./prisma/seed.ts:2:3
Type error: Module '"@prisma/client"' has no exported member 'ClassName'.
1 | import {
> 2 | ClassName,
| ^
3 | Difficulty,
4 | MainExamType,
5 | MCQType,
Next.js build worker exited with code: 1 and signal: null // eslint.config.mjs
import { FlatCompat } from '@eslint/eslintrc';
import perfectionist from 'eslint-plugin-perfectionist';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [
...compat.extends(
'next/core-web-vitals',
'next/typescript',
'plugin:prettier/recommended'
),
perfectionist.configs['recommended-natural'],
];
export default eslintConfig; ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
ignoring prisma client output folder for linting: import { globalIgnores } from 'eslint/config';
// .....................................
const eslintConfig = [
...compat.extends(
'next/core-web-vitals',
'next/typescript',
'plugin:prettier/recommended'
),
globalIgnores(['./src/generated/']),
]; |
Beta Was this translation helpful? Give feedback.
-
Hi,
That's a TypeScript error IIRC. Not a lint issue. |
Beta Was this translation helpful? Give feedback.
Hi,
That's a TypeScript error IIRC. Not a lint issue.