HF RL Explorer

ESLint rules no-undef and no-use-before-define fail to recognise JSX element names as variable references

ESLint rules no-undef and no-use-before-define fail to recognise JSX element names as variable references: a task in LegoFlow-SWE (Harbor dataset). When linting files that contain JSX, the scope analysis does not treat a JSX element name (e.g. <Card ) as a reference to the variable in scope. This…

The task

When linting files that contain JSX, the scope analysis does not treat a JSX element name (e.g. `<Card>`) as a reference to the variable in scope. This means rules that depend on reference tracking – notably `no-undef` and `no-use-before-define` – produce incorrect results.

Part of Lego-X/LegoFlow-SWE.