From 20e17431bc3a24e7d8a8871b0b34208ea463ab08 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 3 Feb 2024 17:51:16 -0500 Subject: [PATCH] Add link to typed linting in generated docs --- docs/examples/eslint-plugin-test/README.md | 2 +- docs/examples/eslint-plugin-test/docs/rules/no-foo.md | 2 +- docs/examples/eslint-plugin-test/docs/rules/prefer-bar.md | 2 +- lib/rule-doc-notices.ts | 2 +- lib/rule-list-legend.ts | 2 +- .../__snapshots__/option-rule-list-columns-test.ts.snap | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/examples/eslint-plugin-test/README.md b/docs/examples/eslint-plugin-test/README.md index c697fbfc..d47b3499 100644 --- a/docs/examples/eslint-plugin-test/README.md +++ b/docs/examples/eslint-plugin-test/README.md @@ -27,7 +27,7 @@ This plugin is for x purpose. 🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\ 💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\ ⚙️ Has configuration options.\ -💭 Requires type information.\ +💭 Requires [type information](https://typescript-eslint.io/linting/typed-linting).\ 🗂️ The type of rule.\ ❗ Identifies problems that could cause errors or unexpected behavior.\ 📖 Identifies potential improvements.\ diff --git a/docs/examples/eslint-plugin-test/docs/rules/no-foo.md b/docs/examples/eslint-plugin-test/docs/rules/no-foo.md index b909860b..82112b5c 100644 --- a/docs/examples/eslint-plugin-test/docs/rules/no-foo.md +++ b/docs/examples/eslint-plugin-test/docs/rules/no-foo.md @@ -6,7 +6,7 @@ ⚙️ This rule is configurable. -💭 This rule requires type information. +💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting). ❗ This rule identifies problems that could cause errors or unexpected behavior. diff --git a/docs/examples/eslint-plugin-test/docs/rules/prefer-bar.md b/docs/examples/eslint-plugin-test/docs/rules/prefer-bar.md index f5848f56..cbff8557 100644 --- a/docs/examples/eslint-plugin-test/docs/rules/prefer-bar.md +++ b/docs/examples/eslint-plugin-test/docs/rules/prefer-bar.md @@ -4,7 +4,7 @@ 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). -💭 This rule requires type information. +💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting). 📖 This rule identifies potential improvements. diff --git a/lib/rule-doc-notices.ts b/lib/rule-doc-notices.ts index f981d8fc..b412d9e9 100644 --- a/lib/rule-doc-notices.ts +++ b/lib/rule-doc-notices.ts @@ -253,7 +253,7 @@ const RULE_NOTICES: { [NOTICE_TYPE.HAS_SUGGESTIONS]: NOTICE_HAS_SUGGESTIONS, [NOTICE_TYPE.OPTIONS]: `${EMOJI_OPTIONS} This rule is configurable.`, - [NOTICE_TYPE.REQUIRES_TYPE_CHECKING]: `${EMOJI_REQUIRES_TYPE_CHECKING} This rule requires type information.`, + [NOTICE_TYPE.REQUIRES_TYPE_CHECKING]: `${EMOJI_REQUIRES_TYPE_CHECKING} This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).`, }; /** diff --git a/lib/rule-list-legend.ts b/lib/rule-list-legend.ts index 2380f490..18619f96 100644 --- a/lib/rule-list-legend.ts +++ b/lib/rule-list-legend.ts @@ -144,7 +144,7 @@ const LEGENDS: { [COLUMN_TYPE.NAME]: undefined, [COLUMN_TYPE.OPTIONS]: [`${EMOJI_OPTIONS} Has configuration options.`], [COLUMN_TYPE.REQUIRES_TYPE_CHECKING]: [ - `${EMOJI_REQUIRES_TYPE_CHECKING} Requires type information.`, + `${EMOJI_REQUIRES_TYPE_CHECKING} Requires [type information](https://typescript-eslint.io/linting/typed-linting).`, ], }; diff --git a/test/lib/generate/__snapshots__/option-rule-list-columns-test.ts.snap b/test/lib/generate/__snapshots__/option-rule-list-columns-test.ts.snap index 567df638..d6b8850b 100644 --- a/test/lib/generate/__snapshots__/option-rule-list-columns-test.ts.snap +++ b/test/lib/generate/__snapshots__/option-rule-list-columns-test.ts.snap @@ -48,7 +48,7 @@ exports[`generate (--rule-list-columns) shows column and notice for requiresType 💼 Configurations enabled in.\\ 🌐 Set in the \`all\` configuration.\\ -💭 Requires type information. +💭 Requires [type information](https://typescript-eslint.io/linting/typed-linting). | Name | Description | 💼 | 💭 | | :----------------------------- | :--------------------- | :- | :- | @@ -70,7 +70,7 @@ exports[`generate (--rule-list-columns) shows column and notice for requiresType exports[`generate (--rule-list-columns) shows column and notice for requiresTypeChecking updates the documentation 3`] = ` "# Description of no-bar (\`test/no-bar\`) -💭 This rule requires type information. +💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting). "