A linter for Prisma schema files, currently at v0.13.1. It provides a configurable set of rules (e.g., naming conventions, field order, index requirements) similar to ESLint, all disabled by default. Supports Prisma 7+ config files (prisma.config.ts) and legacy package.json schema path. Uses ignore comments (/// prisma-lint-ignore-model, /// prisma-lint-ignore-field) and multiple output formats (simple, contextual). Released frequently with new rules and fixes. Differentiates from other Prisma tools by focusing purely on linting schema files, not migrations or querying.
npm install prisma-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Programmatic usage: lint a Prisma schema with custom rules and output results as JSON.
If you use Prisma 7+, migrate your schema path to prisma.config.ts. If you rely on package.json#prisma.schema, ensure no conflicting Prisma 7 config exists.
Replace `enum-value-snake-case` with `enum-value-case` and configure `case: 'lower'` (or adjust as needed).
Create a .prismalintrc.json file with a "rules" object listing the rules you want to enable and their severity.
Use /// prisma-lint-ignore-model or /// prisma-lint-ignore-field with exactly three slashes.
Ensure compound words match the exact casing used in your schema (e.g., 'S3' not 's3').
Install as dev dependency: npm install --save-dev prisma-lint
Create a configuration file (e.g., .prismalintrc.json) with a "rules" field.
Check the RULES.md file for valid rule names. Common rules: 'model-name-camel-case', 'field-name-camel-case'.
Verify the schema path. Provide explicit path via CLI argument or configure in prisma.config.ts / package.json#prisma.schema.