Skip to content

Commit abcb7ac

Browse files
authored
docs: Fix and standardize links to ESLint documentation (#501)
1 parent 8fda55a commit abcb7ac

21 files changed

+27
-28
lines changed

Diff for: docs/rules/consistent-output.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ As mentioned in the introduction, the need for this rule is reduced as of ESLint
7575

7676
## Further Reading
7777

78-
- [`RuleTester` documentation](http://eslint.org/docs/developer-guide/working-with-plugins#testing)
78+
- [ESLint plugin docs: Testing a Plugin](https://eslint.org/docs/latest/extend/plugins#testing-a-plugin)

Diff for: docs/rules/fixer-return.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<!-- end auto-generated rule header -->
66

7-
In a [fixable](https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes) rule, a fixer function is useless if it never returns anything.
7+
In a [fixable](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes) rule, a fixer function is useless if it never returns anything.
88

99
## Rule Details
1010

Diff for: docs/rules/no-deprecated-context-methods.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The deprecated methods are:
3131
- `getTokensBefore`
3232
- `getTokensBetween`
3333

34-
Instead of using these methods, you should use the equivalent methods on [`SourceCode`](https://eslint.org/docs/developer-guide/working-with-rules#contextgetsourcecode), e.g. `context.getSourceCode().getText()` instead of `context.getSource()`.
34+
Instead of using these methods, you should use the equivalent methods on [`SourceCode`](https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code), e.g. `context.sourceCode.getText()` instead of `context.getSource()`.
3535

3636
## Rule Details
3737

@@ -71,4 +71,4 @@ If you need to support very old versions of ESLint where `SourceCode` doesn't ex
7171

7272
## Further Reading
7373

74-
- [`SourceCode` API](https://eslint.org/docs/developer-guide/working-with-rules#contextgetsourcecode)
74+
- [ESLint rule docs: Accessing the Source Code](https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code)

Diff for: docs/rules/no-deprecated-report-api.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
ESLint has two APIs that rules can use to report problems.
1010

11-
- The [deprecated API](http://eslint.org/docs/developer-guide/working-with-rules-deprecated) accepts multiple arguments: `context.report(node, [loc], message)`.
12-
- The ["new API"](http://eslint.org/docs/developer-guide/working-with-rules#contextreport) accepts a single argument: an object containing information about the reported problem.
11+
- The [deprecated API](https://eslint.org/docs/latest/extend/custom-rules-deprecated) accepts multiple arguments: `context.report(node, [loc], message)`.
12+
- The ["new API"](https://eslint.org/docs/latest/extend/custom-rules#reporting-problems) accepts a single argument: an object containing information about the reported problem.
1313

1414
It is recommended that all rules use the new API.
1515

@@ -41,5 +41,4 @@ module.exports = {
4141

4242
## Further Reading
4343

44-
- [Deprecated rule API](http://eslint.org/docs/developer-guide/working-with-rules-deprecated)
45-
- [New rule API](http://eslint.org/docs/developer-guide/working-with-rules)
44+
- [ESLint rule docs: Reporting Problems](https://eslint.org/docs/latest/extend/custom-rules#reporting-problems)

Diff for: docs/rules/no-missing-message-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ module.exports = {
5858

5959
## Further Reading
6060

61-
- [messageIds API](https://eslint.org/docs/developer-guide/working-with-rules#messageids)
61+
- [ESLint rule docs: `messageId`s](https://eslint.org/docs/latest/extend/custom-rules#messageids)
6262
- [no-unused-message-ids](./no-unused-message-ids.md) rule
6363
- [prefer-message-ids](./prefer-message-ids.md) rule

Diff for: docs/rules/no-missing-placeholders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ If you want to use rule messages that actually contain double-curly bracket text
7474

7575
## Further Reading
7676

77-
- [context.report() API](http://eslint.org/docs/developer-guide/working-with-rules#contextreport)
77+
- [ESLint rule docs: Using Message Placeholders](https://eslint.org/docs/latest/extend/custom-rules#using-message-placeholders)

Diff for: docs/rules/no-unused-message-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ module.exports = {
5959

6060
## Further Reading
6161

62-
- [messageIds API](https://eslint.org/docs/developer-guide/working-with-rules#messageids)
62+
- [ESLint rule docs: `messageId`s](https://eslint.org/docs/latest/extend/custom-rules#messageids)
6363
- [no-missing-message-ids](./no-missing-message-ids.md) rule
6464
- [prefer-message-ids](./prefer-message-ids.md) rule

Diff for: docs/rules/no-unused-placeholders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ If you want to allow unused placeholders, you should turn off this rule.
5757

5858
## Further Reading
5959

60-
- [context.report() API](http://eslint.org/docs/developer-guide/working-with-rules#contextreport)
60+
- [ESLint rule docs: Using Message Placeholders](https://eslint.org/docs/latest/extend/custom-rules#using-message-placeholders)
6161
- [no-missing-placeholders](https://github.com/eslint-community/eslint-plugin-eslint-plugin/blob/master/docs/rules/no-missing-placeholders.md)

Diff for: docs/rules/no-useless-token-range.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ module.exports = {
4848

4949
## Further Reading
5050

51-
- [`SourceCode` API](https://eslint.org/docs/developer-guide/working-with-rules#contextgetsourcecode)
51+
- [ESLint rule docs: Accessing the Source Code](https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code)

Diff for: docs/rules/prefer-message-ids.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ module.exports = {
5959

6060
## Further Reading
6161

62-
- [messageIds API](https://eslint.org/docs/developer-guide/working-with-rules#messageids)
62+
- [ESLint rule docs: `messageId`s](https://eslint.org/docs/latest/extend/custom-rules#messageids)
6363
- [no-invalid-message-ids](./no-invalid-message-ids.md) rule
6464
- [no-missing-message-ids](./no-missing-message-ids.md) rule

Diff for: docs/rules/prefer-object-rule.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- end auto-generated rule header -->
88

9-
Prior to ESLint v9, ESLint supported both [function-style](https://eslint.org/docs/developer-guide/working-with-rules-deprecated) and [object-style](https://eslint.org/docs/developer-guide/working-with-rules) rules. However, function-style rules have been deprecated since 2016, and do not support newer features like autofixing and suggestions.
9+
Prior to ESLint v9, ESLint supported both [function-style](https://eslint.org/docs/latest/extend/custom-rules-deprecated) and [object-style](https://eslint.org/docs/latest/extend/custom-rules) rules. However, function-style rules have been deprecated since 2016, and do not support newer features like autofixing and suggestions.
1010

1111
As of [ESLint v9](https://github.com/eslint/rfcs/tree/main/designs/2021-schema-object-rules#motivation-for-requiring-object-style-rules), ESLint supports only object-style rules.
1212

Diff for: docs/rules/prefer-placeholders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ If you need to use string concatenation in your report messages for some reason,
6363

6464
## Further Reading
6565

66-
- [context.report() API](http://eslint.org/docs/developer-guide/working-with-rules#contextreport)
66+
- [ESLint rule docs: Using Message Placeholders](https://eslint.org/docs/latest/extend/custom-rules#using-message-placeholders)

Diff for: docs/rules/prefer-replace-text.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ module.exports = {
5353

5454
## Further Reading
5555

56-
- [Applying Fixes](https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes)
56+
- [ESLint rule docs: Applying Fixes](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes)

Diff for: docs/rules/require-meta-docs-description.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ module.exports = {
5959

6060
## Further Reading
6161

62-
- [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)
62+
- [ESLint rule docs: Options Schemas](https://eslint.org/docs/latest/extend/custom-rules#options-schemas)

Diff for: docs/rules/require-meta-docs-recommended.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ module.exports = {
7474

7575
## Further Reading
7676

77-
- [Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
77+
- [ESLint rule docs: Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)

Diff for: docs/rules/require-meta-fixable.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,5 @@ module.exports = {
102102

103103
## Further Reading
104104

105-
- [ESLint's autofix API](http://eslint.org/docs/developer-guide/working-with-rules#applying-fixes)
106-
- [ESLint's rule basics mentioning `meta.fixable`](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics)
105+
- [ESLint rule docs: Applying Fixes](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes)
106+
- [ESLint rule docs: Rule Structure (mentioning `meta.fixable`)](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)

Diff for: docs/rules/require-meta-has-suggestions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ module.exports = {
8888

8989
## Further Reading
9090

91-
- [ESLint's suggestion API](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions)
92-
- [ESLint rule basics describing the `meta.hasSuggestions` property](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics)
91+
- [ESLint rule docs: Providing Suggestions](https://eslint.org/docs/latest/extend/custom-rules#providing-suggestions)
92+
- [ESLint rule docs: Rule Structure (mentioning `meta.hasSuggestions`)](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)

Diff for: docs/rules/require-meta-schema-description.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ If your rule options are very simple and well-named, and your rule isn't used by
8585

8686
## Further Reading
8787

88-
- [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)
88+
- [ESLint rule docs: Options Schemas](https://eslint.org/docs/latest/extend/custom-rules#options-schemas)

Diff for: docs/rules/require-meta-schema.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ As mentioned in the introduction, the need for this rule is reduced as of ESLint
8989

9090
## Further Reading
9191

92-
- [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)
92+
- [ESLint rule docs: Options Schemas](https://eslint.org/docs/latest/extend/custom-rules#options-schemas)

Diff for: docs/rules/require-meta-type.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ module.exports = {
5151

5252
## Further Reading
5353

54-
- [command-line-interface#--fix-type](https://eslint.org/docs/user-guide/command-line-interface#--fix-type)
55-
- [working-with-rules#rule-basics](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics)
54+
- [ESLint CLI docs: `--fix-type`](https://eslint.org/docs/latest/use/command-line-interface#--fix-type)
55+
- [ESLint rule docs: Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
5656
- [ESLint v5.9.0 released](https://eslint.org/blog/2018/11/eslint-v5.9.0-released#the-fix-type-option)

Diff for: docs/rules/test-case-shorthand-strings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,4 +248,4 @@ If you don't care about consistent usage of shorthand strings, you should not tu
248248

249249
## Further Reading
250250

251-
- [`RuleTester` documentation](http://eslint.org/docs/developer-guide/working-with-plugins#testing)
251+
- [ESLint plugin docs: Testing a Plugin](https://eslint.org/docs/latest/extend/plugins#testing-a-plugin)

0 commit comments

Comments
 (0)