How to make WS automatically fix (or warn on) eslint errors?

I have .eslintrc.json and have enabled ESLint, but WS still doesn't fix errors, or show me warnings, and it also lets me commit code that is then rejected by our CI build.  Is there any way to improve this situation? 

 

2 comments
Comment actions Permalink

I see now it does show me errors, but it's too easy to miss.  

I also see there is an option in the Commit Changes window: 
Reformat Code. 

I checked this, but it didn't fix the ESLint error. 

 

0
Comment actions Permalink

Reformat Code is not supposed to fix the error, unless you have imported code style preferences from .eslintrc.json (https://blog.jetbrains.com/webstorm/2017/06/webstorm-2017-2-eap-172-3198/)

ESLint auto-fixes are available on Alt+Enter (https://blog.jetbrains.com/webstorm/2016/09/webstorm-2016-3-eap-163-3983/):

Also, errors from ESLint are available, just as other inspections errors, when committing the code if Perform code analysis is enabled in Commit dialog

 

0

Please sign in to leave a comment.