Matthew Masurka
Matthew Masurka

Reputation: 375

Prettier 'Ignored unknown option"

I'm getting this warning for multiple prettier options, even though I'm calling via npx (ie: latest version of prettier) and the options are in the documentation. Why?

npx prettier "**/*" --write --ignore-unknown --no-error-on-unmatched-pattern  

...

[warn] Ignored unknown option --ignore-unknown.
[warn] Ignored unknown option --no-error-on-unmatched-pattern.

Upvotes: 4

Views: 7991

Answers (1)

Matthew Masurka
Matthew Masurka

Reputation: 375

This turned out to be some version weirdness caused by a prettier plugin in a yarn workspace package (when I did npx prettier -v I got a really old version).

I ended up putting prettier in nohoist, which did the trick.

Upvotes: 6

Related Questions