3

I can't get Syntastic to work for JavaScript files in MacVim. If I save a file with errors in it, nothing is displayed: there is no error margin.

If I run :SyntasticInfo, then I see:

Syntastic info for filetype: javascript
Available checkers: jshint
Currently active checker(s): jshint

If I run jshint directly, using :!jshint %, then I see the errors I expect.

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380

1 Answers1

5

I had a custom syntastic_javascript_jshint_conf setting:

let g:syntastic_javascript_jshint_conf="~/.jshintrc"

...and the ~/.jshintrc file was missing. Recreating it fixed the problem, and now I get the error margin.

Updated to add: I've added a feature to my .vimrc, so that it tracks the "nearest" .jshintrc file: https://github.com/rlipscombe/vimrc/blob/master/vimrc#L176

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380