avoid-unknown-pragma
preset: recommended
Warns when the @pragma
annotation has an unknown value.
Annotation values are checked against these lists:
- https://github.com/dart-lang/sdk/blob/main/runtime/docs/pragmas.md
- https://github.com/dart-lang/sdk/blob/main/pkg/compiler/doc/pragmas.md
Example
❌ Bad:
('vm:prefer-inlined') // LINT
Future<String> fn() {
...
}
✅ Good:
('vm:prefer-inline')
Future<String> fn() {
...
}