Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A plugin that allow you to run jshint from vim.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

vim-jshint

A vim plugin that automatically run jshint on your current buffer.

vim-jshint screenshot

Usage

The contents of a javascript file will be passed through the javascript hint parser after the buffer is saved. Any lint warnings will be placed in the quickfix error window.

Installation

Plugin

If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:

cd ~/.vim/bundle
git clone git://github.com/sleistner/vim-jshint.git

JavaScript runtime

Mac OS X

No additional installation steps required /System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc is used by default.

Linux

Install SpiderMonkey

$ sudo apt-get install spidermonkey-bin

Options

.jshintrc files in your home directory as well as in your current directory will be loaded automatically.

Your options file(s) should be in JSON format. See JSHint docs for more information about option names and values.

Example:

{
    "expr": true, 
    "boss": true
}

Commands

  • :JSHint run jshint for current file

  • :JSHintReload reload all .jshintrc option files.

  • :JSHintToggle enable or disable jshint validation

Credits

This plugin makes heavy use of the following sources:

Something went wrong with that request. Please try again.