-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce only 1 newline at end of file (currently 1-2 are allowed) #733
Comments
This looks like an ESLint bug, so I opened an issue there: eslint/eslint#7866 |
Turns out the way ESLint counts lines at the end of the file is a bit wonky. They don't count the last
That fixes this issue, and also another issue with |
This will be part of standard v9. There were 12 repos that failed, but this is trivial to fix, is also automatically fixable with |
If there are spaces on the last line,
standard --fix
will remove the spaces, but still add a newline.In the following example I added characters to visualize newlines and spaces. An empty line is marked with a
_
(underscore) and a space is marked with a.
(dot).Correct:
becomes
Wrong:
becomes
The text was updated successfully, but these errors were encountered: