Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

jslint console tool - v8 powered

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 convert_to_h.rb
Octocat-spinner-32 fulljslint.packed.js
Octocat-spinner-32 jslint.cpp
Octocat-spinner-32 jslint.h
Octocat-spinner-32 jslint.js
Octocat-spinner-32 print_human.h
Octocat-spinner-32 print_human.js
Octocat-spinner-32 print_vim.h
Octocat-spinner-32 print_vim.js
README.markdown

Run jslint on the command line fast (with v8 engine)

jslint-v8 is a modern and extreamly fast runner for the popular jslint JavaScript style checker. jslint is implemented by the JavaScript guru Douglas Crockford in JavaScript itself.

Credits

Build

Download and compile v8 JavaScript engine according official manual as shared library. On my 64bit Ubuntu Linux I have used:

scons library=shared arch=x64

Copy the v8 shared library to /usr/lib or whatever place is appropriate for your OS:

sudo cp libv8.so /usr/lib

Compile jslint-v8

V8_BASEDIR=/your/path/to/v8-trunk rake compile

If you do not have ruby/rake you can run g++ directly, please look inside Rakefile.

Run on console

jslint --browser file.js

checks the style for file.js. You can provide all the known jslint switches on the command line. Here --browser indicates that e.g. XMLHttpRequest object should be allowed.

Run from vim

Set up jslint as make program in .vimrc:

autocmd BufRead,BufNewFile *.js,*.json setlocal makeprg=jslint\ --vim\ \%

--vim provides error message formatting suitable for parsing in vim.

Now you can check your JavaScript easily with :make or even automatically on every file save or load.

See a screenshot for usage inside vim.

Something went wrong with that request. Please try again.