简体   繁体   中英

Configuring JSHint for Vim

I recently installed JSHint to help me out debugging some Javascript code. JSHint seems to be working flawlessly but now I want to tweak it to suit me better.

For exampled. I want to disable warning "WXXX", error "EXXX" or add some settings. How would I do this using a global .jshintrc file?

Currently I have ~/.jshintrc that looks something like this:

{
   //Settings
   "debug": true',
   "devel": true',
   //And some more settings

   "-WXXX": false,
   "-WXXX": false,
   "-EXXX": false
}

But as far as I can tell this is doing nothing.

To disable a warning, you have to use "-WXXX": true .

You can't disable errors ( EXXX ): http://jshint.com/docs/

This syntax works only with warnings (code starts with W ), it doesn't work with errors (code starts with E ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM