loop-payments/prisma-lint

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

Closed this issue ยท 5 comments

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 commented

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 commented

Example:

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

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

maxh commented

Does this support your use case? #356

This is perfect, thanks!