- this work was inspired by jsbeautify implementation.
- original jslint-v8 implementation by jlbfalcao
- vim support and Rakefile by Vladimir Dobriakov AKA geekQ
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
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.
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.
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.
:make or even
automatically on every file save or load.
See a screenshot for usage inside vim.