library-names
Same as library_names in Dart lints
- Group
- Style
- Path
lint/style/library-names- Default
- On (recommended)
- Origin
- Dart lints
- Rule
- 252 of 512
Flags a library name that is not lowercase_with_underscores.
Library names are global identifiers; Effective Dart spells them in lower case with underscores, with optional dot-separated segments:
library peg_parser.source_scanner; // fine
library PegParser.SourceScanner; // flagged
The first segment may start with one underscore or a digit; later segments must start with a lower-case letter.
Invalid
// Library names must be lower_case_with_underscores, dot-separated.
library PegParser.SourceScanner;
void main() {}// Library names must be lower_case_with_underscores, dot-separated.library PegParser.SourceScanner;Valid
// Lower-case, underscore-separated, dot-separated library name.
library peg_parser.source_scanner;
void main() {}Configure library-names
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"library-names": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/library-names: <reason>More style rules
- 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.
- newline-before-case
Requires a blank line between successive switch statement case clauses.