-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Multiple Instances #25
Comments
Hi, any update on this? I'm happy to PR whatever is a preferred approach. My personal preference would be to either have some sort of a |
1 |
So I assume this is related to my issue with not being able to set the case of the plural form? E.g.
|
I think it could be once it’s turned into a flag, as you can then you use the function for this. I’ll be sure to keep it in mind when I work on this, likely this upcoming weekend. |
Yeah the real issue is everything gets passed into the restoreCase function. I feel that the ability to write case-sensitive rules should be allowed. |
Great tool! I'm working with a database where the table names are in plural snake case, but the Prisma model names are in singular pascal case, and I'd like to add a lint for that. I've updated the `model-name-mapping-snake-case` rule to accept two new options: `pluralize`, and `irregularPlurals`. The pluralization is done by the `pluralize` library that is already being used elsewhere. The only caveat is that calls to `pluralize.addIrregularRule` affect the global ruleset, so will apply elsewhere, but unfortunately that appears to be a limitation of the library (plurals/pluralize#25, plurals/pluralize#87). --------- Co-authored-by: Max Heinritz <[email protected]>
It'd be cool to create multiple
pluralize
instances. The use-case that's been brought up before is acronyms (so perhaps have an option here for output case or a function that handles sanitization manually?). However, I think multiple locales would be perfect too. E.g.require('pluralize/de')
. If anyone is willing to try create automated pluralizations for other locales that'd would be very cool.The text was updated successfully, but these errors were encountered: