From 27806358b5e1c4d37b63b1c61595e86ff03b5b42 Mon Sep 17 00:00:00 2001 From: Lioness100 Date: Mon, 13 Feb 2023 02:26:52 -0500 Subject: [PATCH] docs: fix typos (#16884) * docs: fix typos * revert: elapseds -> elapsed --- docs/src/rules/arrow-parens.md | 2 +- lib/eslint/eslint-helpers.js | 2 +- lib/rules/logical-assignment-operators.js | 2 +- lib/rules/no-constant-binary-expression.js | 2 +- lib/rules/no-eval.js | 2 +- lib/rules/no-useless-return.js | 2 +- tests/bench/large.js | 2 +- tests/lib/eslint/flat-eslint.js | 4 ++-- tests/lib/rules/no-extra-parens.js | 4 ++-- tests/lib/rules/valid-jsdoc.js | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/src/rules/arrow-parens.md b/docs/src/rules/arrow-parens.md index fdc13bb4f50..8b956c35664 100644 --- a/docs/src/rules/arrow-parens.md +++ b/docs/src/rules/arrow-parens.md @@ -133,7 +133,7 @@ var b = 0; if ((a) => b) { console.log('truthy value returned'); } else { - console.log('falsey value returned'); + console.log('falsy value returned'); } // outputs 'truthy value returned' ``` diff --git a/lib/eslint/eslint-helpers.js b/lib/eslint/eslint-helpers.js index 806a103b0c4..72cf9114e73 100644 --- a/lib/eslint/eslint-helpers.js +++ b/lib/eslint/eslint-helpers.js @@ -223,7 +223,7 @@ function globMatch({ basePath, pattern }) { * should be thrown when a pattern is unmatched. * @returns {Promise>} An array of matching file paths * or an empty array if there are no matches. - * @throws {UnmatchedSearchPatternsErrror} If there is a pattern that doesn't + * @throws {UnmatchedSearchPatternsError} If there is a pattern that doesn't * match any files. */ async function globSearch({ diff --git a/lib/rules/logical-assignment-operators.js b/lib/rules/logical-assignment-operators.js index bd2357acf43..cd533e63a73 100644 --- a/lib/rules/logical-assignment-operators.js +++ b/lib/rules/logical-assignment-operators.js @@ -112,7 +112,7 @@ function isBooleanCast(expression, scope) { /** * Returns true for: * truthiness checks: value, Boolean(value), !!value - * falsyness checks: !value, !Boolean(value) + * falsiness checks: !value, !Boolean(value) * nullish checks: value == null, value === undefined || value === null * @param {ASTNode} expression Test condition * @param {import('eslint-scope').Scope} scope Scope of the expression diff --git a/lib/rules/no-constant-binary-expression.js b/lib/rules/no-constant-binary-expression.js index dccfa2f5826..b6ba1752a8c 100644 --- a/lib/rules/no-constant-binary-expression.js +++ b/lib/rules/no-constant-binary-expression.js @@ -348,7 +348,7 @@ function isAlwaysNew(scope, node) { * user-defined constructors could return a sentinel * object. * - * Catching these is especially useful for primitive constructures + * Catching these is especially useful for primitive constructors * which return boxed values, a surprising gotcha' in JavaScript. */ return Object.hasOwnProperty.call(globals.builtin, node.callee.name) && diff --git a/lib/rules/no-eval.js b/lib/rules/no-eval.js index 03f7b1f691c..a1b32cc307b 100644 --- a/lib/rules/no-eval.js +++ b/lib/rules/no-eval.js @@ -72,7 +72,7 @@ module.exports = { let funcInfo = null; /** - * Pushs a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack. + * Pushes a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack. * Top-level scopes are handled separately. * * This is used in order to check whether or not `this` binding is a diff --git a/lib/rules/no-useless-return.js b/lib/rules/no-useless-return.js index be8d4dfd3a5..55e34b3ab0f 100644 --- a/lib/rules/no-useless-return.js +++ b/lib/rules/no-useless-return.js @@ -197,7 +197,7 @@ module.exports = { return { - // Makes and pushs a new scope information. + // Makes and pushes a new scope information. onCodePathStart(codePath) { scopeInfo = { upper: scopeInfo, diff --git a/tests/bench/large.js b/tests/bench/large.js index a3db1ac6c8d..5361f0a0324 100644 --- a/tests/bench/large.js +++ b/tests/bench/large.js @@ -50947,7 +50947,7 @@ exports.debuglog = function(set) { /** - * Echos the value of a value. Trys to print the value out + * Echos the value of a value. Tries to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. diff --git a/tests/lib/eslint/flat-eslint.js b/tests/lib/eslint/flat-eslint.js index ee17c3213cc..acb61e9e3e0 100644 --- a/tests/lib/eslint/flat-eslint.js +++ b/tests/lib/eslint/flat-eslint.js @@ -5270,7 +5270,7 @@ describe("FlatESLint", () => { assert.strictEqual(messages[1].severity, 2); }); - it("when it has 'files' they should be intepreted as relative to the config file", async () => { + it("when it has 'files' they should be interpreted as relative to the config file", async () => { /* * `fixtures/plugins` directory does not have a config file. @@ -5293,7 +5293,7 @@ describe("FlatESLint", () => { assert.strictEqual(messages[0].ruleId, "semi"); }); - it("when it has 'ignores' they should be intepreted as relative to the config file", async () => { + it("when it has 'ignores' they should be interpreted as relative to the config file", async () => { /* * `fixtures/plugins` directory does not have a config file. diff --git a/tests/lib/rules/no-extra-parens.js b/tests/lib/rules/no-extra-parens.js index 6c14cc0ab61..c51a47cfd3f 100644 --- a/tests/lib/rules/no-extra-parens.js +++ b/tests/lib/rules/no-extra-parens.js @@ -3334,14 +3334,14 @@ ruleTester.run("no-extra-parens", rule, { code: ` if (condition) { /** @type {ServerOptions} */ - /** extra coment */ + /** extra comment */ (options.server.options).requestCert = false; } `, output: ` if (condition) { /** @type {ServerOptions} */ - /** extra coment */ + /** extra comment */ options.server.options.requestCert = false; } `, diff --git a/tests/lib/rules/valid-jsdoc.js b/tests/lib/rules/valid-jsdoc.js index 3b9d9d09cf6..325064fc189 100644 --- a/tests/lib/rules/valid-jsdoc.js +++ b/tests/lib/rules/valid-jsdoc.js @@ -541,7 +541,7 @@ ruleTester.run("valid-jsdoc", rule, { options: [{ requireReturn: false }] }, - // https://github.com/eslint/eslint/issues/9412 - different orders for jsodc tags + // https://github.com/eslint/eslint/issues/9412 - different orders for jsdoc tags { code: "/**\n" +