WebExtensions/Hacking: Difference between revisions

→‎Vim: Fix path for eslint (which changed in bugzil.la/1305023)
No edit summary
(→‎Vim: Fix path for eslint (which changed in bugzil.la/1305023))
Line 57: Line 57:
The following assumes that you use the [https://github.com/VundleVim/Vundle.vim Vundle package manager]. It should be easy enough to adapt to any other package manager you happen to prefer, though.
The following assumes that you use the [https://github.com/VundleVim/Vundle.vim Vundle package manager]. It should be easy enough to adapt to any other package manager you happen to prefer, though.


<code>mach eslint --setup</code> installs a specific ESLint version and some ESLint plugins to a subdirectory of the repository.
<code>mach eslint --setup</code> installs a specific ESLint version and some ESLint plugins to a subdirectory of the repository ([https://bugzilla.mozilla.org/show_bug.cgi?id=1305023 changed in Firefox 55]).
You should configure Syntastic roughly as follows (change <code>/path/to/mozilla-central</code> as needed):
You should configure Syntastic roughly as follows (change <code>/path/to/mozilla-central</code> as needed):


Line 72: Line 72:
     \ if stridx(expand("%:p"), "/mozilla-central/") != -1 |
     \ if stridx(expand("%:p"), "/mozilla-central/") != -1 |
     \    let b:syntastic_checkers = ['eslint'] |
     \    let b:syntastic_checkers = ['eslint'] |
     \    let b:syntastic_eslint_exec = '/path/to/mozilla-central/tools/lint/eslint/node_modules/.bin/eslint' |
     \    let b:syntastic_eslint_exec = '/path/to/mozilla-central/node_modules/.bin/eslint' |
     \    let b:syntastic_html_eslint_args = ['--plugin', 'html'] |
     \    let b:syntastic_html_eslint_args = ['--plugin', 'html'] |
     \ endif
     \ endif
47

edits