How to configure Syntastic with JSHint?

前端 未结 3 1836
走了就别回头了
走了就别回头了 2021-01-31 14:34

How to use the Syntastic Vim plugin with JSHint to validate JavaScript code?

Environment:

  • Ubuntu 11.04
  • VIM - Vi IMproved 7.3

What I

3条回答
  •  执笔经年
    2021-01-31 15:23

    Here is a more updated info, there is a configuration to associate a file extension to a checker,
    in your .vimrc

    let g:syntastic_javascript_checkers = ['jshint']
    

    Also to get info about what's going on run this command in vim

    :SyntasticInfo
    

    And you'll get an output similar to this:

    Syntastic info for filetype: javascript  
    Available checkers: gjslint jshint  
    Currently active checker(s): gjslint  
    Press ENTER or type command to continue
    

提交回复
热议问题