Repository: eslint/eslint
File: lib/shared/types.js (JavaScript)

Code before:

/**
 * @typedef {Object} SuggestionResult
 * @property {string} desc A short description.
 * @property {string} [messageId] Id referencing a message for the description.
 * @property {{ text: string, range: number[] }} fix fix result info
 */

/**
 * @typedef {Object} Processor
 * @property {(text:string, filename:string) => Array<string | { text:string, filename:string }>} [preprocess] The function to extract code blocks.
 * @property {(messagesList:LintMessage[][], filename:string) => LintMessage[]} [postprocess] The function to merge messages.
 * @property {boolean} [supportsAutofix] If `true` then it means the processor supports autofix.
 */

/**
 * @typedef {Object} RuleMetaDocs
 * @property {string} description The description of the rule.
 * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset.
 * @property {string} url The URL of the rule documentation.
 */

/**
 * @typedef {Object} DeprecatedInfo
 * @property {string} [message] General message presented to the user
 * @property {?string} [url] URL to more information about this deprecation in general
 * @property {ReplacedByInfo[]} [replacedBy] Potential replacements for the rule
 * @property {string} [deprecatedSince] Version since the rule is deprecated
 * @property {?string} [availableUntil] Version until it is available or null if indefinite
 */

/**
 * @typedef {Object} ReplacedByInfo
 * @property {string} [message] General message presented to the user
 * @property {string} [url] URL to more information about this replacement in general
 * @property {{ name?: string, url?: string }} [plugin] Use "eslint" for a core rule. Omit if the rule is in the same plugin.
 * @property {{ name?: string, url?: string }} [rule] Name and information of the replacement rule
 */

/**
 * @typedef {Object} Plugin
 * @property {Record<string, ConfigData>} [configs] The definition of plugin configs.
 * @property {Record<string, Environment>} [environments] The definition of plugin environments.
 * @property {Record<string, Processor>} [processors] The definition of plugin processors.
 * @property {Record<string, Rule>} [rules] The definition of plugin rules.
 */

/**
 * Information of deprecated rules.
 * @typedef {Object} DeprecatedRuleInfo
 * @property {string} ruleId The rule ID.

Review comment (suggestion):
```suggestion
 * @property {string} [url] URL to more information about this deprecation in general
```

Actually `url` isn't nullable: https://github.com/eslint/rewrite/blob/core-v0.13.0/packages/core/src/types.ts#L214-L217



Code after:

/**
 * @typedef {Object} SuggestionResult
 * @property {string} desc A short description.
 * @property {string} [messageId] Id referencing a message for the description.
 * @property {{ text: string, range: number[] }} fix fix result info
 */

/**
 * @typedef {Object} Processor
 * @property {(text:string, filename:string) => Array<string | { text:string, filename:string }>} [preprocess] The function to extract code blocks.
 * @property {(messagesList:LintMessage[][], filename:string) => LintMessage[]} [postprocess] The function to merge messages.
 * @property {boolean} [supportsAutofix] If `true` then it means the processor supports autofix.
 */

/**
 * @typedef {Object} RuleMetaDocs
 * @property {string} description The description of the rule.
 * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset.
 * @property {string} url The URL of the rule documentation.
 */

/**
 * @typedef {Object} DeprecatedInfo
 * @property {string} [message] General message presented to the user
 * @property {string} [url] URL to more information about this deprecation in general
 * @property {ReplacedByInfo[]} [replacedBy] Potential replacements for the rule
 * @property {string} [deprecatedSince] Version since the rule is deprecated
 * @property {?string} [availableUntil] Version until it is available or null if indefinite
 */

/**
 * @typedef {Object} ReplacedByInfo
 * @property {string} [message] General message presented to the user
 * @property {string} [url] URL to more information about this replacement in general
 * @property {{ name?: string, url?: string }} [plugin] Use "eslint" for a core rule. Omit if the rule is in the same plugin.
 * @property {{ name?: string, url?: string }} [rule] Name and information of the replacement rule
 */

/**
 * @typedef {Object} Plugin
 * @property {Record<string, ConfigData>} [configs] The definition of plugin configs.
 * @property {Record<string, Environment>} [environments] The definition of plugin environments.
 * @property {Record<string, Processor>} [processors] The definition of plugin processors.
 * @property {Record<string, Rule>} [rules] The definition of plugin rules.
 */

/**
 * Information of deprecated rules.
 * @typedef {Object} DeprecatedRuleInfo
 * @property {string} ruleId The rule ID.