diff --git a/docs/rules/array-callback-return.md b/docs/rules/array-callback-return.md index c0a5ad8ab35..84bf0e7710d 100644 --- a/docs/rules/array-callback-return.md +++ b/docs/rules/array-callback-return.md @@ -13,7 +13,7 @@ var indexMap = myArray.reduce(function(memo, item, index) { ## Rule Details This rule enforces usage of `return` statement in callbacks of array's methods. -Additionaly, it may also enforce the `forEach` array method callback to __not__ return a value by using the `checkForEach` option. +Additionally, it may also enforce the `forEach` array method callback to __not__ return a value by using the `checkForEach` option. This rule finds callback functions of the following methods, then checks usage of `return` statement. diff --git a/lib/rules/key-spacing.js b/lib/rules/key-spacing.js index c405043794c..57abb00b06e 100644 --- a/lib/rules/key-spacing.js +++ b/lib/rules/key-spacing.js @@ -45,7 +45,7 @@ function isSingleLine(node) { /** * Checks whether the properties on a single line. * @param {ASTNode[]} properties List of Property AST nodes. - * @returns {boolean} True if all properies is on a single line. + * @returns {boolean} True if all properties is on a single line. */ function isSingleLineProperties(properties) { const [firstProp] = properties, diff --git a/lib/rules/no-lone-blocks.js b/lib/rules/no-lone-blocks.js index d7069887b8e..290784b82ea 100644 --- a/lib/rules/no-lone-blocks.js +++ b/lib/rules/no-lone-blocks.js @@ -49,7 +49,7 @@ module.exports = { } /** - * Checks for any ocurrence of a BlockStatement in a place where lists of statements can appear + * Checks for any occurrence of a BlockStatement in a place where lists of statements can appear * @param {ASTNode} node The node to check * @returns {boolean} True if the node is a lone block. */ diff --git a/tests/bench/large.js b/tests/bench/large.js index 24ba7271c9f..c94e88568d4 100644 --- a/tests/bench/large.js +++ b/tests/bench/large.js @@ -52779,7 +52779,7 @@ var state = require("./state.js").state; var style = require("./style.js"); // We need this module here because environments such as IE and Rhino -// don't necessarilly expose the 'console' API and browserify uses +// don't necessarily expose the 'console' API and browserify uses // it to log things. It's a sad state of affair, really. var console = require("console-browserify"); @@ -52838,7 +52838,7 @@ var JSHINT = (function () { immed : true, // if immediate invocations must be wrapped in parens iterator : true, // if the `__iterator__` property should be allowed jquery : true, // if jQuery globals should be predefined - lastsemic : true, // if semicolons may be ommitted for the trailing + lastsemic : true, // if semicolons may be omitted for the trailing // statements inside of a one-line blocks. laxbreak : true, // if line breaks should not be checked laxcomma : true, // if line breaks should not be checked around commas @@ -59115,7 +59115,7 @@ Lexer.prototype = { }, /* - * Scan for any occurence of mixed tabs and spaces. If smarttabs option + * Scan for any occurrence of mixed tabs and spaces. If smarttabs option * is on, ignore tabs followed by spaces. * * Tabs followed by one space followed by a block comment are allowed. @@ -59135,7 +59135,7 @@ Lexer.prototype = { }, /* - * Scan for any occurence of non-breaking spaces. Non-breaking spaces + * Scan for any occurrence of non-breaking spaces. Non-breaking spaces * can be mistakenly typed on OS X with option-space. Non UTF-8 web * pages with non-breaking pages produce syntax errors. */ @@ -59288,7 +59288,7 @@ Lexer.prototype = { /* * Produce the next token. This function is called by advance() to get - * the next token. It retuns a token in a JSLint-compatible format. + * the next token. It returns a token in a JSLint-compatible format. */ token: function () { /*jshint loopfunc:true */ diff --git a/tests/bench/small.js b/tests/bench/small.js index b61cf5c4c78..d2cdf354652 100644 --- a/tests/bench/small.js +++ b/tests/bench/small.js @@ -1596,7 +1596,7 @@ ko.exportSymbol('computed', ko.dependentObservable); // Make "ko.computed" an al ko.exportSymbol('isComputed', ko.isComputed); (function() { - var maxNestedObservableDepth = 10; // Escape the (unlikely) pathalogical case where an observable's current value is itself (or similar reference cycle) + var maxNestedObservableDepth = 10; // Escape the (unlikely) pathological case where an observable's current value is itself (or similar reference cycle) ko.toJS = function(rootObject) { if (arguments.length == 0) diff --git a/tests/lib/cli-engine/cli-engine.js b/tests/lib/cli-engine/cli-engine.js index 6880bf9f98f..36d7602bcef 100644 --- a/tests/lib/cli-engine/cli-engine.js +++ b/tests/lib/cli-engine/cli-engine.js @@ -3208,7 +3208,7 @@ describe("CLIEngine", () => { `); }); - it("should use overriden processor; should report HTML blocks but not fix HTML blocks if the processor for '*.html' didn't support autofix.", () => { + it("should use overridden processor; should report HTML blocks but not fix HTML blocks if the processor for '*.html' didn't support autofix.", () => { CLIEngine = defineCLIEngineWithInMemoryFileSystem({ cwd: () => root, files: { diff --git a/tests/lib/cli-engine/config-array-factory.js b/tests/lib/cli-engine/config-array-factory.js index 20f256bbe61..e938277c2f0 100644 --- a/tests/lib/cli-engine/config-array-factory.js +++ b/tests/lib/cli-engine/config-array-factory.js @@ -1026,7 +1026,7 @@ describe("ConfigArrayFactory", () => { }); }); - it("should have the given config data at the thrid element.", () => { + it("should have the given config data at the third element.", () => { assertConfigArrayElement(configArray[2], { name: ".eslintrc", rules: { eqeqeq: 1 } diff --git a/tests/lib/rules/id-blacklist.js b/tests/lib/rules/id-blacklist.js index 3d40beeb578..a900924373f 100644 --- a/tests/lib/rules/id-blacklist.js +++ b/tests/lib/rules/id-blacklist.js @@ -367,7 +367,7 @@ ruleTester.run("id-blacklist", rule, { column: 5 }, - // reports each occurence of local identifier, although it's renamed in this export specifier + // reports each occurrence of local identifier, although it's renamed in this export specifier { messageId: "blacklisted", data: { name: "foo" }, diff --git a/tests/lib/rules/keyword-spacing.js b/tests/lib/rules/keyword-spacing.js index 9971facf18c..f7f5ccab2b7 100644 --- a/tests/lib/rules/keyword-spacing.js +++ b/tests/lib/rules/keyword-spacing.js @@ -34,7 +34,7 @@ const NEITHER = { before: false, after: false }; * after: false, * overrides: {as: {before: true, after: true}} * } - * @param {string} keyword A keyword to be overriden. + * @param {string} keyword A keyword to be overridden. * @param {Object} value A value to override. * @returns {Object} An option object to test an "overrides" option. */ diff --git a/tests/lib/rules/no-implied-eval.js b/tests/lib/rules/no-implied-eval.js index 0cd1d188ae0..1c712f450f0 100644 --- a/tests/lib/rules/no-implied-eval.js +++ b/tests/lib/rules/no-implied-eval.js @@ -150,7 +150,7 @@ ruleTester.run("no-implied-eval", rule, { { code: "window.window.setTimeout(`foo${bar}`)", parserOptions: { ecmaVersion: 6 }, env: { browser: true }, errors: [expectedError] }, { code: "global.global.setTimeout(`foo${bar}`)", parserOptions: { ecmaVersion: 6 }, env: { node: true }, errors: [expectedError] }, - // string concatination + // string concatenation { code: "setTimeout('foo' + bar)", errors: [expectedError] }, { code: "setTimeout(foo + 'bar')", errors: [expectedError] }, { code: "setTimeout(`foo` + bar)", parserOptions: { ecmaVersion: 6 }, errors: [expectedError] }, diff --git a/tests/performance/jshint.js b/tests/performance/jshint.js index 6ebb5fb4980..f79d6ed15ff 100644 --- a/tests/performance/jshint.js +++ b/tests/performance/jshint.js @@ -1111,7 +1111,7 @@ var state = require("./state.js").state; var style = require("./style.js"); // We need this module here because environments such as IE and Rhino -// don't necessarilly expose the 'console' API and browserify uses +// don't necessarily expose the 'console' API and browserify uses // it to log things. It's a sad state of affair, really. var console = require("console-browserify"); @@ -1169,7 +1169,7 @@ var JSHINT = (function () { immed : true, // if immediate invocations must be wrapped in parens iterator : true, // if the `__iterator__` property should be allowed jquery : true, // if jQuery globals should be predefined - lastsemic : true, // if semicolons may be ommitted for the trailing + lastsemic : true, // if semicolons may be omitted for the trailing // statements inside of a one-line blocks. laxbreak : true, // if line breaks should not be checked laxcomma : true, // if line breaks should not be checked around commas @@ -7466,7 +7466,7 @@ Lexer.prototype = { }, /* - * Scan for any occurence of mixed tabs and spaces. If smarttabs option + * Scan for any occurrence of mixed tabs and spaces. If smarttabs option * is on, ignore tabs followed by spaces. * * Tabs followed by one space followed by a block comment are allowed. @@ -7594,7 +7594,7 @@ Lexer.prototype = { /* * Produce the next token. This function is called by advance() to get - * the next token. It retuns a token in a JSLint-compatible format. + * the next token. It returns a token in a JSLint-compatible format. */ token: function () { /*jshint loopfunc:true */