8000 chore(lint): don't allow excess trailing newlines (#816) · shelljs/shelljs@62ce4ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 62ce4ba

Browse files
authored
chore(lint): don't allow excess trailing newlines (#816)
* chore(lint): don't allow excess trailing newlines This enforces that files should not end with blank lines (i.e. more than one trailing newline). The `eol-last` rule (inherited from airbnb's config) already enforces that files end in at least one trailing newline, so adding this rule enforces that it ends in exactly 1. See https://eslint.org/docs/rules/no-multiple-empty-lines and https://eslint.org/docs/rules/eol-last for more information. Inspired by #809. * add maxBOF
1 parent 2271080 commit 62ce4ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"consistent-return": "off",
2424
"no-mixed-operators": "off",
2525
"no-prototype-builtins": "off",
26+
"no-multiple-empty-lines": ["error", { "max": 2, "maxBOF": 0, "maxEOF": 0 } ],
2627
"new-cap": ["error", {
2728
"capIsNewExceptions": [
2829
"ShellString"

0 commit comments

Comments
 (0)
0