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] "Expected no line gap between" false positive #2792

merged 1 commit into from Sep 21, 2020


Copy link

@karolina-benitez karolina-benitez commented Sep 10, 2020

Fixes #2774.

…se positive

Fixes #2774.
@ljharb ljharb changed the title [FIX] "Expected no line gap between" false positive [Fix] "Expected no line gap between" false positive Sep 10, 2020
if (nodeLineDifference > 1) {
for (let i = 0; i < nodeLineDifference - 1; i++) {
if (!sourceCodeArray[prevNodeEndLine + i].includes('//')) {

This comment has been minimized.


ljharb Sep 10, 2020

there could also be comments like /* foo */ or also like <!-- bar --> - can we add some tests for those? I have a feeling there's an eslint helper method here that can help ensure there's just whitespace and comments, rather than relying on introspecting text.

ljharb approved these changes Sep 21, 2020
Copy link

@ljharb ljharb left a comment

Thanks, looks great!

@ljharb ljharb force-pushed the karolina-benitez:issue2774 branch from 684adc5 to facb65b Sep 21, 2020
@ljharb ljharb merged commit facb65b into yannickcr:master Sep 21, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.005%) to 97.501%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.