JSLint for Emacs Flymake using V8
JavaScript Emacs Lisp
Switch branches/tags
Nothing to show
Pull request Compare This branch is 3 commits ahead, 4 commits behind valeryz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
flymake-jslint.el
fulljslint.js
jshint.js
v8shell.js

README.md

JSLint for Emacs Flymake using V8

This allows to use JSLint from Emacs using Javascript V8. There are other ways to use JSLint from Emacs, see Emacs Wiki, but this one attempts to be the easiest and the fastest.

Installation

Assuming you install your emacs packages in ~/.emacs.d:

  1. Put this package in ~/.emacs.d/jslint-v8.

  2. Build V8 with the shell sample.

    See Google's instructions. In short:

     cd ~/.emacs.d
     svn checkout http://v8.googlecode.com/svn/trunk/ v8
     cd v8
     scons sample=shell
    

    On my Mac OS 10.5, there are harmless warnings which nevertheless don't let V8 build, because Google uses -Werror. If this happens, edit the SConstruct file and remove the -Werror flag, then run scons.

  3. Configure Emacs:

    Put the following lines in your .emacs:

     (add-to-list 'load-path "~/.emacs.d/jslint-v8")
     (require 'flymake-jslint)
     (add-hook 'javascript-mode-hook
               (lambda () (flymake-mode t)))
    

Customization

If your V8 or emacs packages locations are different, you may need to customize the variables jslint-v8-shell and jslint-v8-location.