Bgouveia / jshint_on_rails

JSHint on Rails - Forked from psionides/jslint_on_rails to work with JSHint - the check tool that does not tyrannize your code, by jshint community

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird behavior with inline options in JS files

ezilocchi opened this issue · comments

I've perceived an strange behavior when I used the comment options on a JS file. For instance I added this line: /*jshint maxlen:1000 */ at the beginning of the file, so I was expecting that jshint sets the max length per line up to 1000 only for that file. Well that worked fine, but when I run 'rake jshint' for all the JS files in the project it started to behave weird. Basically it applied that option (/*jshint maxlen:1000 */) for all the files that were loaded after that one.

I guess that the expected behavior should apply the inline option just for the file that declared it.

Did you find a solution for it?

Updating to the latest version seems to fix it. I'm merging a request in the next few days.

:) thanks