nettofarah/postgres-schema-ts

Prettier config

neurosnap opened this issue · 2 comments

Greetings!

I noticed that you're applying the project's prettier configuration to the outputted code. I'm also using prettier but requiring semi-colons. This conflicts can be addressed if I use postgres-schema-ts in my code and re-run prettier with my own configuration but was curious what you thought about providing a way to configure the prettier in this code?

https://github.com/nettofarah/postgres-schema-ts/blob/master/src/index.ts#L6

Thanks!

Hey, @neurosnap. I'm not super sure tbh. But I think nothing prevents you from piping the output or postgres-schema-ts into prettier after you're done generation your models.

Something like:

npx postgres-schema-ts postgresql://postgres@localhost:5433/db?currentSchema=public | prettier

Yeah this is what I ended up doing. The solution works fine for me, closing!