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

Generated files are poorly formatted #92

Open
NielsCodes opened this issue Mar 17, 2022 · 1 comment
Open

Generated files are poorly formatted #92

NielsCodes opened this issue Mar 17, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@NielsCodes
Copy link

When I generate the classes from my Prisma schema, the outputted files are very weirdly/poorly formatted.
Some files have empty lines before the class starts, others are unnecessarily or inconsistently indented.

The problem is easily fixed by running npm run format but it would be nice if this step would not be necessary.

@benkroeger
Copy link
Member

I agree on the missing formatting step in the generator. However, this was built under the assumption that most codebases have their own formatting rules and processes anyways.

I'm happy to review a PR that introduces prettier as an optional peer dependency - and if available - executed at the end of file generation.

@benkroeger benkroeger added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Development

No branches or pull requests

2 participants