Closed
Description
There is component named Text
in my project. ESLint doesn't tell me that Text
is undefined
because it's existing class in the DOM API.
I suggest add rule which deny use components defined globally:
{
"rules": {
"react/jsx-no-undef": ["error", { "onlyImported": true }]
}
}
import Text from './Text';
<Text /> // ok
<Text /> // react/jsx-no-undef: 'Text' component not found in current scope.