Skip to content
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

Deletes file contents of files ignored by .prettierignore #92

Closed
blacksails opened this issue Dec 27, 2017 · 5 comments · Fixed by #93
Closed

Deletes file contents of files ignored by .prettierignore #92

blacksails opened this issue Dec 27, 2017 · 5 comments · Fixed by #93

Comments

@blacksails
Copy link

When I save a file ignored by a .prettierignore file, then its contents is deleted.

@mitermayer
Copy link
Member

mitermayer commented Dec 27, 2017

Hi @blacksails,

Thanks for reporting this, will investigate this soon and if is caused by vim-prettier will fix asap and do a new release. Otherwise will comment in here my findings.

@mitermayer
Copy link
Member

@blacksails

The problem in here is due to prettier itself not giving any stdout when ignoring the file parsing. vim-prettier has no way to know that the file has not being parsed since it cannot read .prettierinore files on its own.

@lydell @azz , would be great if files that are ignored by .prettierignore could be simply printed as it is without formatting, maybe some extra CLI params to make that happen ?

@mitermayer
Copy link
Member

Will raise this issue in prettier itself

@mitermayer
Copy link
Member

raised prettier/prettier#3590

@mitermayer mitermayer added the bug label Dec 27, 2017
@mitermayer
Copy link
Member

In the meantime will do a workaround on vim-prettier itself for this by not replacing editing contents with empty stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants