|
| 1 | +[atom-linter]: https://atom.io/packages/linter |
| 2 | +[atom-linter-eslint]: https://atom.io/packages/linter-eslint |
| 3 | +[vscode-eslint]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint |
| 4 | +[subl-packagecontrol]: https://packagecontrol.io |
| 5 | +[subl-linter]: https://packagecontrol.io/packages/SublimeLinter |
| 6 | +[subl-linter-eslint]: https://packagecontrol.io/packages/SublimeLinter-contrib-eslint |
| 7 | +[subl-eslint-formatter]: https://packagecontrol.io/packages/ESLint-Formatter |
| 8 | +[webstorm-eslint]: https://www.jetbrains.com/help/webstorm/2016.3/using-javascript-code-quality-tools.html#ESLint |
| 9 | +[webstorm-eslint-autofix]: https://blog.jetbrains.com/webstorm/2016/09/webstorm-2016-3-eap-163-3983 |
| 10 | + |
| 11 | + |
1 | 12 | # ESLint integrations with your IDE/editors |
2 | 13 |
|
3 | 14 | To make the whole developer experience more pleasant and convenient, it is important to configure your code editor of choice integrate with ESLint. The following can be achieved with most editors: |
@@ -73,23 +84,14 @@ WebStorm has built-in support for ESLint issue reporting. Auto fixing is only su |
73 | 84 | To enable ESLint reporter, [follow the guide][webstorm-eslint] on WebStorm's support page. |
74 | 85 | To use the new autofix feature, [read their blog post][webstorm-eslint-autofix] on the topic. |
75 | 86 |
|
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` |
| 87 | +To use autofix on save feature: |
86 | 88 |
|
87 | | -[atom-linter]: https://atom.io/packages/linter |
88 | | -[atom-linter-eslint]: https://atom.io/packages/linter-eslint |
89 | | -[vscode-eslint]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint |
90 | | -[subl-packagecontrol]: https://packagecontrol.io |
91 | | -[subl-linter]: https://packagecontrol.io/packages/SublimeLinter |
92 | | -[subl-linter-eslint]: https://packagecontrol.io/packages/SublimeLinter-contrib-eslint |
93 | | -[subl-eslint-formatter]: https://packagecontrol.io/packages/ESLint-Formatter |
94 | | -[webstorm-eslint]: https://www.jetbrains.com/help/webstorm/2016.3/using-javascript-code-quality-tools.html#ESLint |
95 | | -[webstorm-eslint-autofix]: https://blog.jetbrains.com/webstorm/2016/09/webstorm-2016-3-eap-163-3983 |
| 89 | +1. Go to `Preferences` -> `Tools` -> `File watchers` |
| 90 | +1. Click the `Add` (+) button and choose custom template |
| 91 | +1. Name it for example `eslint` |
| 92 | +1. Set file type to `javascript` |
| 93 | +1. Program will be your path to eslint binary for example `/Users/[yourusername]/git/[yourproject]/node_modules/.bin/eslint` |
| 94 | +1. Arguments `--fix $FilePath$` |
| 95 | +1. Working directory `$ProjectFileDir$` |
| 96 | +1. Show console `never` (if you don't want to see the console when `--fix` command finds errors) |
| 97 | +1. Check `Trigger watcher regardless of syntax errors` and uncheck `Immediate file synchronization` |
0 commit comments