eol-at-end-of-file
Same as eol_at_end_of_file in Dart lints
- Group
- Style
- Path
lint/style/eol-at-end-of-file- Default
- On (recommended)
- Origin
- Dart lints
- Rule
- 233 of 512
Flags a non-empty file that does not end with exactly one line break.
A missing final newline breaks tools that process files line by line, and extra blank lines at the end are noise. Both are reported at the end of the last non-whitespace character:
void f() {}⏎ // fine
void f() {} // flagged: no newline at the end
void f() {}⏎⏎ // flagged: more than one newline at the end
Invalid
void main() {}void main() {}Valid
void main() {}Configure eol-at-end-of-file
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"eol-at-end-of-file": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/eol-at-end-of-file: <reason>More style rules
- extend-equatableequatable
Require Equatable semantics for configured class/file name patterns.
- file-names
file_namesrecommendedEnforces
lowercase_with_underscoresfor source file names. - flutter-style-todos
flutter_style_todosFlags
TODOcomments that do not follow the Flutter style// TODO(username): message, https://URL-to-issue. - format-comment
format-commentFlags comments that are not formatted as complete sentences.
- implicit-call-tearoffs
implicit_call_tearoffsExplicitly tear off callable objects' call methods.
- initializers-ordering
Requires field initializers to follow their containing type's field declaration order by default.
- leading-newlines-in-multiline-strings
leading_newlines_in_multiline_stringsFlags a multiline string spanning several lines whose text does not start with a line break right after the opening quotes.
- library-annotations
library_annotationsrecommendedRequires library-targeted metadata to attach to a
librarydirective.