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

False positive for react/no-multiline-comp #3308

Closed
tnorling opened this issue Jun 10, 2022 · 4 comments
Closed

False positive for react/no-multiline-comp #3308

tnorling opened this issue Jun 10, 2022 · 4 comments

Comments

@tnorling
Copy link

After upgrading to version 7.30.0 from 7.29.4 I'm now getting errors for react/no-multiline-comp for functions which are not supposed to be React components and which didn't throw previously. Functions which return null and are defined as an object property, seem to be interpreted as React components now, but shouldn't be.

A minimal example demonstrating this behavior:

const testObject = {
  testFunction1: () => {
    return null;
  },
  testFunction2: () => {
    return null;
  }
}
@ljharb
Copy link
Member

ljharb commented Jun 10, 2022

I believe this will be fixed in the next release, by #3291.

@ljharb ljharb closed this as completed Jun 10, 2022
@tnorling
Copy link
Author

Thanks!

@tnorling
Copy link
Author

@ljharb This is still a problem in 7.30.1

@ljharb
Copy link
Member

ljharb commented Aug 4, 2022

Hopefully #3347 will fix it in the next release, then :-)

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

No branches or pull requests

2 participants