From 21edd785b725aedde62e843bf2748fb8c10eb5ac Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Tue, 17 Sep 2019 00:17:35 -0400 Subject: [PATCH] Rename --info -> --env-info --- docs/user-guide/command-line-interface.md | 4 ++-- lib/cli.js | 2 +- lib/options.js | 2 +- tests/lib/cli.js | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/user-guide/command-line-interface.md b/docs/user-guide/command-line-interface.md index 64a85e25420..8938bc91f24 100644 --- a/docs/user-guide/command-line-interface.md +++ b/docs/user-guide/command-line-interface.md @@ -78,7 +78,7 @@ Caching: Miscellaneous: --init Run config initialization wizard - default: false - --info Output execution environment information - default: false + --env-info Output execution environment information - default: false --debug Output debugging information -h, --help Show help -v, --version Output the version number @@ -447,7 +447,7 @@ This option will start config initialization wizard. It's designed to help new u The resulting configuration file will be created in the current directory. -#### `--info` +#### `--env-info` This option outputs information about the execution environment, including the version of Node, npm, and local and global installations of ESLint. The ESLint team may ask for this information to help solve bugs. diff --git a/lib/cli.js b/lib/cli.js index 255ff1b2ace..18a917cf0b0 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -164,7 +164,7 @@ const cli = { if (currentOptions.version) { log.info(RuntimeInfo.version()); - } else if (currentOptions.info) { + } else if (currentOptions.envInfo) { try { log.info(RuntimeInfo.environment()); return 0; diff --git a/lib/options.js b/lib/options.js index 227093e4b13..83bf9afc22c 100644 --- a/lib/options.js +++ b/lib/options.js @@ -225,7 +225,7 @@ module.exports = optionator({ description: "Run config initialization wizard" }, { - option: "info", + option: "env-info", type: "Boolean", default: "false", description: "Output execution environment information" diff --git a/tests/lib/cli.js b/tests/lib/cli.js index 859dab5d994..1b98fb137a7 100644 --- a/tests/lib/cli.js +++ b/tests/lib/cli.js @@ -332,16 +332,16 @@ describe("cli", () => { }); }); - describe("when executing with info flag", () => { + describe("when executing with env-info flag", () => { it("should print out environment information", () => { - assert.strictEqual(cli.execute("--info"), 0); + assert.strictEqual(cli.execute("--env-info"), 0); assert.strictEqual(log.info.callCount, 1); }); it("should print error message and return error code", () => { RuntimeInfo.environment.throws("There was an error!"); - assert.strictEqual(cli.execute("--info"), 2); + assert.strictEqual(cli.execute("--env-info"), 2); assert.strictEqual(log.error.callCount, 1); }); });