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 errors when no line breaks (fixes #6449) #6451

Merged
merged 1 commit into from Jun 19, 2016

Conversation

strawbrary
Copy link
Contributor

No description provided.

@eslintbot
Copy link

LGTM

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @RRMoelker, @vitorbal and @gcochard to be potential reviewers

@nzakas
Copy link
Member

nzakas commented Jun 17, 2016

LGTM. Leaving open to get some other eyes on it.

@ilyavolodin
Copy link
Member

LGTM

azu added a commit to textlint/textlint that referenced this pull request Jun 18, 2016
azu added a commit to textlint/textlint that referenced this pull request Jun 18, 2016
azu added a commit to textlint/textlint that referenced this pull request Jun 18, 2016
* chore(npm): update devDeps

* chore(eslint): avoid error no-multiple-empty-lines

eslint/eslint#6449
eslint/eslint#6451
@@ -98,7 +98,7 @@ module.exports = {

linesRangeStart.push(0);
lines.forEach(function(str, i) {
var length = i < fullLines.length ? fullLines[i].length : 0,
var length = Array.isArray(fullLines) && i < fullLines.length ? fullLines[i].length : 0,
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could an alternative fix be to add || [] on line 81 above, so that it's always an array, and you don't have to check if it is one N times?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, good call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the pull with change from @ljharb.

@eslintbot
Copy link

LGTM

@alberto
Copy link
Member

alberto commented Jun 18, 2016

LGTM

@ilyavolodin ilyavolodin merged commit 1e185b9 into eslint:master Jun 19, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants