Javascript 设置Vim+时出现问题;Syntastic+;JSHint(Linux)

Javascript 设置Vim+时出现问题;Syntastic+;JSHint(Linux),javascript,linux,vim,syntastic,Javascript,Linux,Vim,Syntastic,我已安装JSHint: alex@alex-K43U:~$ which jshint /home/alex/nvm/v0.8.8/bin/jshint '/home/alex/.vim/bundle/syntastic' 我在我的.vimrc上指向它: " Syntastic let g:syntastic_check_on_open=1 let g:syntastic_javascript_checkers = ['jshint'] let g:syntastic_jshint_exec=

我已安装JSHint:

alex@alex-K43U:~$ which jshint
/home/alex/nvm/v0.8.8/bin/jshint
'/home/alex/.vim/bundle/syntastic' 
我在我的
.vimrc
上指向它:

" Syntastic
let g:syntastic_check_on_open=1
let g:syntastic_javascript_checkers = ['jshint']
let g:syntastic_jshint_exec='/home/alex/nvm/v0.8.8/bin/jshint'
Vim似乎正在检测它:

Syntastic: active mode enabled
Syntastic info for filetype: javascript
Available checker(s): jshint
Currently enabled checker(s): jshint
但是当我打开一个
.js
文件时,我会得到如下内容:

检查程序javascript/jshint返回异常状态

而且根本没有错误突出显示。有什么问题吗

(我甚至在我的
主页
路径中添加了一个
.jshintrc
文件,但运气不好)

编辑:

"~/www/coffeescript/js/script.js" 11L, 193C
syntastic: 8.443991: g:syntastic_version = '3.4.0'
syntastic: 8.455821: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shellt
emp = 1, &shellxquote = ''
syntastic: 8.508374: g:syntastic_aggregate_errors = 0
syntastic: 8.528577: getcwd() = /home/alex
syntastic: 8.567175: CacheErrors: Invoking checker: javascript/jshint
syntastic: 8.625888: SyntasticMake: called with options: {'errorformat': '%E%f: line %l\, col %v\, %m', 'defaults': {'bufnr': 1}, 'makeprg': '/home/alex/nvm/v0
.8.8/bin/jshint --config ~/.jshintrc /home/alex/www/coffeescript/js/script.js', 'returns': [0, 2]}
syntastic: 8.688247: checker output: ['/usr/bin/env: node: No such file or directory', '']
syntastic: 8.707693: raw loclist: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '/usr/bin/env: node: N
o such file or directory'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]

我只是在jshint v2.6.3中遇到了这个问题。我的问题是我的
.jshintrc
格式不正确。我从另一个SO问题中提取了文件的内容,但没有意识到我需要用大括号将所有内容包装起来

在我的项目目录中打开my
.jshintrc
,并更改:

"globals": {
    "angular": true
}


他为我做了这件事。这可能不是你的问题,但希望这能帮助别人

jshint是否可以从与syntastic使用相同参数执行的shell中工作?@romainl您的意思是这样的<代码>alex@alex-K43U:~/www/coffeescript/js$jshint script.js script.js:第3行,第3列,缺少“use strict”语句。是的,它可以工作。
$jshint--version
的输出是什么?@romainl jshint v2.4.4它找不到节点。格式错误的
.jshintrc
也是我的问题!掌纹
{
  "globals": {
    "angular": true
  }
}