jednano / eclint

Validate or fix code that doesn't adhere to EditorConfig settings or infer settings from existing code.
MIT License
307 stars 28 forks source link

Empty file with single empty line throws an "expected final newline" error #156

Open robinmanuelthiel opened 5 years ago

robinmanuelthiel commented 5 years ago

Empty files in the project, which do have just one single empty line (as shown below) throw errors when insert_final_newline = true is set in the .editorconfig.

image

eclint check

#> src/app/components/about/about.component.scss
#       01:01 ❌ expected final newline

Is that an expected behaviour? I would argue, that this file does end with an empty line. Even if it's the only line it has.

JoaRiski commented 4 years ago

This also happens with completely empty files, which is a bit silly