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

Run Prisma's formatSchema before AND after the case formatting to automatically add missing relations #58

Open
V-ed opened this issue Feb 20, 2024 · 2 comments

Comments

@V-ed
Copy link

V-ed commented Feb 20, 2024

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.

@V-ed V-ed changed the title Run Prisma's formatSchema before AND after the case changes to automatically add missing relations Run Prisma's formatSchema before AND after the case formatting to automatically add missing relations Feb 20, 2024
@iiian
Copy link
Owner

iiian commented Feb 20, 2024

Hey @V-ed . Maybe I don't follow -- why can't you solve your problem by running prisma format before prisma-case-format?

@V-ed
Copy link
Author

V-ed commented Feb 20, 2024

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!

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

No branches or pull requests

2 participants