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

docs: fix typos #16884

Merged
merged 2 commits into from Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 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');
Lioness100 marked this conversation as resolved.
Show resolved Hide resolved
}
// 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)
Lioness100 marked this conversation as resolved.
Show resolved Hide resolved
* 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
2 changes: 1 addition & 1 deletion tools/fuzzer-runner.js
Expand Up @@ -47,7 +47,7 @@ function run({ amount = 300, fuzzBrokenAutofixes = true } = {}) {
* a crash-only fuzzer run versus an autofix fuzzer run.
*/
const progressBar = new ProgressBar(
"Fuzzing rules [:bar] :percent, :elapseds elapsed, eta :etas, errors so far: :elapsedErrors",
"Fuzzing rules [:bar] :percent, :elapsed elapsed, eta :etas, errors so far: :elapsedErrors",
Lioness100 marked this conversation as resolved.
Show resolved Hide resolved
{ width: 30, total: crashTestCount + autofixTestCount * ESTIMATED_CRASH_AUTOFIX_PERFORMANCE_RATIO }
);

Expand Down