Skip to content

Commit 54c0953

Browse files
authored
fix: cleanup typos (#15939)
1 parent 845a7af commit 54c0953

8 files changed

Lines changed: 13 additions & 13 deletions

bin/eslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function getErrorMessage(error) {
6969
// Lazy loading because this is used only if an error happened.
7070
const util = require("util");
7171

72-
// Foolproof -- thirdparty module might throw non-object.
72+
// Foolproof -- third-party module might throw non-object.
7373
if (typeof error !== "object" || error === null) {
7474
return String(error);
7575
}

lib/eslint/eslint.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ function isNonEmptyString(x) {
104104
}
105105

106106
/**
107-
* Check if a given value is an array of non-empty stringss or not.
107+
* Check if a given value is an array of non-empty strings or not.
108108
* @param {any} x The value to check.
109-
* @returns {boolean} `true` if `x` is an array of non-empty stringss.
109+
* @returns {boolean} `true` if `x` is an array of non-empty strings.
110110
*/
111111
function isArrayOfNonEmptyString(x) {
112112
return Array.isArray(x) && x.every(isNonEmptyString);
@@ -599,7 +599,7 @@ class ESLint {
599599
* The following values are allowed:
600600
* - `undefined` ... Load `stylish` builtin formatter.
601601
* - A builtin formatter name ... Load the builtin formatter.
602-
* - A thirdparty formatter name:
602+
* - A third-party formatter name:
603603
* - `foo` → `eslint-formatter-foo`
604604
* - `@foo` → `@foo/eslint-formatter`
605605
* - `@foo/bar` → `@foo/eslint-formatter-bar`

lib/rules/function-paren-newline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ module.exports = {
183183
/**
184184
* Gets the left paren and right paren tokens of a node.
185185
* @param {ASTNode} node The node with parens
186-
* @throws {TypeError} Unexecpted node type.
186+
* @throws {TypeError} Unexpected node type.
187187
* @returns {Object} An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token.
188188
* Can also return `null` if an expression has no parens (e.g. a NewExpression with no arguments, or an ArrowFunctionExpression
189189
* with a single parameter)

lib/rules/max-statements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ module.exports = {
126126

127127
/*
128128
* This rule does not apply to class static blocks, but we have to track them so
129-
* that stataments in them do not count as statements in the enclosing function.
129+
* that statements in them do not count as statements in the enclosing function.
130130
*/
131131
if (node.type === "StaticBlock") {
132132
return;

lib/rules/no-constant-binary-expression.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function isStaticBoolean(scope, node) {
120120

121121
/**
122122
* Test if an AST node will always give the same result when compared to a
123-
* bolean value. Note that comparison to boolean values is different than
123+
* boolean value. Note that comparison to boolean values is different than
124124
* truthiness.
125125
* https://262.ecma-international.org/5.1/#sec-11.9.3
126126
*
@@ -238,7 +238,7 @@ function hasConstantLooseBooleanComparison(scope, node) {
238238

239239
/**
240240
* Test if an AST node will always give the same result when _strictly_ compared
241-
* to a bolean value. This can happen if the expression can never be boolean, or
241+
* to a boolean value. This can happen if the expression can never be boolean, or
242242
* if it is always the same boolean value.
243243
* @param {Scope} scope The scope in which the node was found.
244244
* @param {ASTNode} node The node to test
@@ -488,7 +488,7 @@ module.exports = {
488488
}
489489

490490
/*
491-
* In theory we could handle short circuting assignment operators,
491+
* In theory we could handle short-circuiting assignment operators,
492492
* for some constant values, but that would require walking the
493493
* scope to find the value of the variable being assigned. This is
494494
* dependant on https://github.com/eslint/eslint/issues/13776

lib/rules/no-implicit-coercion.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ function parseOptions(options) {
3030
}
3131

3232
/**
33-
* Checks whether or not a node is a double logical nigating.
33+
* Checks whether or not a node is a double logical negating.
3434
* @param {ASTNode} node An UnaryExpression node to check.
35-
* @returns {boolean} Whether or not the node is a double logical nigating.
35+
* @returns {boolean} Whether or not the node is a double logical negating.
3636
*/
3737
function isDoubleLogicalNegating(node) {
3838
return (

lib/rules/no-loop-func.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function isSafe(loopNode, reference) {
125125
* The reference is every reference of the upper scope's variable we are
126126
* looking now.
127127
*
128-
* It's safeafe if the reference matches one of the following condition.
128+
* It's safe if the reference matches one of the following condition.
129129
* - is readonly.
130130
* - doesn't exist inside a local function and after the border.
131131
* @param {eslint-scope.Reference} upperRef A reference to check.

lib/rules/no-new-object.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
schema: [],
3030

3131
messages: {
32-
preferLiteral: "The object literal notation {} is preferrable."
32+
preferLiteral: "The object literal notation {} is preferable."
3333
}
3434
},
3535

0 commit comments

Comments
 (0)