Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and standardize links to ESLint documentation #501

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/rules/consistent-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ As mentioned in the introduction, the need for this rule is reduced as of ESLint

## Further Reading

- [`RuleTester` documentation](http://eslint.org/docs/developer-guide/working-with-plugins#testing)
- [ESLint plugin docs: Testing a Plugin](https://eslint.org/docs/latest/extend/plugins#testing-a-plugin)
2 changes: 1 addition & 1 deletion docs/rules/fixer-return.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

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.
In a [fixable](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes) rule, a fixer function is useless if it never returns anything.

## Rule Details

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-deprecated-context-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The deprecated methods are:
- `getTokensBefore`
- `getTokensBetween`

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()`.
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()`.

## Rule Details

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

## Further Reading

- [`SourceCode` API](https://eslint.org/docs/developer-guide/working-with-rules#contextgetsourcecode)
- [ESLint rule docs: Accessing the Source Code](https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code)
7 changes: 3 additions & 4 deletions docs/rules/no-deprecated-report-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

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

- The [deprecated API](http://eslint.org/docs/developer-guide/working-with-rules-deprecated) accepts multiple arguments: `context.report(node, [loc], message)`.
- 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.
- The [deprecated API](https://eslint.org/docs/latest/extend/custom-rules-deprecated) accepts multiple arguments: `context.report(node, [loc], message)`.
- 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.

It is recommended that all rules use the new API.

Expand Down Expand Up @@ -41,5 +41,4 @@ module.exports = {

## Further Reading

- [Deprecated rule API](http://eslint.org/docs/developer-guide/working-with-rules-deprecated)
- [New rule API](http://eslint.org/docs/developer-guide/working-with-rules)
- [ESLint rule docs: Reporting Problems](https://eslint.org/docs/latest/extend/custom-rules#reporting-problems)
2 changes: 1 addition & 1 deletion docs/rules/no-missing-message-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ module.exports = {

## Further Reading

- [messageIds API](https://eslint.org/docs/developer-guide/working-with-rules#messageids)
- [ESLint rule docs: `messageId`s](https://eslint.org/docs/latest/extend/custom-rules#messageids)
- [no-unused-message-ids](./no-unused-message-ids.md) rule
- [prefer-message-ids](./prefer-message-ids.md) rule
2 changes: 1 addition & 1 deletion docs/rules/no-missing-placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ If you want to use rule messages that actually contain double-curly bracket text

## Further Reading

- [context.report() API](http://eslint.org/docs/developer-guide/working-with-rules#contextreport)
- [ESLint rule docs: Using Message Placeholders](https://eslint.org/docs/latest/extend/custom-rules#using-message-placeholders)
2 changes: 1 addition & 1 deletion docs/rules/no-unused-message-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ module.exports = {

## Further Reading

- [messageIds API](https://eslint.org/docs/developer-guide/working-with-rules#messageids)
- [ESLint rule docs: `messageId`s](https://eslint.org/docs/latest/extend/custom-rules#messageids)
- [no-missing-message-ids](./no-missing-message-ids.md) rule
- [prefer-message-ids](./prefer-message-ids.md) rule
2 changes: 1 addition & 1 deletion docs/rules/no-unused-placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ If you want to allow unused placeholders, you should turn off this rule.

## Further Reading

- [context.report() API](http://eslint.org/docs/developer-guide/working-with-rules#contextreport)
- [ESLint rule docs: Using Message Placeholders](https://eslint.org/docs/latest/extend/custom-rules#using-message-placeholders)
- [no-missing-placeholders](https://github.com/eslint-community/eslint-plugin-eslint-plugin/blob/master/docs/rules/no-missing-placeholders.md)
2 changes: 1 addition & 1 deletion docs/rules/no-useless-token-range.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ module.exports = {

## Further Reading

- [`SourceCode` API](https://eslint.org/docs/developer-guide/working-with-rules#contextgetsourcecode)
- [ESLint rule docs: Accessing the Source Code](https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code)
2 changes: 1 addition & 1 deletion docs/rules/prefer-message-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ module.exports = {

## Further Reading

- [messageIds API](https://eslint.org/docs/developer-guide/working-with-rules#messageids)
- [ESLint rule docs: `messageId`s](https://eslint.org/docs/latest/extend/custom-rules#messageids)
- [no-invalid-message-ids](./no-invalid-message-ids.md) rule
- [no-missing-message-ids](./no-missing-message-ids.md) rule
2 changes: 1 addition & 1 deletion docs/rules/prefer-object-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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.
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.

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ If you need to use string concatenation in your report messages for some reason,

## Further Reading

- [context.report() API](http://eslint.org/docs/developer-guide/working-with-rules#contextreport)
- [ESLint rule docs: Using Message Placeholders](https://eslint.org/docs/latest/extend/custom-rules#using-message-placeholders)
2 changes: 1 addition & 1 deletion docs/rules/prefer-replace-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ module.exports = {

## Further Reading

- [Applying Fixes](https://eslint.org/docs/developer-guide/working-with-rules#applying-fixes)
- [ESLint rule docs: Applying Fixes](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes)
2 changes: 1 addition & 1 deletion docs/rules/require-meta-docs-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ module.exports = {

## Further Reading

- [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)
- [ESLint rule docs: Options Schemas](https://eslint.org/docs/latest/extend/custom-rules#options-schemas)
2 changes: 1 addition & 1 deletion docs/rules/require-meta-docs-recommended.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ module.exports = {

## Further Reading

- [Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
- [ESLint rule docs: Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
4 changes: 2 additions & 2 deletions docs/rules/require-meta-fixable.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ module.exports = {

## Further Reading

- [ESLint's autofix API](http://eslint.org/docs/developer-guide/working-with-rules#applying-fixes)
- [ESLint's rule basics mentioning `meta.fixable`](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics)
- [ESLint rule docs: Applying Fixes](https://eslint.org/docs/latest/extend/custom-rules#applying-fixes)
- [ESLint rule docs: Rule Structure (mentioning `meta.fixable`)](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
4 changes: 2 additions & 2 deletions docs/rules/require-meta-has-suggestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ module.exports = {

## Further Reading

- [ESLint's suggestion API](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions)
- [ESLint rule basics describing the `meta.hasSuggestions` property](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics)
- [ESLint rule docs: Providing Suggestions](https://eslint.org/docs/latest/extend/custom-rules#providing-suggestions)
- [ESLint rule docs: Rule Structure (mentioning `meta.hasSuggestions`)](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
2 changes: 1 addition & 1 deletion docs/rules/require-meta-schema-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ If your rule options are very simple and well-named, and your rule isn't used by

## Further Reading

- [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)
- [ESLint rule docs: Options Schemas](https://eslint.org/docs/latest/extend/custom-rules#options-schemas)
2 changes: 1 addition & 1 deletion docs/rules/require-meta-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ As mentioned in the introduction, the need for this rule is reduced as of ESLint

## Further Reading

- [working-with-rules#options-schemas](https://eslint.org/docs/developer-guide/working-with-rules#options-schemas)
- [ESLint rule docs: Options Schemas](https://eslint.org/docs/latest/extend/custom-rules#options-schemas)
4 changes: 2 additions & 2 deletions docs/rules/require-meta-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ module.exports = {

## Further Reading

- [command-line-interface#--fix-type](https://eslint.org/docs/user-guide/command-line-interface#--fix-type)
- [working-with-rules#rule-basics](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics)
- [ESLint CLI docs: `--fix-type`](https://eslint.org/docs/latest/use/command-line-interface#--fix-type)
- [ESLint rule docs: Rule Structure](https://eslint.org/docs/latest/extend/custom-rules#rule-structure)
- [ESLint v5.9.0 released](https://eslint.org/blog/2018/11/eslint-v5.9.0-released#the-fix-type-option)
2 changes: 1 addition & 1 deletion docs/rules/test-case-shorthand-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,4 @@ If you don't care about consistent usage of shorthand strings, you should not tu

## Further Reading

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