-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.prettierignore displays no output when running on ignored file breaking editor integrations #3590
Comments
Sounds reasonable to me to warn if the use passed a specific path (i.e. not a glob) of an ignored file |
I think adding a warning (only when |
This sounds like a bug. echo "foo()" > foo.js
echo "foo.js" > .prettierignore
prettier --stdin-filepath=foo.js < foo.js Should output the contents of Edit: Not limited to stdin. echo "foo()" > foo.js
echo "foo.js" > .prettierignore
prettier foo.js Maybe this should output |
So basically we want two modes:
|
@azz I really like your approach! I think |
Thank you all for this! <3 |
This may seem at first glance the ideal behaviour, when trying to run the prettie CLI on an ignored file. However for editor integrations such as
vim-prettier
where it does not have any knowledge about the ignored files from.prettierignore
it means it will then wipe all the contents of the ignored file.see prettier/vim-prettier#92
Would be great if there was an
option
or any other way to simply print the ignored file as it is instead of just having an emptystdout
, other valid options would be display an error or warning message.@ikatyang, @azz, @suchipi please let me know what are your thoughts around it, happy to submit a PR for this
The text was updated successfully, but these errors were encountered: