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
merged 1 commit into from Sep 21, 2020

Conversation

@karolina-benitez
Copy link
Contributor

@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

ljharb Sep 10, 2020
Collaborator

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
ljharb approved these changes Sep 21, 2020
Copy link
Collaborator

@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
Details
coverage/coveralls Coverage increased (+0.005%) to 97.501%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

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