Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

react-this-binding-issue should ignore ref callbacks #438

@dgoldstein0

Description

@dgoldstein0

In a react render function, react-this-binding-issue fires on ref when it should not. E.g.:

class Form extends React.Component<{action: string}, {}> {
  render() {
    return (
      <form
         ref={f => (this.form = f)} // lint error here
         action={this.props.action}
         >
         {this.props.children}
      </form>
    );
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: MediumPeople with non-trivial experience in TSLint should be able to send a pull request for this issue.Status: Accepting PRsType: Rule SuggestionAdding a new rule that doesn't yet exist here or in TSLint core.💀 R.I.P. 💀

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions