deprecated_lint
Details about the 'deprecated_lint' diagnostic produced by the Dart analyzer.
The lint rule '{0}' is deprecated and shouldn't be enabled.
Description
#The analyzer produces this diagnostic when an enabled lint rule is deprecated.
Example
#
The following code produces this diagnostic because the rule
always_specify_types is deprecated:
// %uri="analysis_options.yaml"
linter:
rules:
- always_specify_types
- annotate_overrides
Common fixes
#If a replacement rule exists, enable it:
// %uri="analysis_options.yaml"
linter:
rules:
- annotate_overrides
- specify_nonobvious_property_types
If no replacement rule exists, remove the deprecated lint rule from the list:
// %uri="analysis_options.yaml"
linter:
rules:
- annotate_overrides
除非另有说明,文档之所提及适用于 Dart 3.10.3 版本报告页面问题.