Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upEnforce only 1 newline at end of file (currently 1-2 are allowed) #733
Comments
This comment has been minimized.
This comment has been minimized.
|
This looks like an ESLint bug, so I opened an issue there: eslint/eslint#7866 |
feross
closed this
Jan 5, 2017
This comment has been minimized.
This comment has been minimized.
|
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 |
feross
reopened this
Jan 11, 2017
feross
changed the title
Space on last line - wrong formatting
Enforce only 1 newline at end of file (currently 1-2 are allowed)
Jan 11, 2017
dcousens
added
the
bug
label
Jan 11, 2017
feross
added this to the
standard v9 milestone
Jan 11, 2017
feross
added a commit
to standard/eslint-config-standard
that referenced
this issue
Feb 9, 2017
This comment has been minimized.
This comment has been minimized.
|
This will be part of standard v9. There were 12 repos that failed, but this is trivial to fix, is also automatically fixable with |
feross
closed this
Feb 9, 2017
feross
added a commit
to standard/eslint-config-standard
that referenced
this issue
Feb 9, 2017
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
johannes-z commentedJan 5, 2017
If there are spaces on the last line,
standard --fixwill 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