Some tools, like syntastic for vim, expect jshint to be a system command that runs on a file.
But when installing the gem, we get the following error:
/home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jshint-1.4.0/lib/jshint/cli.rb:6:in `const_get': wrong constant name app/assets/javascripts/application.js (NameError)
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jshint-1.4.0/lib/jshint/cli.rb:6:in `run'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/jshint-1.4.0/bin/jshint:12:in `<top (required)>'
from /home/vagrant/.rbenv/versions/2.2.2/bin/jshint:23:in `load'
from /home/vagrant/.rbenv/versions/2.2.2/bin/jshint:23:in `<main>'
you can reproduce that by running this command $ jshint app/assets/javascripts/application.js
is there a way around that?
The gem seems to get in the way of the normal/expected behavior of jshint.
It would be nice if the ruby shell script passed all arguments to the original jshint. Right now, arguments are interpreted as "reporter" consts (a feature that is not even documented, afaik?).
Some tools, like syntastic for vim, expect
jshint
to be a system command that runs on a file. But when installing the gem, we get the following error:you can reproduce that by running this command
$ jshint app/assets/javascripts/application.js
is there a way around that? The gem seems to get in the way of the normal/expected behavior of jshint.