diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9152bf9e0..1ee2c3107 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,7 +11,7 @@ Follow the existing code style. Check the tests succeed, including format and li Don't update the CHANGELOG or package version number. That gets done by maintainers when preparing the release. Commander currently has zero production dependencies. That isn't a hard requirement, but is a simple story. Requests which -add a dependency are much less likely to be accepted, and we are likely to ask if there alternative approaches to avoid the dependency. +add a dependency are much less likely to be accepted, and we are likely to ask for alternative approaches to avoid the dependency. --> ## Problem diff --git a/CHANGELOG.md b/CHANGELOG.md index f73e7a1c6..1221a9e4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1135,7 +1135,7 @@ program ## 0.2.0 / 2011-09-26 -* Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] +* Allow for defaults that are not just boolean. Default reassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] ## 0.1.0 / 2011-08-24 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e00e59ac1..553ff2e40 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ you should say so in your comments so we focus on the concept first before talki - README - examples/ -Commander currently has zero production dependencies. That isn't a hard requirement, but is a simple story. Requests which add a dependency are much less likely to be accepted, and we are likely to ask if there alternative approaches to avoid the dependency. +Commander currently has zero production dependencies. That isn't a hard requirement, but is a simple story. Requests which add a dependency are much less likely to be accepted, and we are likely to ask for alternative approaches to avoid the dependency. - - diff --git "a/docs/zh-CN/\344\270\215\345\206\215\346\216\250\350\215\220\344\275\277\347\224\250\347\232\204\345\212\237\350\203\275.md" "b/docs/zh-CN/\344\270\215\345\206\215\346\216\250\350\215\220\344\275\277\347\224\250\347\232\204\345\212\237\350\203\275.md" index b0b384326..a4a91dd58 100644 --- "a/docs/zh-CN/\344\270\215\345\206\215\346\216\250\350\215\220\344\275\277\347\224\250\347\232\204\345\212\237\350\203\275.md" +++ "b/docs/zh-CN/\344\270\215\345\206\215\346\216\250\350\215\220\344\275\277\347\224\250\347\232\204\345\212\237\350\203\275.md" @@ -32,7 +32,7 @@ program.option('-c,--coffee ', 'coffee', /short-white|long-black/); 此选项曾被用作传入`.command()`方法,以在内建的帮助信息中隐藏该命令: ```js -program.command('example', 'examnple command', { noHelp: true }); +program.command('example', 'example command', { noHelp: true }); ``` 在 Commander v5.1 中,该选项被更名为`hidden`。自 Commander v7 起`noHelp`不再推荐使用。 diff --git a/examples/custom-command-class.js b/examples/custom-command-class.js index 0368c9033..d577e3dad 100755 --- a/examples/custom-command-class.js +++ b/examples/custom-command-class.js @@ -12,7 +12,7 @@ class CommandWithTrace extends commander.Command { } } -function inpectCommand(command) { +function inspectCommand(command) { // The option value is stored as property on command because we called .storeOptionsAsProperties() console.log(`Called '${command.name()}'`); console.log(`args: ${command.args}`); @@ -22,18 +22,18 @@ function inpectCommand(command) { const program = new CommandWithTrace('program') .option('-v, ---verbose') .action((options, command) => { - inpectCommand(command); + inspectCommand(command); }); program .command('serve [params...]') .option('-p, --port ', 'port number') .action((params, options, command) => { - inpectCommand(command); + inspectCommand(command); }); program.command('build ').action((buildTarget, options, command) => { - inpectCommand(command); + inspectCommand(command); }); program.parse(); diff --git a/lib/help.js b/lib/help.js index ed6f9916b..750b23ad9 100644 --- a/lib/help.js +++ b/lib/help.js @@ -350,11 +350,11 @@ class Help { ); } if (extraInfo.length > 0) { - const extraDescripton = `(${extraInfo.join(', ')})`; + const extraDescription = `(${extraInfo.join(', ')})`; if (argument.description) { - return `${argument.description} ${extraDescripton}`; + return `${argument.description} ${extraDescription}`; } - return extraDescripton; + return extraDescription; } return argument.description; } diff --git a/lib/option.js b/lib/option.js index 40767e9cf..355e58278 100644 --- a/lib/option.js +++ b/lib/option.js @@ -207,7 +207,7 @@ class Option { /** * Return option name, in a camelcase format that can be used - * as a object attribute key. + * as an object attribute key. * * @return {string} */ diff --git a/tests/command.parseOptions.test.js b/tests/command.parseOptions.test.js index afb2c109f..3c182920a 100644 --- a/tests/command.parseOptions.test.js +++ b/tests/command.parseOptions.test.js @@ -5,7 +5,7 @@ const util = require('util'); const execFileAsync = util.promisify(childProcess.execFile); -// Combination of parse and parseOptions tests which are are more about details +// Combination of parse and parseOptions tests which are more about details // than high level behaviours which are tested elsewhere. // Tests created from reported bugs @@ -231,7 +231,7 @@ describe('parse and program.args', () => { // Commander conformance: // - allows separate argument for required option-argument // - allows value in same argument for short flag with required option-argument -// - non-conforming: allows separate argument for optional option-argument if does not start with '-' +// - non-conforming: allows separate argument for optional option-argument if it does not start with '-' // - allows value in same argument for short flag with optional option-argument // - allows short flags as per 12.2 // diff --git a/tests/command.positionalOptions.test.js b/tests/command.positionalOptions.test.js index 860dc377d..0ccae0a91 100644 --- a/tests/command.positionalOptions.test.js +++ b/tests/command.positionalOptions.test.js @@ -424,7 +424,7 @@ describe('program with action handler and passThrough and subcommand', () => { expect(sub.opts().debug).toBe(true); }); - // This is somewhat of a side-affect of supporting previous test. + // This is somewhat of a side-effect of supporting previous test. test('when shared option after subcommand then parsed by subcommand', () => { const { program, sub } = makeProgram(); program.parse(['sub', '-g'], { from: 'user' }); diff --git a/typings/index.d.ts b/typings/index.d.ts index d68b1a16d..0f48ae935 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -190,7 +190,7 @@ export class Option { /** * Return option name, in a camelcase format that can be used - * as a object attribute key. + * as an object attribute key. */ attributeName(): string; diff --git a/typings/index.test-d.ts b/typings/index.test-d.ts index 0cc54dd9b..9337def46 100644 --- a/typings/index.test-d.ts +++ b/typings/index.test-d.ts @@ -1,7 +1,7 @@ import * as commander from './index'; import { expectType } from 'tsd'; -// We are are not just checking return types here, we are also implicitly checking that the expected syntax is allowed. +// We are not just checking return types here, we are also implicitly checking that the expected syntax is allowed. /* eslint-disable @typescript-eslint/no-empty-function */