diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index 58d19c4441..5bfc8a0dec 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -277,6 +277,7 @@ rule = { create(context) { return {}; }, meta: { category: 'Possible Errors', recommended: true, url: 'https://eslint.org/docs/rules/no-console', + suggestion: true } }}; rule = { create(context) { return {}; }, meta: { fixable: 'whitespace' }}; diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 3654d815b8..8ecea57fc4 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -286,10 +286,16 @@ export namespace Rule { interface RuleMetaData { docs?: { + /** provides the short description of the rule in the [rules index](https://eslint.org/docs/rules/) */ description?: string; + /** specifies the heading under which the rule is listed in the [rules index](https://eslint.org/docs/rules/) */ category?: string; + /** is whether the `"extends": "eslint:recommended"` property in a [configuration file](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) enables the rule */ recommended?: boolean; + /** specifies the URL at which the full documentation can be accessed */ url?: string; + /** specifies whether rules can return suggestions (defaults to false if omitted) */ + suggestion?: boolean }; messages?: { [messageId: string]: string }; fixable?: 'code' | 'whitespace';