Skip to content

Commit

Permalink
docs: fix typos (#16884)
Browse files Browse the repository at this point in the history
* docs: fix typos

* revert: elapseds -> elapsed
  • Loading branch information
Lioness100 committed Feb 13, 2023
1 parent 5bdaae2 commit 2780635
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/src/rules/arrow-parens.md
Expand Up @@ -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'
```
Expand Down
2 changes: 1 addition & 1 deletion lib/eslint/eslint-helpers.js
Expand Up @@ -223,7 +223,7 @@ function globMatch({ basePath, pattern }) {
* should be thrown when a pattern is unmatched.
* @returns {Promise<Array<string>>} 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({
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/logical-assignment-operators.js
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-constant-binary-expression.js
Expand Up @@ -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) &&
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-eval.js
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-useless-return.js
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/large.js
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/eslint/flat-eslint.js
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/rules/no-extra-parens.js
Expand Up @@ -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;
}
`,
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/valid-jsdoc.js
Expand Up @@ -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" +
Expand Down

0 comments on commit 2780635

Please sign in to comment.