-
Notifications
You must be signed in to change notification settings - Fork 1.1k
JavaScript: jshint
Maintainer: Martin Grenfell [email protected]
JSHint is a tool to detect errors and potential problems in JavaScript files. See the project's page for details.
If you're checking files containing tab characters, then JSHint's
idea of tabstop must match Vim's tabstop
, otherwise syntastic will
highlight the errors at shifted positions. By default JSHint's
tabstop is 4, while Vim's default tabstop
is 8.
In order to change JSHint's tabstop you have to change its
indent config option. One way to do that is to put it in a file
named .jshintrc
, in a JSON structure. For example:
{
"indent": 8
}
See JSHint documentation for details.
Please note however that setting indent also triggers the
indentation checks. If that is undesirable, your only option is to
leave JSHint's tabstop alone, and change Vim's tabstop
to 4. In
order to change Vim's tabstop
, you can add this to your vimrc
:
set tabstop = 4