WebExtensions/Hacking: Difference between revisions

Jump to navigation Jump to search
→‎Vim: Change linting setup because syntastic PR 1803 was rejected
(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 BufRead,BufNewFile */mozilla-central/*
  autocmd FileType javascript,html
     \ let b:syntastic_javascript_checkers = ['eslint'] |
    \ if stridx(expand("%:p"), "/mozilla-central/") != -1 |
     \ let b:syntastic_javascript_eslint_exec = '/path/to/mozilla-central/tools/lint/eslint/node_modules/.bin/eslint' |
     \   let b:syntastic_checkers = ['eslint'] |
     \ let b:syntastic_javascript_eslint_args = ['--plugin', 'html'] |
     \   let b:syntastic_eslint_exec = '/Users/rwu/mozilla-central/tools/lint/eslint/node_modules/.bin/eslint' |
     \ let b:syntastic_filetype_map = { 'html': 'javascript' }
     \   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:
46

edits

Navigation menu