3

I'm attempting to run jsHint from the command line using Rhino. I want to make the check an automatic part of my teams checkin process.

I have the basic configuration working using the command:

java -jar .rhino.jar ./jshint.js ./samplefile.js

That outputs the standard jsHint messages for my (intentionally error-ridden) sample file. And adding config comments to the top of the sample file works correctly. However I would like to add a project level config file to specify the options I want for each file without adding comments to each individual file.

I found instructions to do so for the node.js command line based tool, but have been unable to replicate this with the Rhino wrapper.
I attempted various variations on:

java -jar .rhino.jar ./jshint.js ./samplefile.js --configure=./config.js

but that didn't seem to work for the rhino version.
Any pointers?

UPDATE:

Found this question (Custom Settings with jshint-rhino) from a few weeks ago.

This pointed out that the following format works:

java -jar .rhino.jar ./jshint.js ./samplefile.js option1=true option2=false global global

This worked for me, however I would like to specify a large amount of options and have it be easily configurable, so I would very much prefer to use a json config file as in the node.js distribution.

Could somebody confirm that this is possible/not possible?

4

1 回答 1

1

Unfortunately, our Rhino wrapper is pretty basic and doesn't support config files. It would be nice to have that—perhaps you would like to create a ticket?

于 2012-10-19T18:23:11.983 回答