Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upTips for Vim users who also use jshint #146
Comments
olalonde
closed this
May 28, 2015
This comment has been minimized.
This comment has been minimized.
|
Or alternatively let vim auto detect your config in root, defaulting to autocmd FileType javascript let b:syntastic_checkers = findfile('.jshintrc', '.;') != '' ? ['jshint'] : ['standard'] |
This comment has been minimized.
This comment has been minimized.
|
Anyone have a snippet to instead use |
This comment has been minimized.
This comment has been minimized.
|
@yoshuawuyts nice. Do you have any idea on how I could have jshint as default and use standard only in projects which list it in package.json? |
This comment has been minimized.
This comment has been minimized.
|
@olalonde no idea, I'm not much of a viml expert. You could shell out to node or |
This comment has been minimized.
This comment has been minimized.
|
@yoshuawuyts thanks, I'll see if I can come up with something. |
This comment has been minimized.
This comment has been minimized.
autocmd FileType javascript let b:syntastic_checkers = findfile('node_modules/.bin/standard', '.;') != '' ? [ 'standard' ] : [ 'eslint' ]seems to work as expected. |
This comment has been minimized.
This comment has been minimized.
|
as a neovim user i prefer https://github.com/benekastah/neomake. has built-in standard support and runs tools asynchronously (ie, no pause when you save files). |
olalonde commentedMay 28, 2015
make sure your Syntastic is up to date (:PluginUpdate). standard support was only added a few months ago
If you use other syntax checkers, add this to your
.bashrcor.zshrcand launch vim withvimsto enable standard.