Rule Deprecation
The rule deprecation metadata describes whether a rule is deprecated and how the rule can be replaced if there is a replacement.
The legacy format used the two top-level rule meta properties deprecated: true
and replacedBy
.
In the new format deprecated
is an object of type DeprecatedInfo
and replacedBy
should be defined inside deprecated
instead of the top-level.
◆ DeprecatedInfo type
This type represents general information about a rule deprecation. Every property is optional.
message
(string
)
A general message presentable to the user. May contain why this rule is deprecated or how to replace the rule.url
(string
)
An URL with more information about this rule deprecation.replacedBy
(ReplacedByInfo[]
)
Information about the available replacements for the rule. This may be an empty array to explicitly state there is no replacement.deprecatedSince
(string
)
Semver of the version deprecating the rule.availableUntil
(string | null
)
Semver of the version likely to remove the rule, e.g. the next major version. The special valuenull
means the rule will no longer be changed but will be kept available.
◆ ReplacedByInfo type
The type describes a single possible replacement of a rule. Every property is optional.
message
(string
)
A general message about this rule replacement, e.g.url
(string
)
An URL with more information about this rule replacement.plugin
(ExternalSpecifier
)
Specifies which plugin has the replacement rule. The name should be the package name and should be “eslint” if the replacement is an ESLint core rule. This property should be omitted if the replacement is in the same plugin.rule
(ExternalSpecifier
)
Specifies the replacement rule. May be omitted if the plugin only contains a single rule or has the same name as the rule.
◆ ExternalSpecifier type
This type represents an external resource. Every property is optional.
name
(string
)
The package name forplugin
and the rule id forrule
.url
(string
)
An URL pointing to documentation for the plugin / rule…