You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tools/prisma-lint.md
+6-43
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,11 @@ Prisma Lint will run on files with the following extensions:
23
23
Prisma Lint supports the following config files:
24
24
25
25
-`.prismalintrc.json`
26
+
-`.prismalintrc`
27
+
-`.prismalintrc.js`
28
+
-`.prismalintrc.yaml`
29
+
-`.prismalintrc.yml`
30
+
-`prismalint.config.js`
26
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.
27
32
28
33
:::note
@@ -33,49 +38,7 @@ By default, Prisma Lint looks for schema files at `prisma/schema.prisma`. If you
33
38
34
39
## Rule Configuration
35
40
36
-
Rules can be configured in your `.prismalintrc.json` file. Here's an example configuration:
37
-
38
-
```json
39
-
{
40
-
"rules": {
41
-
"field-name-mapping-snake-case": [
42
-
"error",
43
-
{
44
-
"compoundWords": ["S3"]
45
-
}
46
-
],
47
-
"model-name-grammatical-number": [
48
-
"error",
49
-
{
50
-
"style": "singular"
51
-
}
52
-
],
53
-
"require-field-index": [
54
-
"error",
55
-
{
56
-
"forAllRelations": true,
57
-
"forNames": ["tenantId"]
58
-
}
59
-
]
60
-
}
61
-
}
62
-
```
63
-
64
-
## Ignoring Rules
65
-
66
-
You can ignore rules using three-slash (`///`) comments inside your Prisma models:
67
-
68
-
```prisma
69
-
model User {
70
-
/// prisma-lint-ignore-model
71
-
// Ignores all lint rules for this model
72
-
}
73
-
74
-
model Post {
75
-
/// prisma-lint-ignore-model require-field
76
-
// Ignores specific rules for this model
77
-
}
78
-
```
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.
0 commit comments