Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Docs: fix typos #714

Closed
wants to merge 1 commit into from
Closed
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 docs/0.24.1/rules/no-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var count = people.length;
var enoughFood = count > sandwhiches.length;

if (enoughFood) {
var count = sandwhiches.length; // accidently overriding the count variable
var count = sandwhiches.length; // accidentally overriding the count variable
console.log("We have " + count + " sandwhiches for everyone. Plenty for all!");
}

Expand Down
2 changes: 1 addition & 1 deletion docs/0.24.1/rules/one-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can configure the rule as follows:
"const", "never" // Exactly one declarator per const declaration per block
}]

// Configure uninitialized and initialized seperately. Defaults to "always" if key not present.
// Configure uninitialized and initialized separately. Defaults to "always" if key not present.
"one-var": [2, {
"uninitialized": "always", // Exactly one declaration for uninitialized variables per function (var) or block (let or const)
"initialized": "never" // Exactly one declarator per initialized variable declaration per function (var) or block (let or const)
Expand Down
6 changes: 3 additions & 3 deletions docs/0.24.1/rules/space-unary-ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ Unary operator "++" should not be followed by whitespace.
++ foo
```

Unary operator "--" should not be preceeded by whitespace.
Unary operator "--" should not be preceded by whitespace.

```js
foo --
```

Unary operator "-" should not be preceeded by whitespace.
Unary operator "-" should not be preceded by whitespace.

```js
- 1
Expand Down Expand Up @@ -83,7 +83,7 @@ Unary operator "++" is not followed by whitespace.
++foo
```

Unary operator "--" is not preceeded by whitespace.
Unary operator "--" is not preceded by whitespace.

```js
foo--
Expand Down
2 changes: 1 addition & 1 deletion docs/0.24.1/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following patterns are considered warnings:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

The following patterns are not warnings:
Expand Down
4 changes: 2 additions & 2 deletions docs/0.24.1/user-guide/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ your-project
└── test.js
```

If there is an `.eslintrc` and a `package.json` file found in the same directory, both will be used, with the `.eslintrc` having the higher precendence.
If there is an `.eslintrc` and a `package.json` file found in the same directory, both will be used, with the `.eslintrc` having the higher precedence.

The complete configuration hierarchy, from highest precedence to lowest precedence, is as follows:

Expand Down Expand Up @@ -404,7 +404,7 @@ The complete configuration hierarchy, from highest precedence to lowest preceden

If you want to extend a specific configuration file, you can use the `extends` property and specify the path to the file. The path can be either relative or absolute.

The extended configuration provides base rules, which can be overriden by the configuration that references it. For example:
The extended configuration provides base rules, which can be overridden by the configuration that references it. For example:

```js
{
Expand Down
2 changes: 1 addition & 1 deletion docs/1.0.0/rules/no-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var count = people.length;
var enoughFood = count > sandwhiches.length;

if (enoughFood) {
var count = sandwhiches.length; // accidently overriding the count variable
var count = sandwhiches.length; // accidentally overriding the count variable
console.log("We have " + count + " sandwhiches for everyone. Plenty for all!");
}

Expand Down
2 changes: 1 addition & 1 deletion docs/1.0.0/rules/one-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can configure the rule as follows:
"const": "never" // Exactly one declarator per const declaration per block
}]

// Configure uninitialized and initialized seperately. Defaults to "always" if key not present.
// Configure uninitialized and initialized separately. Defaults to "always" if key not present.
"one-var": [2, {
"uninitialized": "always", // Exactly one declaration for uninitialized variables per function (var) or block (let or const)
"initialized": "never" // Exactly one declarator per initialized variable declaration per function (var) or block (let or const)
Expand Down
6 changes: 3 additions & 3 deletions docs/1.0.0/rules/space-unary-ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ Unary operator "++" should not be followed by whitespace.
++ foo
```

Unary operator "--" should not be preceeded by whitespace.
Unary operator "--" should not be preceded by whitespace.

```js
foo --
```

Unary operator "-" should not be preceeded by whitespace.
Unary operator "-" should not be preceded by whitespace.

```js
- 1
Expand Down Expand Up @@ -83,7 +83,7 @@ Unary operator "++" is not followed by whitespace.
++foo
```

Unary operator "--" is not preceeded by whitespace.
Unary operator "--" is not preceded by whitespace.

```js
foo--
Expand Down
2 changes: 1 addition & 1 deletion docs/1.0.0/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following patterns are considered warnings:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

The following patterns are not warnings:
Expand Down
4 changes: 2 additions & 2 deletions docs/1.0.0/user-guide/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ your-project
└── test.js
```

If there is an `.eslintrc` and a `package.json` file found in the same directory, both will be used, with the `.eslintrc` having the higher precendence.
If there is an `.eslintrc` and a `package.json` file found in the same directory, both will be used, with the `.eslintrc` having the higher precedence.

By default, ESLint will look for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results. To limit ESLint to a specific project, place `"root": true` inside the `eslintConfig` field of the `package.json` file or in the `.eslintrc` file at your project's root level. ESLint will stop looking in parent folders once it finds a configuration with `"root": true`.

Expand Down Expand Up @@ -431,7 +431,7 @@ The complete configuration hierarchy, from highest precedence to lowest preceden

If you want to extend a specific configuration file, you can use the `extends` property and specify the path to the file. The path can be either relative or absolute.

The extended configuration provides base rules, which can be overriden by the configuration that references it. For example:
The extended configuration provides base rules, which can be overridden by the configuration that references it. For example:

```js
{
Expand Down
4 changes: 2 additions & 2 deletions docs/1.10.3/rules/no-unused-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ The following patterns are considered problems:

```js
/*eslint no-unused-vars: 2*/
/*global some_unsed_var */ /*error "some_unsed_var" is defined but never used*/
/*global some_used_var */ /*error "some_used_var" is defined but never used*/

//It checks variables you have defined as global
some_unsed_var = 42;
some_used_var = 42;

var x; /*error "x" is defined but never used*/

Expand Down
2 changes: 1 addition & 1 deletion docs/1.10.3/rules/no-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var count = people.length;
var enoughFood = count > sandwiches.length;

if (enoughFood) {
var count = sandwiches.length; // accidently overriding the count variable
var count = sandwiches.length; // accidentally overriding the count variable
console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
}

Expand Down
2 changes: 1 addition & 1 deletion docs/1.10.3/rules/one-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Configure each declaration type individually. Defaults to "always" if key not pr
}]
```

Configure uninitialized and initialized seperately. Defaults to "always" if key not present.
Configure uninitialized and initialized separately. Defaults to "always" if key not present.

```json
"one-var": [2, {
Expand Down
2 changes: 1 addition & 1 deletion docs/1.10.3/rules/space-before-keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layout: doc
<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->
# Require or disallow spaces before keywords (space-before-keywords)

Keywords are syntax elements of JavaScript, such as `function` and `if`. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always be preceeded by spaces, which would mean `if-else` statements must look like this:
Keywords are syntax elements of JavaScript, such as `function` and `if`. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always be preceded by spaces, which would mean `if-else` statements must look like this:

```js
if (foo) {
Expand Down
2 changes: 1 addition & 1 deletion docs/1.10.3/rules/space-unary-ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void 0;
// Unary operator "++" is not followed by whitespace.
++foo;

// Unary operator "--" is not preceeded by whitespace.
// Unary operator "--" is not preceded by whitespace.
foo--;

// Unary operator "-" is not followed by whitespace.
Expand Down
2 changes: 1 addition & 1 deletion docs/1.10.3/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following patterns are considered problems:
typeof foo === "strnig" /*error Invalid typeof comparison value*/
typeof foo == "undefimed" /*error Invalid typeof comparison value*/
typeof bar != "nunber" /*error Invalid typeof comparison value*/
typeof bar !== "fucntion" /*error Invalid typeof comparison value*/
typeof bar !== "function" /*error Invalid typeof comparison value*/
```

The following patterns are not considered problems:
Expand Down
2 changes: 1 addition & 1 deletion docs/1.10.3/user-guide/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ your-project
└── test.js
```

If there is an `.eslintrc` and a `package.json` file found in the same directory, both will be used, with the `.eslintrc` having the higher precendence.
If there is an `.eslintrc` and a `package.json` file found in the same directory, both will be used, with the `.eslintrc` having the higher precedence.

**Note:** If you have a personal configuration file in your home directory (`~/.eslintrc`), it will only be used if no other configuration files are found. Since a personal configuration would apply to everything inside of a user's directory, including third-party code, this could cause problems when running ESLint.

Expand Down
4 changes: 2 additions & 2 deletions docs/2.0.0/rules/no-unused-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ The following patterns are considered problems:

```js
/*eslint no-unused-vars: 2*/
/*global some_unsed_var */ /*error 'some_unsed_var' is defined but never used*/
/*global some_used_var */ /*error 'some_used_var' is defined but never used*/

//It checks variables you have defined as global
some_unsed_var = 42;
some_used_var = 42;

var x; /*error 'x' is defined but never used*/

Expand Down
2 changes: 1 addition & 1 deletion docs/2.0.0/rules/no-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var count = people.length;
var enoughFood = count > sandwiches.length;

if (enoughFood) {
var count = sandwiches.length; // accidently overriding the count variable
var count = sandwiches.length; // accidentally overriding the count variable
console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
}

Expand Down
2 changes: 1 addition & 1 deletion docs/2.0.0/rules/one-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Configure each declaration type individually. Defaults to `"always"` if key not
}]
```

Configure uninitialized and initialized seperately. Defaults to `"always"` if key not present.
Configure uninitialized and initialized separately. Defaults to `"always"` if key not present.

```json
"one-var": [2, {
Expand Down
2 changes: 1 addition & 1 deletion docs/2.0.0/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following patterns are considered problems:
typeof foo === "strnig" /*error Invalid typeof comparison value*/
typeof foo == "undefimed" /*error Invalid typeof comparison value*/
typeof bar != "nunber" /*error Invalid typeof comparison value*/
typeof bar !== "fucntion" /*error Invalid typeof comparison value*/
typeof bar !== "function" /*error Invalid typeof comparison value*/
```

The following patterns are not considered problems:
Expand Down
2 changes: 1 addition & 1 deletion docs/2.13.1/rules/no-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var count = people.length;
var enoughFood = count > sandwiches.length;

if (enoughFood) {
var count = sandwiches.length; // accidently overriding the count variable
var count = sandwiches.length; // accidentally overriding the count variable
console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
}

Expand Down
2 changes: 1 addition & 1 deletion docs/2.13.1/rules/one-var.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Configure each declaration type individually. Defaults to `"always"` if key not
}]
```

Configure uninitialized and initialized seperately. Defaults to `"always"` if key not present.
Configure uninitialized and initialized separately. Defaults to `"always"` if key not present.

```json
"one-var": [2, {
Expand Down
2 changes: 1 addition & 1 deletion docs/2.13.1/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Examples of **incorrect** code for this rule:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

Examples of **correct** code for this rule:
Expand Down
4 changes: 2 additions & 2 deletions docs/3.0.0/developer-guide/nodejs-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ If the operation ends with a parsing error, you will get a single message for th
ruleId: null,
fatal: true,
severity: 2,
source: "fucntion foo() {}",
source: "function foo() {}",
message: "Parsing error: Unexpected token foo",
line: 1,
column: 10
}
],
errorCount: 1,
warningCount: 0,
source: "fucntion foo() {}"
source: "function foo() {}"
}
],
errorCount: 1,
Expand Down
2 changes: 1 addition & 1 deletion docs/3.0.0/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Examples of **incorrect** code for this rule:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

Examples of **correct** code for this rule:
Expand Down
4 changes: 2 additions & 2 deletions docs/4.0.0/developer-guide/nodejs-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ If the operation ends with a parsing error, you will get a single message for th
ruleId: null,
fatal: true,
severity: 2,
source: "fucntion foo() {}",
source: "function foo() {}",
message: "Parsing error: Unexpected token foo",
line: 1,
column: 10
Expand All @@ -351,7 +351,7 @@ If the operation ends with a parsing error, you will get a single message for th
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0,
source: "fucntion foo() {}"
source: "function foo() {}"
}
],
errorCount: 1,
Expand Down
2 changes: 1 addition & 1 deletion docs/4.0.0/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Examples of **incorrect** code for this rule:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

Examples of **correct** code for this rule:
Expand Down
2 changes: 1 addition & 1 deletion docs/6.0.0/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Examples of **incorrect** code for this rule:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

Examples of **correct** code for this rule:
Expand Down
2 changes: 1 addition & 1 deletion docs/7.0.0/rules/array-callback-return.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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 docs/7.0.0/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Examples of **incorrect** code for this rule:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

Examples of **correct** code for this rule:
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/valid-typeof.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Examples of **incorrect** code for this rule:
typeof foo === "strnig"
typeof foo == "undefimed"
typeof bar != "nunber"
typeof bar !== "fucntion"
typeof bar !== "function"
```

Examples of **correct** code for this rule:
Expand Down