Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cleanup typos #15939

Merged
merged 1 commit into from May 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/eslint.js
Expand Up @@ -69,7 +69,7 @@ function getErrorMessage(error) {
// Lazy loading because this is used only if an error happened.
const util = require("util");

// Foolproof -- thirdparty module might throw non-object.
// Foolproof -- third-party module might throw non-object.
if (typeof error !== "object" || error === null) {
return String(error);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/eslint/eslint.js
Expand Up @@ -104,9 +104,9 @@ function isNonEmptyString(x) {
}

/**
* Check if a given value is an array of non-empty stringss or not.
* Check if a given value is an array of non-empty strings or not.
* @param {any} x The value to check.
* @returns {boolean} `true` if `x` is an array of non-empty stringss.
* @returns {boolean} `true` if `x` is an array of non-empty strings.
*/
function isArrayOfNonEmptyString(x) {
return Array.isArray(x) && x.every(isNonEmptyString);
Expand Down Expand Up @@ -599,7 +599,7 @@ class ESLint {
* The following values are allowed:
* - `undefined` ... Load `stylish` builtin formatter.
* - A builtin formatter name ... Load the builtin formatter.
* - A thirdparty formatter name:
* - A third-party formatter name:
* - `foo` → `eslint-formatter-foo`
* - `@foo` → `@foo/eslint-formatter`
* - `@foo/bar` → `@foo/eslint-formatter-bar`
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/function-paren-newline.js
Expand Up @@ -183,7 +183,7 @@ module.exports = {
/**
* Gets the left paren and right paren tokens of a node.
* @param {ASTNode} node The node with parens
* @throws {TypeError} Unexecpted node type.
* @throws {TypeError} Unexpected node type.
* @returns {Object} An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token.
* Can also return `null` if an expression has no parens (e.g. a NewExpression with no arguments, or an ArrowFunctionExpression
* with a single parameter)
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/max-statements.js
Expand Up @@ -126,7 +126,7 @@ module.exports = {

/*
* This rule does not apply to class static blocks, but we have to track them so
* that stataments in them do not count as statements in the enclosing function.
* that statements in them do not count as statements in the enclosing function.
*/
if (node.type === "StaticBlock") {
return;
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/no-constant-binary-expression.js
Expand Up @@ -120,7 +120,7 @@ function isStaticBoolean(scope, node) {

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

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

/*
* In theory we could handle short circuting assignment operators,
* In theory we could handle short-circuiting assignment operators,
* for some constant values, but that would require walking the
* scope to find the value of the variable being assigned. This is
* dependant on https://github.com/eslint/eslint/issues/13776
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/no-implicit-coercion.js
Expand Up @@ -30,9 +30,9 @@ function parseOptions(options) {
}

/**
* Checks whether or not a node is a double logical nigating.
* Checks whether or not a node is a double logical negating.
* @param {ASTNode} node An UnaryExpression node to check.
* @returns {boolean} Whether or not the node is a double logical nigating.
* @returns {boolean} Whether or not the node is a double logical negating.
*/
function isDoubleLogicalNegating(node) {
return (
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-loop-func.js
Expand Up @@ -125,7 +125,7 @@ function isSafe(loopNode, reference) {
* The reference is every reference of the upper scope's variable we are
* looking now.
*
* It's safeafe if the reference matches one of the following condition.
* It's safe if the reference matches one of the following condition.
* - is readonly.
* - doesn't exist inside a local function and after the border.
* @param {eslint-scope.Reference} upperRef A reference to check.
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-new-object.js
Expand Up @@ -29,7 +29,7 @@ module.exports = {
schema: [],

messages: {
preferLiteral: "The object literal notation {} is preferrable."
preferLiteral: "The object literal notation {} is preferable."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only user facing change

}
},

Expand Down