Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The `HELP` file is not used anymore.

The `cli` module now handles `-h/--help` commands internally.
  • Loading branch information...
commit 506f2c7509cd6e55a2167d5639c60701a0a5fdbf 1 parent 5afc235
@brentlintner brentlintner authored
Showing with 2 additions and 50 deletions.
  1. +0 −12 HELP
  2. +2 −4 README.md
  3. +0 −1  package.json
  4. +0 −33 test/unit/cli.js
View
12 HELP
@@ -1,12 +0,0 @@
-Usage:
- hint [OPTIONS] [ARGS]
-
-Options:
- -v, --version BOOLEAN display package version
- --config STRING custom config file
- --reporter STRING custom reporter
- --jslint-reporter use a jslint compatible xml reporter
- --show-non-errors show additional data generated by jshint
- --extra-ext STRING comma-separated list of file extensions to use (.js
- is default)
- -h, --help Display help and usage details
View
6 README.md
@@ -10,9 +10,7 @@ To use jshint from any location (for npm v1.x) you need to install using the glo
## Usage
-The command line interface looks like this.
-
- jshint path path2 [options]
+ jshint -h
You can also require JSHint itself as a module.
@@ -68,7 +66,7 @@ Default extension for files is ".js". If you want to use JSHint with other file
## Ignoring Files and Directories
-If there is a .jshintignore file in your project's directory tree, (also provided you run `jshint` from within your project's directory true) then any directories or files specified will be skipped over. (behaves just like a `.gitignore` file)
+If there is a .jshintignore file in your project's directory tree, (also provided you run `jshint` from within your project's directory) then any directories or files specified will be skipped over. (behaves just like a `.gitignore` file)
**Note:** Pattern matching uses minimatch, with the nocase [option](https://github.com/isaacs/minimatch). When there is no match, it performs a left side match (when no forward slashes present and path is a directory).
View
1  package.json
@@ -19,7 +19,6 @@
"packages/jshint/jshint.js",
"README.md",
"LICENSE",
- "HELP",
"bin/hint",
"lib"
],
View
33 test/unit/cli.js
@@ -15,39 +15,6 @@ describe("cli", function () {
spyOn(process.stdout, "write");
});
- it("interprets --help with no args", function () {
- var txt = require('fs').readFileSync(__dirname + "/../../HELP", "utf-8"),
- got = [],
- i = 0;
-
- spyOn(console, "error");
- try {
- cli.interpret(["node", "hint"]);
- } catch (err) { if (err !== "ProcessExit") throw err; }
-
- for (i = 0; i < console.error.calls.length; i++)
- got.push(console.error.calls[i].args[0]);
-
- //require('fs').writeFileSync(__dirname + "/../../HELP", got.join("\n"), "utf-8");
- expect(got.join("\n")).toEqual(txt);
- });
-
- it("interprets --help", function () {
- var txt = require('fs').readFileSync(__dirname + "/../../HELP", "utf-8"),
- got = [],
- i = 0;
-
- spyOn(console, "error");
- try {
- cli.interpret(["node", "hint", "file.js", "--help"]);
- } catch (err) { if (err !== "ProcessExit") throw err; }
-
- for (i = 0; i < console.error.calls.length; i++)
- got.push(console.error.calls[i].args[0]);
-
- expect(got.join("\n")).toEqual(txt);
- });
-
it("interprets --config", function () {
var config = {};

2 comments on commit 506f2c7

@halkeye

Awesome. Getting that unit test to work was the hardest part of the patch

@brentlintner
Collaborator

Sigh, yeah. Sorry to have missed that in the review. Since the file was still there, I had assumed it was still being used! :-/

Please sign in to comment.
Something went wrong with that request. Please try again.