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

When using typescript template CRA does not lint correctly #11280

Open
lobaak opened this issue Aug 5, 2021 · 1 comment
Open

When using typescript template CRA does not lint correctly #11280

lobaak opened this issue Aug 5, 2021 · 1 comment

Comments

@lobaak
Copy link

lobaak commented Aug 5, 2021

When using the typescript template with the following example no react/jsx-key error is displayed on the div in the loop.

const list = [
  { id: 1, title: "test" },
  { id: 2, title: "test" },
];

function App() {
  return (
    <div className="App">
      {list.map((item) => (
        // No linting error here for missing key
        <div>{item.title}</div>
      ))}
    </div>
  );
}

export default App;

Is this intended or is it something to do with Typescript? I noticed there is an error if I use plain JS

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

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

No branches or pull requests

1 participant