Vim-prettier: Deletes file contents of files ignored by .prettierignore

Created on 27 Dec 2017  路  5Comments  路  Source: prettier/vim-prettier

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

bug triage

Most helpful comment

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

All 5 comments

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.

@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 ?

Will raise this issue in prettier itself

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yshuman1 picture yshuman1  路  6Comments

jrock2004 picture jrock2004  路  5Comments

mitermayer picture mitermayer  路  8Comments

ajcrites picture ajcrites  路  8Comments

christopherball picture christopherball  路  4Comments