How to configure ESLint auto fix on save in WebStorm/PHPStorm?
On WebStorm 2020.1.1
, there is a checkbox called Run eslint --fix on save
.
Also see:
- https://www.jetbrains.com/help/webstorm/eslint.html#ws_js_eslint_activate
According to this article, settings should be as the following:
- File type: Any (or JavaScript)
- Scope: Project files
- Program: $ProjectFileDir$/node_modules/.bin/eslint
- Arguments: --fix $FilePath$
- Output paths to refresh: $FileDir$