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

eslint: tweak documentation for rule meta properties #68619

Merged
Merged
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
14 changes: 6 additions & 8 deletions types/eslint/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,17 +696,15 @@ export namespace Rule {
}

interface RuleMetaData {
/** Properties often used for documentation generation and tooling. */
docs?: {
/** Provides a short description of the rule. */
/** Provides a short description of the rule. Commonly used when generating lists of rules. */
description?: string | undefined;
/**
* TODO: remove this field in next major release of @types/eslint.
* @deprecated no longer used
*/
/** Historically used by some plugins that divide rules into categories in their documentation. */
category?: string | undefined;
/** Whether the rule is enabled in the plugin's `recommended` configuration. */
/** Historically used by some plugins to indicate a rule belongs in their `recommended` configuration. */
recommended?: boolean | undefined;
/** Specifies the URL at which the full documentation can be accessed (enabling code editors to provide a helpful link on highlighted rule violations). */
/** Specifies the URL at which the full documentation can be accessed. Code editors often use this to provide a helpful link on highlighted rule violations. */
url?: string | undefined;
/**
* TODO: remove this field in next major release of @types/eslint.
Expand All @@ -724,7 +722,7 @@ export namespace Rule {
/**
* Specifies the [options](https://eslint.org/docs/latest/developer-guide/working-with-rules#options-schemas)
* so ESLint can prevent invalid [rule configurations](https://eslint.org/docs/latest/user-guide/configuring/rules#configuring-rules).
* TODO: schema is potentially planned to be no longer be optional in v9 (https://github.com/eslint/rfcs/blob/main/designs/2021-schema-object-rules/README.md)
* Mandatory for rules with options.
*/
schema?: JSONSchema4 | JSONSchema4[] | undefined;

Expand Down