Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit becfdd3

Browse files
nzakasmdjermanovic
andauthored
docs: Make clear when rules are removed (#17728)
* docs: Make clear when rules are removed * space-after-keywords and space-unary-word-ops * Update docs/src/rules/space-unary-word-ops.md Co-authored-by: Milos Djermanovic <[email protected]> --------- Co-authored-by: Milos Djermanovic <[email protected]>
1 parent e8cf9f6 commit becfdd3

18 files changed

+54
-22
lines changed

docs/src/rules/generator-star.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ further_reading:
66

77
Enforces consistent spacing around the asterisk in generator functions.
88

9-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [generator-star-spacing](generator-star-spacing) rule.
9+
::: important
10+
This rule was removed in ESLint v1.0.0 and replaced by the [generator-star-spacing](generator-star-spacing) rule.
11+
:::
1012

1113
Generators are a new type of function in ECMAScript 6 that can return multiple values over time.
1214
These special functions are indicated by placing an `*` after the `function` keyword.

docs/src/rules/global-strict.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ title: global-strict
55

66
Requires or disallows strict mode directives in the global scope.
77

8-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [strict](strict) rule. The `"global"` option in the new rule is most similar to the removed rule.
8+
::: important
9+
This rule was removed in ESLint v1.0.0 and replaced by the [strict](strict) rule. The `"global"` option in the new rule is most similar to the removed rule.
10+
:::
911

1012
Strict mode is enabled by using the following pragma in your code:
1113

docs/src/rules/no-arrow-condition.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ related_rules:
99

1010
Disallows arrow functions where test conditions are expected.
1111

12-
(removed) This rule was **removed** in ESLint v2.0 and **replaced** by a combination of the [no-confusing-arrow](no-confusing-arrow) and [no-constant-condition](no-constant-condition) rules.
12+
::: important
13+
This rule was removed in ESLint v2.0.0 and replaced by a combination of the [no-confusing-arrow](no-confusing-arrow) and [no-constant-condition](no-constant-condition) rules.
14+
:::
1315

1416
Arrow functions (`=>`) are similar in syntax to some comparison operators (`>`, `<`, `<=`, and `>=`). This rule warns against using the arrow function syntax in places where a condition is expected. Even if the arguments of the arrow function are wrapped with parens, this rule still warns about it.
1517

docs/src/rules/no-comma-dangle.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ title: no-comma-dangle
55

66
Disallows trailing commas in object and array literals.
77

8-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [comma-dangle](comma-dangle) rule.
8+
::: important
9+
This rule was removed in ESLint v1.0.0 and replaced by the [comma-dangle](comma-dangle) rule.
10+
:::
911

1012
Trailing commas in object literals are valid according to the ECMAScript 5 (and ECMAScript 3!) spec, however IE8 (when not in IE8 document mode) and below will throw an error when it encounters trailing commas in JavaScript.
1113

docs/src/rules/no-empty-class.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ title: no-empty-class
55

66
Disallows empty character classes in regular expressions.
77

8-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [no-empty-character-class](no-empty-character-class) rule.
8+
::: important
9+
This rule was removed in ESLint v1.0.0 and replaced by the [no-empty-character-class](no-empty-character-class) rule.
10+
:::
911

1012
Empty character classes in regular expressions do not match anything and can result in code that may not work as intended.
1113

docs/src/rules/no-empty-label.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ related_rules:
99

1010
Disallows labels for anything other than loops and switches.
1111

12-
(removed) This rule was **removed** in ESLint v2.0 and **replaced** by the [no-labels](no-labels) rule.
12+
::: important
13+
This rule was removed in ESLint v2.0.0 and replaced by the [no-labels](no-labels) rule.
14+
:::
1315

1416
Labeled statements are only used in conjunction with labeled break and continue statements. ECMAScript has no goto statement.
1517

docs/src/rules/no-extra-strict.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ further_reading:
77

88
Disallows strict mode directives when already in strict mode.
99

10-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [strict](strict) rule. The `"global"` or `"function"` options in the new rule are similar to the removed rule.
10+
::: important
11+
This rule was removed in ESLint v1.0.0 and replaced by the [strict](strict) rule. The `"global"` or `"function"` options in the new rule are similar to the removed rule.
12+
:::
1113

1214
The `"use strict";` directive applies to the scope in which it appears and all inner scopes contained within that scope. Therefore, using the `"use strict";` directive in one of these inner scopes is unnecessary.
1315

docs/src/rules/no-reserved-keys.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ further_reading:
77

88
Disallows unquoted reserved words as property names in object literals.
99

10-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [quote-props](quote-props) rule.
10+
::: important
11+
This rule was removed in ESLint v1.0.0 and replaced by the [quote-props](quote-props) rule.
12+
:::
1113

1214
ECMAScript 3 described as series of keywords and reserved words, such as `if` and `public`, that are used or intended to be used for a core language feature. The specification also indicated that these keywords and reserved words could not be used as object property names without being enclosed in strings. An error occurs in an ECMAScript 3 environment when you use a keyword or reserved word in an object literal. For example:
1315

docs/src/rules/no-space-before-semi.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ related_rules:
88

99
Disallows spaces before semicolons.
1010

11-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [semi-spacing](semi-spacing) rule.
11+
::: important
12+
This rule was removed in ESLint v1.0.0 and replaced by the [semi-spacing](semi-spacing) rule.
13+
:::
1214

1315
JavaScript allows for placing unnecessary spaces between an expression and the closing semicolon.
1416

docs/src/rules/no-wrap-func.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ title: no-wrap-func
55

66
Disallows unnecessary parentheses around function expressions.
77

8-
(removed) This rule was **removed** in ESLint v1.0 and **replaced** by the [no-extra-parens](no-extra-parens) rule. The `"functions"` option in the new rule is equivalent to the removed rule.
8+
::: important
9+
This rule was removed in ESLint v1.0.0 and replaced by the [no-extra-parens](no-extra-parens) rule. The `"functions"` option in the new rule is equivalent to the removed rule.
10+
:::
911

1012
Although it's possible to wrap functions in parentheses, this can be confusing when the code also contains immediately-invoked function expressions (IIFEs) since parentheses are often used to make this distinction. For example:
1113

0 commit comments

Comments
 (0)