Open
Description
If you use Styled-Components, eslint-plugin-jsx-a11y cannot detect tags and apply rules, so it's rendered practically useless.
const Styled_Div = styled.div`...`;
const Nice_Button = styled.button`...`;
render() {
return <Styled_Div... />...<Nice_Button...> ... </Nice_Button>...</Styled_Div>;
}
I have two suggestions:
- add some definitions for equivalences in the configuration file:
equivalences = {
'Styled_Div' : 'div',
'Nice_Button' : 'button'
}
- alternatively, if the name of an tag ends with underscore and a HTML tag (as in my examples) just assume the tag:
Styled_Div
would be processed as adiv
, andNice_Button
as abutton
.