node-jslint icon indicating copy to clipboard operation
node-jslint copied to clipboard

Add secret options to usage hint

Open mk-pmb opened this issue 9 years ago • 4 comments

From browsing the issues, I leaned that I'll want --fudge and --es6 from now on, so I'd like my wrapper script to be able to detect their availability. Could you add them to the usage hint?

$ jslint --help 2>&1 | grep -oPe '\[--(f|es)\S+'
[--es5]
[--filter]
[--forin]
$ jslint --version
node-jslint version: 0.10.1  JSLint edition 2013-08-26

mk-pmb avatar Aug 03 '16 18:08 mk-pmb

I think you need

jslint --edition=es6 --fudge

smikes avatar Jul 18 '17 17:07 smikes

Yes, but only in versions that support --fudge. Those versions shall advertize their support for --fudge in their --help options list, so my wrappper can detect whether it's supported.

PS: In case you meant --help instead of --fudge, I just tried that, output doesn't contain "fudge":

$ jslint --edition=es6 --help |& grep fud
$ nodever jslint
require('jslint/package.json').version = 0.11.0

mk-pmb avatar Jul 18 '17 17:07 mk-pmb

Are you sure you want to consume the interface that we provide here? If you're programmatically using Doug Crockford's jslint interface -- https://github.com/douglascrockford/jslint -- then you don't have to work around me :-)

smikes avatar Jul 18 '17 17:07 smikes

In my case I like the CLI more, because the wrapper script is written in bash and aggregates output from other linters (e.g. PHP syntax check) as well.

mk-pmb avatar Jul 18 '17 19:07 mk-pmb