Skip to content

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

Closed
@tnorling

Description

@tnorling

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;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions