Skip to content

Commit

Permalink
Docs: fix typos (#13204)
Browse files Browse the repository at this point in the history
* Docs: fix typos

* Chore: fix typos
  • Loading branch information
snitin315 committed Apr 23, 2020
1 parent e13256e commit 56d2bee
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/rules/array-callback-return.md
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/key-spacing.js
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-lone-blocks.js
Expand Up @@ -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.
*/
Expand Down
10 changes: 5 additions & 5 deletions tests/bench/large.js
Expand Up @@ -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");

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
*/
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion tests/bench/small.js
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cli-engine/cli-engine.js
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/cli-engine/config-array-factory.js
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/id-blacklist.js
Expand Up @@ -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" },
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/keyword-spacing.js
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-implied-eval.js
Expand Up @@ -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] },
Expand Down
8 changes: 4 additions & 4 deletions tests/performance/jshint.js
Expand Up @@ -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");

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 56d2bee

Please sign in to comment.