Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prisma lint #263

Merged
merged 2 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/tools/prisma-lint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Prisma Lint
sidebar_label: Prisma Lint
description: CodeRabbit's guide to Prisma Lint.
---

```mdx-code-block
import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';

<ProPlanNotice />
```

[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.

## Files

Prisma Lint will run on files with the following extensions:

- `.prisma`

## Configuration

Prisma Lint supports the following config files:

- `.prismalintrc.json`
- `.prismalintrc`
- `.prismalintrc.js`
- `.prismalintrc.yaml`
- `.prismalintrc.yml`
- `prismalint.config.js`
- 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.

:::note

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.

:::

## Rule Configuration

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.

## Links

- [Prisma Lint GitHub Repository](https://github.com/loop-payments/prisma-lint)
- [Prisma Lint Rules Documentation](https://github.com/loop-payments/prisma-lint/blob/main/RULES.md)
2 changes: 2 additions & 0 deletions docs/tools/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Remove extraneous f prefix
| TSX | [Biome][Biome] | Code Quality |
| Typescript | [Biome][Biome] | Code Quality |
| YAML | [YAMLlint][YAMLlint] | Code Quality |
| Prisma | [Prisma Lint][PrismaLint] | Code Quality |

[ShellCheck]: ./shellcheck.md
[SQLFluff]: ./sqlfluff.md
Expand All @@ -100,3 +101,4 @@ Remove extraneous f prefix
[CircleCI]: ./circleci.md
[Semgrep]: ./semgrep.md
[Pipeline]: ./pipeline-remediation.md
[PrismaLint]: ./prisma-lint.md