sbt-jshint icon indicating copy to clipboard operation
sbt-jshint copied to clipboard

Can't specify command line options to jshint?

Open jxtps opened this issue 11 years ago • 3 comments

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?

jxtps avatar Jul 30 '14 22:07 jxtps

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.

huntc avatar Jul 31 '14 00:07 huntc

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

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

jxtps avatar Jul 31 '14 00:07 jxtps

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

huntc avatar Jul 31 '14 00:07 huntc