46
edits
(mach eslint --setup no longer installs globally! Improve eslint vim config to use the eslint binary from "mach eslint --setup", only for mozilla-central.) |
(→Vim: Change linting setup because syntastic PR 1803 was rejected) |
||
Line 65: | Line 65: | ||
" Enable the specific ESLint checker for files in mozilla-central/ only. | " Enable the specific ESLint checker for files in mozilla-central/ only. | ||
" Enable the HTML plugin, and enable JavaScript linting for HTML files. | " Enable the HTML plugin, and enable JavaScript linting for HTML files. | ||
autocmd | autocmd FileType javascript,html | ||
\ let b: | \ if stridx(expand("%:p"), "/mozilla-central/") != -1 | | ||
\ let b: | \ let b:syntastic_checkers = ['eslint'] | | ||
\ let b: | \ let b:syntastic_eslint_exec = '/Users/rwu/mozilla-central/tools/lint/eslint/node_modules/.bin/eslint' | | ||
\ | \ let b:syntastic_html_eslint_args = ['--plugin', 'html'] | | ||
\ endif | |||
After you've added this to your configuration (and have installed Vundle, if necessary), launch Vim and run: | After you've added this to your configuration (and have installed Vundle, if necessary), launch Vim and run: |
edits