library-annotations
Same as library_annotations in Dart lints
- Group
- Style
- Path
lint/style/library-annotations- Default
- On (recommended)
- Origin
- Dart lints
- Rule
- 251 of 512
Requires library-targeted metadata to attach to a library directive.
Invalid
@TestOn('browser')
import 'package:test/test.dart';
@pragma('dart2js:late:trust')
export 'other.dart';
void main() {}@TestOn('browser')import 'package:test/test.dart';@pragma('dart2js:late:trust')Valid
@TestOn('browser')
library;
import 'package:test/test.dart';
void main() {}
class pragma {
const pragma(String value);
}
@pragma('dart2js:late:trust')
class LocalPragma {}Configure library-annotations
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"library-annotations": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/library-annotations: <reason>More style rules
- library-names
library_namesrecommendedFlags a library name that is not
lowercase_with_underscores. - library-prefixes
library_prefixesrecommendedFlags import prefixes that are not
lower_case_with_underscores. - lines-longer-than-80-chars
lines_longer_than_80_charsFlags source lines longer than 80 characters.
- map-keys-ordering
Flags literal string map keys that violate the configured order.
- matching-super-parameters
matching_super_parametersFlags positional super parameters named differently from the super constructor's corresponding parameter.
- member-ordering
member-orderingFlags class members declared out of the configured order.
- missing-whitespace-between-adjacent-strings
missing_whitespace_between_adjacent_stringsrecommendedFlags adjacent string literals that join two words without a space between them.
- newline-before-break
Requires a blank line before a break that follows another statement.