Skip to content

jshint cli overrides existing cli script and throws an error #35

@ychaker

Description

@ychaker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions