sbt / sbt-jshint

Allows jslint to be used from within sbt. Builds on com.typesafe:webdriver in order to execute jslint.js along with the scripts to verify
Other
21 stars 20 forks source link

Can't specify command line options to jshint? #15

Open jxtps opened 10 years ago

jxtps commented 10 years ago

I need to disable some of the warnings (which for some reason seem to be interpreted as errors by Play?!), but they don't have explicit names. The technique for doing that is outlined on http://www.jshint.com/docs/ - just add the --verbose flag to the command line.

But how do I do that in sbt-jshint?

Reading https://github.com/sbt/sbt-jshint/blob/master/src/main/scala/com/typesafe/sbt/jshint/SbtJSHint.scala and https://github.com/sbt/sbt-jshint/blob/master/src/main/resources/jshint-shell.js seems to indicate that it's not currently possible?

huntc commented 10 years ago

Please note the last para of the README:

Options can be specified in accordance with the JSHint website and they share the same set of defaults. To set an option you can provide a .jshintrc file within your project's base directory. If there is no such file then a .jshintrc file will be search for in your home directory. This behaviour can be overridden by using a JshintKeys.config setting for the plugin. JshintKeys.config is used to specify the location of a configuration file.

jxtps commented 10 years ago

Yes, I can specify the options using the .jshintrc, but not the _commandline options!?

(the --verbose flag doesn't appear to be possible to specify in the .jshintrc file?)

huntc commented 10 years ago

I see - sorry for not reading properly. PRs are welcome. :-)