tfw you try to write javascript and have prettier/eslint on save, and it just deletes the entire line you just wrote 
-
Show this thread
-
Replying to @bigshika
Prettier shouldn’t ever delete a line. Can you reproduce? Would be super helpful to try to investigate what’s actually going on so we can fix it.
2 replies 0 retweets 4 likes -
I’ve been having a problem lately with the new webstorm prettier integration. I haven’t figured it out fully, but it seems to be when I save and quickly switch to another file that it just reverts. Undo gets my changes back. I think it’s a webstorm issue not prettier in my case.
1 reply 0 retweets 1 like -
Replying to @jschloer
Hey! Does that happen regularly? What OS do you have? You use the Reformat with Prettier action and then switch to a different file? So far we haven't reproduced the problem...
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
I haven't found a good way to reproduce with switching files, but I did manage to do it with saving, editing, and then quickly saving again. Another wrinkle is I'm using an ideavim key mapping for save. `nnoremap <Leader>w :w<CR>` Maybe that's the issue? I'll keep checking.
1 reply 0 retweets 0 likes -
Replying to @jschloer @WebStormIDE
Oh and that's using a File watcher. I haven't been using the reformat with prettier, cause it didn't seem like that had a format on save yet, which I prefer. So I guess I'm not really using the new integration, just the new webstorm.
1 reply 0 retweets 0 likes
How big is the file you're editing? In the file watcher settings, is the option "Auto-save edited files to trigger the watcher" enabled or disabled? Please try to disable it.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.