|
| 1 | +--- |
| 2 | +title:Prisma Lint |
| 3 | +sidebar_label:Prisma Lint |
| 4 | +description:CodeRabbit's guide to Prisma Lint. |
| 5 | +--- |
| 6 | + |
| 7 | +```mdx-code-block |
| 8 | +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; |
| 9 | +
|
| 10 | +<ProPlanNotice /> |
| 11 | +``` |
| 12 | + |
| 13 | +[Prisma Lint](https://github.com/loop-payments/prisma-lint) is a linter for Prisma schema files that helps enforce consistent conventions and best practices in your Prisma schemas. |
| 14 | + |
| 15 | +##Files |
| 16 | + |
| 17 | +Prisma Lint will run on files with the following extensions: |
| 18 | + |
| 19 | +-`.prisma` |
| 20 | + |
| 21 | +##Configuration |
| 22 | + |
| 23 | +Prisma Lint supports the following config files: |
| 24 | + |
| 25 | +-`.prismalintrc.json` |
| 26 | +-`.prismalintrc` |
| 27 | +-`.prismalintrc.js` |
| 28 | +-`.prismalintrc.yaml` |
| 29 | +-`.prismalintrc.yml` |
| 30 | +-`prismalint.config.js` |
| 31 | +- User-defined config file set at`reviews.tools.prismalint.config_file` in your project's`.coderabbit.yaml` file or setting the "Review → Tools → Prisma Lint → Config File" field in CodeRabbit's settings page. |
| 32 | + |
| 33 | +:::note |
| 34 | + |
| 35 | +By default, Prisma Lint looks for schema files at`prisma/schema.prisma`. If you have a custom schema path specified in the`prisma.schema` field within`package.json`, that will be used instead. |
| 36 | + |
| 37 | +::: |
| 38 | + |
| 39 | +##Rule Configuration |
| 40 | + |
| 41 | +Rules can be configured in your`.prismalintrc.json` file. See the[Prisma Lint Rules Documentation](https://github.com/loop-payments/prisma-lint/blob/main/RULES.md) for more information on the available rules and their configuration options. |
| 42 | + |
| 43 | +##Links |
| 44 | + |
| 45 | +-[Prisma Lint GitHub Repository](https://github.com/loop-payments/prisma-lint) |
| 46 | +-[Prisma Lint Rules Documentation](https://github.com/loop-payments/prisma-lint/blob/main/RULES.md) |