Open ronag opened 3 years ago
Hi I took the liberty to rewrite the title.
I think it should be possible to make a prettier.config.js
file that will grab the configuration from eslint-config-prettierx. It would be ideal to make this a shareable config. Here is the documentation: https://prettier.io/docs/en/configuration.html
I suspect it would be easier to configure prettierx in the prettierrc file and configure eslint-plugin-prettierx to use the same configuration.
/cc @aMarCruz
Even if I don't read the config and create a duplicate. How do I create a corresponding config? Does prettier configs support extends
?
See the note at the end of https://prettier.io/docs/en/configuration.html#sharing-configurations:
Note: This method does not offer a way to extend the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a
.prettierrc.js
file and export the modifications, e.g:module.exports = { ...require("@company/prettier-config"), semi: false, };
I would love to make the Prettier stack more pluggable and extensible but am not in a position to make this a priority as a lone freelancer :)
Thanks. Feel free to close.
@ronag , @brodybits , sorry by the delay.
DELETED, THIS COMMENT IS NOT VALID FOR eslint-plugin-prettierx 😖
I have the following eslint config which works fine.
How do I setup prettierx to grab the configuration from here during formatting? Or do I have to duplicate it in a prettierrc file or something?