When I used --prettier-config .prettierrc.js I've got an an error Prettier: couldn’t find '.prettierrc.js' in .... It turned out that the error is misleading, as the exception was about config not being a valid JSON.
In general, I see more and more people prefer .eslintrc.js and prettierrc.js over JSON, as JavaScript allows sharing configurations through import / export (and it's just nicer than JSON). Haven't found Prettier exposing any API for reading the config file, but it does state in the docs it uses cosmiconfig. It would be great if swagger-to-ts also used cosmiconfig to read any Prettier config file.
When I used
--prettier-config .prettierrc.jsI've got an an errorPrettier: couldn’t find '.prettierrc.js' in .... It turned out that the error is misleading, as the exception was about config not being a valid JSON.In general, I see more and more people prefer
.eslintrc.jsandprettierrc.jsover JSON, as JavaScript allows sharing configurations through import / export (and it's just nicer than JSON). Haven't found Prettier exposing any API for reading the config file, but it does state in the docs it uses cosmiconfig. It would be great ifswagger-to-tsalso usedcosmiconfigto read any Prettier config file.