Skip to content

eslint-config-react-app is not respecting "no-unused-vars" rule when variable name is h1, div etc. #10609

@nkumar-ee

Description

@nkumar-ee

Describe the bug

eslint-config-react-app is not respecting "no-unused-vars" rule if the variable name is same as HTML Intristic elements used in the same component.

Did you try recovering your dependencies?

Yes

Environment

Devlopment

Steps to reproduce

In project root run below command
npm run lint

Expected behavior

It should show h1 & div is unused

Actual behavior

It shows no lint errors

Reproducible demo

https://codesandbox.io/s/silent-leaf-vv3vt?file=/src/App.tsx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions