Project

jslint-rb

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper to run and format JSHint, using execJS. It supports commandline arguments or a YAML config file to specify global variables and JSHint configs. JavaScript runtime independent so you can start linting without the hassle, on Linux, Windows, or Mac
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.3.2
~> 1.3.6
 Project Readme

#Jslint-rb Code Climate Borne out of a set of Python/Bash scripts I had lugged around for several years. Decided to turn into an actual program instead of setting it up on yet another machine.

###Features:

  • Converted to ruby for easy portability
  • Using ExecJS, so no dependency on a particular JS runtime
  • You can specify a list of globals at the commandline (config file in the future) instead of having to update your source code files with ugly /*global x,y,z */ declarations
  • will also be able to configure multiple formatters easily for use in different environments (VIM, RubyMine, Continuous Integration, etc)

###Examples:

Install the gem and a js runtime

gem install jslint-rb
gem install therubyracer

Setup a config file in your $HOME directory, named .jslint-rb. Then put the following in there

global_vars:
 - default:true
formatter_proc: VIM
lint_options:
 - default:true

You should be all set to start linting your Javascript! Output will be to STDOUT

jslint-rb foo.js

####TODO:

  1. Make a task to pull the latest version of JSHint
  2. Test with MacVim and Windows