Skip to content

Instantly share code, notes, and snippets.

@yangg
Created July 2, 2011 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangg/1059895 to your computer and use it in GitHub Desktop.
Save yangg/1059895 to your computer and use it in GitHub Desktop.
Compile JavaScriptLint
" add to .vimrc
function! Make()
if &modified | silent write | endif
if &makeprg == 'make' | return | endif
silent make
execute 'cw'
endfunction
autocmd Filetype javascript setlocal makeprg=jsl\ -nologo\ -nofilelisting\ -nosummary\ -nocontext\ -conf\ /etc/jsl.conf\ -process\ % |
autocmd BufWritePost *.js call Make()
curl http://www.javascriptlint.com/download/jsl-0.3.0-src.tar.gz | tar xzf -
mv jsl-* jsl-latest
pushd $(pwd)
cd jsl-latest/src
make -f Makefile.ref all
sudo cp Linux_All_DBG.OBJ/{jsl,jscpucfg} /usr/local/bin
# generate default config file
# sudo jsl -help:conf > /etc/jsl.conf
popd
rm -r jsl-latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment