• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jshint / jshint / 2006 / 2
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 09 Jul 2015 12:53AM UTC
Files 13
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jul 2015 12:53AM UTC coverage: 97.293%. Remained the same
2006.2

push

travis-ci

Mike Pennisi
Support `--prereq` CLI options

Since [the docs][1] mention it, and it's already supported via [config][2],
I thought I'd just pop the CLI support in.

This PR make `jshint` allow specifying the `--prereq` option on the command
line, accepting a comma-separated list of paths.

Test-related notes:

- Fixes the existing `testPrereq` test to check the right exit code. In its
  current incarnation, it could never fail (even when `lint` didn't pass)
- Added 2 tests for specifying the `--prereq` options from the command line.

Implementation notes:

I did the simplest thing possible (just merging the CLI `prereq` options in
with the config ones in the `run` method in `cli.js`). It's a little bit
awkward because there are 2 paths to `lint`:

1. `opts.useStdin`
2. `!opts.useStdin`

And each loads the config in a slightly different way. So the `mergeCLIPrereq`
function has to be in 2 code paths. So, slightly awkward, but not too terrible.

Fixes #1685.

[1]: http://jshint.com/docs/cli
[2]: https://github.com/jshint/jshint/blob/master/src/cli.js#L451-458

Conflicts:

	src/cli.js
	tests/cli.js

3774 of 3879 relevant lines covered (97.29%)

3039.52 hits per line

Source Files on job 2006.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2006
  • Travis Job 2006.2
  • 81fe3fa7 on github
  • Prev Job for on master (#1997.2)
  • Next Job for on master (#2007.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc