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

"Expected no line gap between" false positive #2774

Closed
nelsonprsousa opened this issue Aug 27, 2020 · 2 comments · Fixed by #2792
Closed

"Expected no line gap between" false positive #2774

nelsonprsousa opened this issue Aug 27, 2020 · 2 comments · Fixed by #2792

Comments

@nelsonprsousa
Copy link

nelsonprsousa commented Aug 27, 2020

I believe one of the last commits on master brings a new unexpected error. For example:

<Tab.Screen
    name={`Dia ${index + 1}`}
    component={DayTab}
    // eslint-disable-next-line react/no-array-index-key
    key={index}
/>

error Expected no line gap between “component” and “key” react/jsx-props-no-multi-spaces

@iiison / @ljharb is this okay? In these scenarios, how should we avoid the error?

@iiison
Copy link
Contributor

iiison commented Aug 28, 2020

Hmm. We're iterating over only on JSX attributes. I guess we need to update the rule to look for other elements in the tag. what do you think @ljharb ?

@ljharb
Copy link
Member

ljharb commented Aug 29, 2020

I would expect a comment to be ignored, so yes, that seems reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants