-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Should be able to use jshint for json filetype #1371
Comments
Add this to your vimrc
|
It was worth a shot but that didn't work. |
The supported checkers for each filetype are listed in the wiki. You can't just call a You can use let g:syntastic_filetype_map = { 'json': 'javascript' } |
Another way to do it would be to set the filetype of augroup filetype
autocmd! BufRead,BufNewFile *.json set filetype=json.javascript
augroup END This will tell syntastic to use both |
Okay, I was wondering if it just wouldn't work that way. I had tried the filetype map route and definitely had the issue that you're describing where unwanted JS checkers were being applied to my JSON files. So that doesn't work very well. Maybe there's another way to allow |
There isn't, and for a very good reason:
|
I see. It looks like your configuration prevents |
The point is, |
@lcd047, it's true. I was just trying to figure out why it didn't work the way that I thought it ought to. |
There are no JSON checkers with commens support, so " use eslint for js
let g:syntastic_javascript_checkers = ['eslint']
" use jshint for json
let g:syntastic_filetype_map = {'json': 'javascript'}
autocmd! FileType json let b:syntastic_checkers = ['jshint'] |
Please use
You should |
I may be doing something wrong but I am trying to map the
json
filetype to use thejshint
checker and I'm having issues getting it to work.My stripped
.vimrc
looks like this:It works for JS files so I know that it can find
jshint
binary but for good measure.Here are the debug messages when opening the file:
Here's the output from the
:SyntasticInfo
command:I know that I could just install and use
jsonlint
(and I may eventually in the interest of correctness) but I thought that this should work.Am I missing something? Any ideas why this isn't working?
The text was updated successfully, but these errors were encountered: