diff --git a/tests/fixtures/parsers/arrow-parens/identifer-type.js b/tests/fixtures/parsers/arrow-parens/identifier-type.js similarity index 100% rename from tests/fixtures/parsers/arrow-parens/identifer-type.js rename to tests/fixtures/parsers/arrow-parens/identifier-type.js diff --git a/tests/lib/cli-engine/cli-engine.js b/tests/lib/cli-engine/cli-engine.js index b979bd89201..2d2d8ba9892 100644 --- a/tests/lib/cli-engine/cli-engine.js +++ b/tests/lib/cli-engine/cli-engine.js @@ -5336,7 +5336,7 @@ describe("CLIEngine", () => { }); }); - describe("when retreiving version number", () => { + describe("when retrieving version number", () => { it("should return current version number", () => { const eslintCLI = require("../../../lib/cli-engine").CLIEngine; const version = eslintCLI.version; diff --git a/tests/lib/eslint/eslint.js b/tests/lib/eslint/eslint.js index 2cec67fde6b..980e7b49aa2 100644 --- a/tests/lib/eslint/eslint.js +++ b/tests/lib/eslint/eslint.js @@ -5212,7 +5212,7 @@ describe("ESLint", () => { }); }); - describe("when retreiving version number", () => { + describe("when retrieving version number", () => { it("should return current version number", () => { const eslintCLI = require("../../../lib/eslint").ESLint; const version = eslintCLI.version; diff --git a/tests/lib/linter/apply-disable-directives.js b/tests/lib/linter/apply-disable-directives.js index 512e400832e..de56f729627 100644 --- a/tests/lib/linter/apply-disable-directives.js +++ b/tests/lib/linter/apply-disable-directives.js @@ -667,7 +667,7 @@ describe("apply-disable-directives", () => { line: 1, column: 1, ruleId: null, - justification: "justificatiion" + justification: "justification" }], problems: [{ line: 3, column: 3, ruleId: "foo" }] }), diff --git a/tests/lib/linter/code-path-analysis/code-path.js b/tests/lib/linter/code-path-analysis/code-path.js index 760d5b39989..683f592145e 100644 --- a/tests/lib/linter/code-path-analysis/code-path.js +++ b/tests/lib/linter/code-path-analysis/code-path.js @@ -69,7 +69,7 @@ describe("CodePathAnalyzer", () => { /* * If you need to output the code paths and DOT graph information for a - * particular piece of code, udpate and uncomment the following test and + * particular piece of code, update and uncomment the following test and * then run: * DEBUG=eslint:code-path npx mocha tests/lib/linter/code-path-analysis/ * diff --git a/tests/lib/linter/config-comment-parser.js b/tests/lib/linter/config-comment-parser.js index f51fe693a73..e9f595d7750 100644 --- a/tests/lib/linter/config-comment-parser.js +++ b/tests/lib/linter/config-comment-parser.js @@ -215,7 +215,7 @@ describe("ConfigCommentParser", () => { }); }); - it("should parse list config with two items and exta whitespace", () => { + it("should parse list config with two items and extra whitespace", () => { const code = " a , b "; const result = commentParser.parseListConfig(code); diff --git a/tests/lib/linter/linter.js b/tests/lib/linter/linter.js index 8c121808e1b..05cb6d0f1d9 100644 --- a/tests/lib/linter/linter.js +++ b/tests/lib/linter/linter.js @@ -2625,7 +2625,7 @@ describe("Linter", () => { assert.strictEqual(suppressedMessages[1].ruleId, "quotes"); }); - it("should ignore violations of multiple rules when specified in mixed sinlge line and multi line comments", () => { + it("should ignore violations of multiple rules when specified in mixed single line and multi line comments", () => { const code = [ "/* eslint-disable-next-line", "no-alert", @@ -3915,7 +3915,7 @@ var a = "test2"; assert.strictEqual(suppressedMessages[0].suppressions.length, 2); }); - it("reports problems for multiple unused eslint-disable comments with mutliple ruleIds", () => { + it("reports problems for multiple unused eslint-disable comments with multiple ruleIds", () => { const code = [ "/* eslint no-undef: 2, no-void: 2 */", "/* eslint-disable no-undef -- j1 */", @@ -12562,7 +12562,7 @@ var a = "test2"; const code = ` /* eslint-disable-next-line no-alert -- description on why this exception is seen as appropriate but past a - comfortable reading line length + comfortable reading line length */ alert("buzz"); `; @@ -12689,7 +12689,7 @@ var a = "test2"; assert.strictEqual(suppressedMessages[1].ruleId, "quotes"); }); - it("should ignore violations of multiple rules when specified in mixed sinlge line and multi line comments", () => { + it("should ignore violations of multiple rules when specified in mixed single line and multi line comments", () => { const code = [ "/* eslint-disable-next-line", "no-alert", diff --git a/tests/lib/linter/node-event-generator.js b/tests/lib/linter/node-event-generator.js index 4004f7a2835..2719bf30e30 100644 --- a/tests/lib/linter/node-event-generator.js +++ b/tests/lib/linter/node-event-generator.js @@ -60,7 +60,7 @@ describe("NodeEventGenerator", () => { assert(emitter.emit.calledWith("Foo", dummyNode)); }); - it("should generate events for exitting AST node.", () => { + it("should generate events for exiting AST node.", () => { const dummyNode = { type: "Foo", value: 1 }; generator.leaveNode(dummyNode); diff --git a/tests/lib/rules/array-bracket-newline.js b/tests/lib/rules/array-bracket-newline.js index 90ee8213b77..3f2b66f549f 100644 --- a/tests/lib/rules/array-bracket-newline.js +++ b/tests/lib/rules/array-bracket-newline.js @@ -440,7 +440,7 @@ ruleTester.run("array-bracket-newline", rule, { invalid: [ - // default : { mutliline : true} + // default : { multiline : true} { code: `var foo = [ [1,2] diff --git a/tests/lib/rules/arrow-parens.js b/tests/lib/rules/arrow-parens.js index d2f32a784a3..c7af7f6dea8 100644 --- a/tests/lib/rules/arrow-parens.js +++ b/tests/lib/rules/arrow-parens.js @@ -46,7 +46,7 @@ const valid = [ { code: "a.then((foo) => {});", options: ["always"] }, { code: "a.then((foo) => { if (true) {}; });", options: ["always"] }, { code: "a.then(async (foo) => { if (true) {}; });", options: ["always"], parserOptions: { ecmaVersion: 8 } }, - { code: "(a: T) => a", options: ["always"], parser: parser("identifer-type") }, + { code: "(a: T) => a", options: ["always"], parser: parser("identifier-type") }, { code: "(a): T => a", options: ["always"], parser: parser("return-type") }, // "as-needed" @@ -64,7 +64,7 @@ const valid = [ { code: "async a => a", options: ["as-needed"], parserOptions: { ecmaVersion: 8 } }, { code: "async ([a, b]) => {}", options: ["as-needed"], parserOptions: { ecmaVersion: 8 } }, { code: "async (a, b) => {}", options: ["as-needed"], parserOptions: { ecmaVersion: 8 } }, - { code: "(a: T) => a", options: ["as-needed"], parser: parser("identifer-type") }, + { code: "(a: T) => a", options: ["as-needed"], parser: parser("identifier-type") }, { code: "(a): T => a", options: ["as-needed"], parser: parser("return-type") }, // "as-needed", { "requireForBlockBody": true } @@ -83,7 +83,7 @@ const valid = [ { code: "a => ({})", options: ["as-needed", { requireForBlockBody: true }] }, { code: "async a => ({})", options: ["as-needed", { requireForBlockBody: true }], parserOptions: { ecmaVersion: 8 } }, { code: "async a => a", options: ["as-needed", { requireForBlockBody: true }], parserOptions: { ecmaVersion: 8 } }, - { code: "(a: T) => a", options: ["as-needed", { requireForBlockBody: true }], parser: parser("identifer-type") }, + { code: "(a: T) => a", options: ["as-needed", { requireForBlockBody: true }], parser: parser("identifier-type") }, { code: "(a): T => a", options: ["as-needed", { requireForBlockBody: true }], parser: parser("return-type") }, { code: "const f = (/** @type {number} */a/**hello*/) => a + a;", diff --git a/tests/lib/rules/camelcase.js b/tests/lib/rules/camelcase.js index 79c237ce202..f634c71b43d 100644 --- a/tests/lib/rules/camelcase.js +++ b/tests/lib/rules/camelcase.js @@ -409,7 +409,7 @@ ruleTester.run("camelcase", rule, { parserOptions: { ecmaVersion: 2022 } }, - // Combinations of `properties` and `ignoreDestructring` + // Combinations of `properties` and `ignoreDestructuring` { code: ` const { some_property } = obj; @@ -1447,7 +1447,7 @@ ruleTester.run("camelcase", rule, { errors: [{ messageId: "notCamelCasePrivate", data: { name: "snake_case" } }] }, - // Combinations of `properties` and `ignoreDestructring` + // Combinations of `properties` and `ignoreDestructuring` { code: ` const { some_property } = obj; diff --git a/tests/lib/rules/max-lines-per-function.js b/tests/lib/rules/max-lines-per-function.js index ba01206f4a3..621d66e312d 100644 --- a/tests/lib/rules/max-lines-per-function.js +++ b/tests/lib/rules/max-lines-per-function.js @@ -143,7 +143,7 @@ if ( x === y ) { options: [{ max: 5, skipComments: true, skipBlankLines: false }] }, - // IIFEs should be recognised if IIFEs: true + // IIFEs should be recognized if IIFEs: true { code: `(function(){ let x = 0; @@ -155,7 +155,7 @@ if ( x === y ) { options: [{ max: 7, skipComments: true, skipBlankLines: false, IIFEs: true }] }, - // IIFEs should not be recognised if IIFEs: false + // IIFEs should not be recognized if IIFEs: false { code: `(function(){ let x = 0; @@ -167,7 +167,7 @@ if ( x === y ) { options: [{ max: 2, skipComments: true, skipBlankLines: false, IIFEs: false }] }, - // Arrow IIFEs should be recognised if IIFEs: true + // Arrow IIFEs should be recognized if IIFEs: true { code: `(() => { let x = 0; @@ -179,7 +179,7 @@ if ( x === y ) { options: [{ max: 7, skipComments: true, skipBlankLines: false, IIFEs: true }] }, - // Arrow IIFEs should not be recognised if IIFEs: false + // Arrow IIFEs should not be recognized if IIFEs: false { code: `(() => { let x = 0; @@ -194,7 +194,7 @@ if ( x === y ) { invalid: [ - // Test simple standalone function is recognised + // Test simple standalone function is recognized { code: "function name() {\n}", options: [1], @@ -203,7 +203,7 @@ if ( x === y ) { ] }, - // Test anonymous function assigned to variable is recognised + // Test anonymous function assigned to variable is recognized { code: "var func = function() {\n}", options: [1], @@ -212,7 +212,7 @@ if ( x === y ) { ] }, - // Test arrow functions are recognised + // Test arrow functions are recognized { code: "const bar = () => {\nconst x = 2 + 1;\nreturn x;\n}", options: [3], @@ -221,7 +221,7 @@ if ( x === y ) { ] }, - // Test inline arrow functions are recognised + // Test inline arrow functions are recognized { code: "const bar = () =>\n 2", options: [1], @@ -369,7 +369,7 @@ if ( x === y ) { ] }, - // Test regular methods are recognised + // Test regular methods are recognized { code: `class foo { method() { @@ -384,7 +384,7 @@ if ( x === y ) { ] }, - // Test static methods are recognised + // Test static methods are recognized { code: `class A { static @@ -399,7 +399,7 @@ if ( x === y ) { ] }, - // Test getters are recognised as properties + // Test getters are recognized as properties { code: `var obj = { get @@ -414,7 +414,7 @@ if ( x === y ) { ] }, - // Test setters are recognised as properties + // Test setters are recognized as properties { code: `var obj = { set diff --git a/tests/lib/rules/no-constant-binary-expression.js b/tests/lib/rules/no-constant-binary-expression.js index 5f80e53cdfe..c430c7787fd 100644 --- a/tests/lib/rules/no-constant-binary-expression.js +++ b/tests/lib/rules/no-constant-binary-expression.js @@ -21,7 +21,7 @@ const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2021, ecmaFeat ruleTester.run("no-constant-binary-expression", rule, { valid: [ - // While this _would_ be a constant condition in React, ESLint has a polciy of not attributing any specific behavior to JSX. + // While this _would_ be a constant condition in React, ESLint has a policy of not attributing any specific behavior to JSX. "

&& foo", "<> && foo", "

?? foo", diff --git a/tests/lib/rules/no-constant-condition.js b/tests/lib/rules/no-constant-condition.js index c22b2947a6f..af7bd355db4 100644 --- a/tests/lib/rules/no-constant-condition.js +++ b/tests/lib/rules/no-constant-condition.js @@ -410,7 +410,7 @@ ruleTester.run("no-constant-condition", rule, { /* * undefined is always falsy (except in old browsers that let you - * re-assign, but that's an abscure enough edge case to not worry about) + * re-assign, but that's an obscure enough edge case to not worry about) */ { code: "if (undefined) {}", errors: [{ messageId: "unexpected" }] }, diff --git a/tests/lib/rules/no-extra-parens.js b/tests/lib/rules/no-extra-parens.js index cb488c891e5..acaacd7a525 100644 --- a/tests/lib/rules/no-extra-parens.js +++ b/tests/lib/rules/no-extra-parens.js @@ -1,5 +1,5 @@ /** - * @fileoverview Disallow parenthesesisng higher precedence subexpressions. + * @fileoverview Disallow parenthesising higher precedence subexpressions. * @author Michael Ficarra */ diff --git a/tests/lib/rules/no-multi-assign.js b/tests/lib/rules/no-multi-assign.js index 7920d9900fb..94db78ff81d 100644 --- a/tests/lib/rules/no-multi-assign.js +++ b/tests/lib/rules/no-multi-assign.js @@ -39,7 +39,7 @@ function errorAt(line, column, type) { const ruleTester = new RuleTester(); -ruleTester.run("no-mutli-assign", rule, { +ruleTester.run("no-multi-assign", rule, { valid: [ "var a, b, c,\nd = 0;", "var a = 1; var b = 2; var c = 3;\nvar d = 0;", diff --git a/tests/lib/rules/no-redeclare.js b/tests/lib/rules/no-redeclare.js index bbbe5808171..5754d19945f 100644 --- a/tests/lib/rules/no-redeclare.js +++ b/tests/lib/rules/no-redeclare.js @@ -105,8 +105,8 @@ ruleTester.run("no-redeclare", rule, { options: [{ builtinGlobals: true }], env: { browser: false } }, - { code: "var glovalThis = foo", options: [{ builtinGlobals: true }], env: { es6: true } }, - { code: "var glovalThis = foo", options: [{ builtinGlobals: true }], env: { es2017: true } }, + { code: "var globalThis = foo", options: [{ builtinGlobals: true }], env: { es6: true } }, + { code: "var globalThis = foo", options: [{ builtinGlobals: true }], env: { es2017: true } }, // Comments and built-ins. { diff --git a/tests/lib/rules/no-restricted-exports.js b/tests/lib/rules/no-restricted-exports.js index 6cde658107d..631fd6f02fa 100644 --- a/tests/lib/rules/no-restricted-exports.js +++ b/tests/lib/rules/no-restricted-exports.js @@ -401,7 +401,7 @@ ruleTester.run("no-restricted-exports", rule, { // Note: duplicate identifiers in the same export declaration are a 'duplicate export' syntax error. Example: export var a, a; - // invalid and valid or multiple ivalid in the same declaration + // invalid and valid or multiple invalid in the same declaration { code: "export var a, b;", options: [{ restrictedNamedExports: ["a"] }], diff --git a/tests/lib/rules/padding-line-between-statements.js b/tests/lib/rules/padding-line-between-statements.js index 51ddf0eb3b5..0d6e93c437a 100644 --- a/tests/lib/rules/padding-line-between-statements.js +++ b/tests/lib/rules/padding-line-between-statements.js @@ -2729,7 +2729,7 @@ ruleTester.run("padding-line-between-statements", rule, { parserOptions: { ecmaVersion: 2022 } }, { - code: "class C { static { 'use strict'; let x; } }", // 'use strict'; is "espression", because class static blocks don't have directives + code: "class C { static { 'use strict'; let x; } }", // 'use strict'; is "expression", because class static blocks don't have directives options: [ { blankLine: "always", prev: "directive", next: "let" } ], @@ -5188,7 +5188,7 @@ ruleTester.run("padding-line-between-statements", rule, { errors: [{ messageId: "expectedBlankLine" }] }, { - code: "class C { static { 'use strict'; let x; } }", // 'use strict'; is "espression", because class static blocks don't have directives + code: "class C { static { 'use strict'; let x; } }", // 'use strict'; is "expression", because class static blocks don't have directives output: "class C { static { 'use strict';\n\n let x; } }", options: [ { blankLine: "always", prev: "expression", next: "let" } diff --git a/tests/lib/rules/space-unary-ops.js b/tests/lib/rules/space-unary-ops.js index ccee19c663d..9969bbc64e3 100644 --- a/tests/lib/rules/space-unary-ops.js +++ b/tests/lib/rules/space-unary-ops.js @@ -1,5 +1,5 @@ /** - * @fileoverview This rule shoud require or disallow spaces before or after unary operations. + * @fileoverview This rule should require or disallow spaces before or after unary operations. * @author Marcin Kumorek */ "use strict"; diff --git a/tests/lib/rules/utils/fix-tracker.js b/tests/lib/rules/utils/fix-tracker.js index 33fe23eee12..aeed89173bb 100644 --- a/tests/lib/rules/utils/fix-tracker.js +++ b/tests/lib/rules/utils/fix-tracker.js @@ -129,7 +129,7 @@ describe("FixTracker", () => { }); }); - describe("retainSurroungingTokens", () => { + describe("retainSurroundingTokens", () => { it("handles a change to a binary operator", () => { const sourceCode = createSourceCode("const i = j + k;"); const plusToken = sourceCode.ast.tokens[4]; diff --git a/tests/lib/rules/wrap-iife.js b/tests/lib/rules/wrap-iife.js index 035e265da40..642e29b26df 100644 --- a/tests/lib/rules/wrap-iife.js +++ b/tests/lib/rules/wrap-iife.js @@ -434,7 +434,7 @@ ruleTester.run("wrap-iife", rule, { }, { code: "if ((function (){}())) {}", - output: "if ((function (){})()) {}", // wrap function expression and remove unnecessary grouping parens aroung the call expression + output: "if ((function (){})()) {}", // wrap function expression and remove unnecessary grouping parens around the call expression options: ["inside"], errors: [wrapExpressionError] }, @@ -557,7 +557,7 @@ ruleTester.run("wrap-iife", rule, { }, { code: "if ((function (){}.call())) {}", - output: "if ((function (){}).call()) {}", // wrap function expression and remove unnecessary grouping parens aroung the call expression + output: "if ((function (){}).call()) {}", // wrap function expression and remove unnecessary grouping parens around the call expression options: ["inside", { functionPrototypeMethods: true }], errors: [wrapExpressionError] },