This repository was archived by the owner on Mar 7, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,16 @@ WebStorm has built-in support for ESLint issue reporting. Auto fixing is only su
73
73
To enable ESLint reporter, [ follow the guide] [ webstorm-eslint ] on WebStorm's support page.
74
74
To use the new autofix feature, [ read their blog post] [ webstorm-eslint-autofix ] on the topic.
75
75
76
- > The autofix feature must be manually triggered, ie. no autofix-on-save. However, this is still much better than fixing all the issues by hand... ✍️
77
-
76
+ To use autofix on save feature
77
+ 1 . Go to ` Preferences ` -> ` Tools ` -> ` File watchers `
78
+ 2 . Click to add (plus) button and choose custom template
79
+ 3 . Name it for example ` eslint `
80
+ 4 . File type ` javascript `
81
+ 5 . Program will be your path to eslint binary for example ` /Users/[yourusername]/git/[yourproject]/node_modules/.bin/eslint `
82
+ 6 . Arguments ` --fix $FilePath$ `
83
+ 7 . Working directory ` $ProjectFileDir$ `
84
+ 8 . Show console ` never ` (if you don't want to see console when --fix command find eslint errors)
85
+ 9 . Check ` Trigger watcher regardless of syntax errors ` and uncheck ` Immediate file synchronization `
78
86
79
87
[ atom-linter ] : https://atom.io/packages/linter
80
88
[ atom-linter-eslint ] : https://atom.io/packages/linter-eslint
You can’t perform that action at this time.
0 commit comments