filer icon indicating copy to clipboard operation
filer copied to clipboard

Enforce newline at end of files

Open 0xazure opened this issue 6 years ago • 2 comments

Trailing newlines are a common idiom in programming, and enabling this rule will save reviewers nitpicking or overlooking missing trailing newlines.

ESLint also supports the --fix option to automate fixing some of the problems reported by this rule.

There are no current files in the codebase that require fixing to add trailing newlines as verified by npm run lint.

0xazure avatar Sep 24 '18 21:09 0xazure

To consider:

This rule enforces at least one newline (or absence thereof) at the end of non-empty files.

If we want to enforce just one trailing newline, we would also need to enable no-multiple-empty-lines to control maxEOF.

0xazure avatar Sep 24 '18 21:09 0xazure

I'll let @modeswitch review this one.

humphd avatar Sep 25 '18 02:09 humphd