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

Support exceptions for the Expected singular model name. model-name-grammatical-number error #354

Closed
kibertoad opened this issue Mar 28, 2024 · 5 comments · Fixed by #356

Comments

@kibertoad
Copy link

Similarly to how model-name-mapping-snake-case has a list of compound words, model-name-grammatical-number should support a list of exceptions too. E. g. settings or scissors are singular, it makes no sense to create a table setting or scissor.

@maxh
Copy link
Collaborator

maxh commented Mar 28, 2024

Makes sense. Internally we simply disable the rule with in-line comments on such models, but adding this to the config is a good idea.

@maxh
Copy link
Collaborator

maxh commented Mar 28, 2024

Example:

model ArtifactMetadata {
  /// prisma-lint-ignore-model model-name-grammatical-number
}

@kibertoad
Copy link
Author

Yeah, that's what we did as a short-term solution, but having proper config would be nice :D

@maxh
Copy link
Collaborator

maxh commented Mar 29, 2024

Does this support your use case? #356

@kibertoad
Copy link
Author

This is perfect, thanks!

@maxh maxh closed this as completed in #356 Mar 29, 2024
maxh added a commit that referenced this issue Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants