prisma-case-format
prisma-case-format copied to clipboard
Run Prisma's `formatSchema` before AND after the case formatting to automatically add missing relations
The Prisma formatter does not only format the schema file, but also does maintenance work on it, such as adding missing relations maps to models that specifies relations.
Currently, if there is a missing relation, this packages formats the fields, tables, etc. as per the configuration, and then formats the file using prisma's formatSchema
util, which adds the relations that are not necessarily formatted as per this package's configuration, leading the user to need to run this tool again.
Hey @V-ed . Maybe I don't follow -- why can't you solve your problem by running prisma format
before prisma-case-format
?
Oh don't get me wrong, this is definitely a way to get around this "issue"!
I love this tool and I'd love for it to completely replace the prisma formatter, and it feels weird to run two things when your formatter already runs prisma format
(well, the programmatic function anyway) as part of its execution.
I did make this issue right after #57, you could say they are related in a small way!