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.

@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('//')) {
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, looks great!

@ljharb ljharb merged commit facb65b into jsx-eslint:master Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

"Expected no line gap between" false positive
2 participants