Skip to content
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

Fix no-multiple-empty-lines rule #2238

Merged
merged 1 commit into from Jun 9, 2020
Merged

Fix no-multiple-empty-lines rule #2238

merged 1 commit into from Jun 9, 2020

Conversation

vladshcherbin
Copy link
Contributor

From readme:

19.20 Avoid multiple empty lines, only allow one newline at the end of files, and avoid a newline at the beginning of files. eslint: no-multiple-empty-lines

Which has a bad example:

// bad - multiple empty lines
var x = 1;


var y = 2;

Currently, max empty lines is set to 2 and above example passes as a correct one. Same goes for other useless empty lines - between function declarations, etc.

@vladshcherbin
Copy link
Contributor Author

Since it's kinda breaking change it would be great to ship this with next major version, with eslint v7 support I believe.

@ljharb
Copy link
Collaborator

ljharb commented Jun 8, 2020

This would be considered semver-minor, since the guide already specifies "no multiple empty lines".

I can't recall why this was set to 2 originally - git suggests it was not intentional, and just matches the default.

@ljharb ljharb self-assigned this Jun 8, 2020
@ljharb ljharb merged commit cad3db3 into airbnb:master Jun 9, 2020
k-funk added a commit to k-funk/sf_dash that referenced this pull request Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants