Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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