Skip to content

10$: error on writing = instead of => for lambda #1240

@strager

Description

@strager
// error: write '=>' for arrow function
const FeatureCard = ({}) =(
  <div />
);

Inspiration: https://x.com/Legend_1234555/status/1921846618875216329

// Not an error (but maybe deserves a warning):
const FeatureCard = (x) =(
  <div />
);
// An error, but maybe tricky to diagnose properly:
const FeatureCard = (x) ={
  return 42;
};

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