Skip to content

Commit d7cb7d2

Browse files
Add guide for editor/IDE integration
1 parent 214c4a5 commit d7cb7d2

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

linters.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Using ESLint with Your Editor
2+
=============================
3+
4+
Linting works best when automated; below are instructions for integrating ESLint with your editor/IDE of choice. If yours isn't listed, please make a PR to add it! You can also check out ESLint's guide to editor integration [here](http://eslint.org/docs/user-guide/integrations.html).
5+
6+
## Contents
7+
* [Atom](#atom)
8+
* [Emacs](#emacs)
9+
* [Sublime](#sublime)
10+
* [Vim](#vim)
11+
12+
## Atom
13+
[linter-eslint](https://atom.io/packages/linter-eslint) can be installed via `$ npm install linter-eslint`.
14+
15+
[⬆ back to top](#contents)
16+
17+
## Emacs
18+
[Flycheck](https://github.com/flycheck/flycheck) is probably your best bet. [This tutorial](http://codewinds.com/blog/2015-04-02-emacs-flycheck-eslint-jsx.html) walks you through installation and configuration for ESLint, including great information on Babel.io and React/JSX integration.
19+
20+
[⬆ back to top](#contents)
21+
22+
## SublimeText
23+
[SublimeLinter-eslint](https://github.com/roadhump/SublimeLinter-eslint) is maintained and seems to work well (requires [SublimeLinter 3](http://sublimelinter.readthedocs.org/en/latest/)).
24+
25+
[⬆ back to top](#contents)
26+
27+
## Vim
28+
[Syntastic](https://github.com/scrooloose/syntastic) is your best bet. Install it via [Pathogen](https://github.com/tpope/vim-pathogen) and ensure the following are in your `.vimrc`:
29+
30+
```vimscript
31+
" Use Pathogen
32+
execute pathogen#infect()
33+
34+
" Settings for Syntastic (https://github.com/scrooloose/syntastic)
35+
set statusline+=%#warningmsg#
36+
set statusline+=%{SyntasticStatuslineFlag()}
37+
set statusline+=%*
38+
39+
let g:syntastic_always_populate_loc_list = 1
40+
let g:syntastic_auto_loc_list = 1
41+
let g:syntastic_check_on_open = 1
42+
let g:syntastic_check_on_wq = 0
43+
let g:syntastic_javascript_checkers = ['eslint']
44+
```
45+
46+
[⬆ back to top](#contents)

0 commit comments

Comments
 (0)