avoid-banned-annotations
- Group
- Suspicious
- Path
lint/suspicious/avoid-banned-annotations- Default
- Off, opt in
- Origin
- Falcon
- Rule
- 17 of 512
Ban configured dotted annotation names, without the leading @.
Invalid
const legacy = 1;
class Marker {
const Marker.old();
}
@legacy
class Example {}
@Marker.old()
void example() {}}@legacyclass Example {}@Marker.old()Valid
const modern = 1;
class Marker {
const Marker();
}
@modern
class Example {}
@Marker()
void example() {}
const text = '@legacy';Configure avoid-banned-annotations
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"suspicious": {
"avoid-banned-annotations": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/suspicious/avoid-banned-annotations: <reason>More suspicious rules
- avoid-banned-exports
Ban decoded export URIs, including all conditional alternatives.
- avoid-banned-names
Ban declaration names, exempting references, initializing/super formals, and
@override-annotated members and their parameters. - avoid-banned-types
Ban resolved explicit type annotations, including nested generic arguments.
- avoid-barrel-files
Discourage files containing only re-exports, without declarations or parts.
- avoid-bitwise-operators-with-booleans
Flags
&and|applied to two non-nullable boolean operands. - avoid-commented-out-code
Flags ordinary comments that contain recognizable Dart statements.
- avoid-double-slash-imports
Reject repeated path separators in directive URIs (import, export and part).
- avoid-dynamic
avoid-dynamicFlags explicit
dynamictype annotations.