From ESLint:
.html
You can disable a check verifying that each file has a newline trailing. However, there does not appear to be an equal/opposite rule. How would I insure that my files have no newline at the end using ESLint? Is this possible?
From ESLint:
http://eslint/docs/rules/eol-last.html
You can disable a check verifying that each file has a newline trailing. However, there does not appear to be an equal/opposite rule. How would I insure that my files have no newline at the end using ESLint? Is this possible?
Share Improve this question asked Jan 15, 2016 at 19:06 BTCBTC 4,0926 gold badges29 silver badges42 bronze badges2 Answers
Reset to default 5You should be able to use the rule no-multiple-empty-lines
.
"no-multiple-empty-lines": [2, {"max": 99999, "maxEOF": 0}]
max
sets the maximum number of consecutive blank lines.
maxEOF
can be used to set a different number for the end of file. The last blank lines will then be treated differently. If omitted, the max option is applied everywhere.
Assuming you don't care about the number of empty lines between code, just set max
to a high number.
Related
1
Below settings for no empty lines at all
is not good
:
'no-multiple-empty-lines':['error',{ max:0 }],
2
But below 1 line
looks better
:
'no-multiple-empty-lines':['error',{ max:1 }],
For more options:
See https://eslint/docs/latest/rules/no-multiple-empty-lines