简体   繁体   中英

Lint ONLY ON SAVE - IntelliJ / Webstorm?

I want to lint ONLY ON SAVE in Webstorm. However I can't find a way to set this in the editor and when I Google it I only see results for real-time linting but that is the opposite of what I want.

I'm using ESlint and JShint and only want to see the errors when I save. I had VIM setup like this and I really liked it.

I don't like seeing all the red underlined as I type only to see it immediately go away when I'm done typing.

Any ideas?

webStorm doesn't support any 'on-save' actions due to the way the IDE saves changes - actually it reserves the right to save any of your files literally whenever it wishes. You don't have any guarantees on when WebStorm flushes document data displayed in the editor to file system. Eg it is allowed to do that while the document is being edited. There is a feature request for 'on save' actions - IDEABKL-6722 , please feel free to vote for it.

You can set up ESlint and JShint as file watchers, for example, and turn 'immediate synchronization' off, so that the linters are only run on explicit Save All action

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM