Skip to content

How to use prettier with editorconfig in project.yml task ? #358

Answered by tomdavidson
tomdavidson asked this question in Q&A
Discussion options

You must be logged in to vote

Answer: Do not use the --config arg. Let prettier find its own config in project root and then it will also find the .editorconfig file.

Thanks @milesj I just learned that prettier will find the project root in search of the config file and .editorconfig - resolve-config-editorconfig.js - which must be why I haven't ran into this before.

If I do not provide the argument to the task, i.e. remove --config @in(0) , prettier still finds the project root, the standard config location, and the .editorconfig. Not sure what it is about how prettier finds the root and the moon task, but this is a pretty great 'workaround' for me.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@milesj
Comment options

Answer selected by tomdavidson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants