Closed EvgenyOrekhov closed 1 year ago
I believe i saw this recently as well. I can try and take a look soon. Thanks.
On Mon, Jun 26, 2023 at 8:05 AM Evgeny Orekhov @.***> wrote:
When I have a styled component that wraps another styled component from a different file, I get these warnings:
elements must have the lang prop. eslint(styled-components-a11y/html-has-lang)
Seeing the same thing as well. Hopefully this can be resolved soonish so I can start using it. 🙏
I'm experiencing this as well when wrapping a dot-notated component.
const TileBody = styled(TileBody.Right)`
//....
`;
The dot notation is also where i see it. Ill try and take a look this weekend. Thanks for the info
On Fri, Jul 7, 2023 at 11:03 AM shroy @.***> wrote:
I'm experiencing this as well when wrapping a dot-notated component.
const TileBody = styled(TileBody.Right)
//....
;— Reply to this email directly, view it on GitHub https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/issues/54#issuecomment-1625696633, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRNADNDGX7LSILP4QOGXN3XPA6ONANCNFSM6AAAAAAZUG6RWA . You are receiving this because you commented.Message ID: <brendanmorrell/eslint-plugin-styled-components-a11y/issues/54/1625696633@ github.com>
Alright. Seemed there were two cases were the rules were misfiring: When the component is one where the tag is a key on another object, such as in styled(animated.div)
and in cases where we can't determine the base tag of a custom component, such as when importing a component from another file and calling styled(CustomComponent)
on it. I believe I now have solved both cases and I am not getting the error anywhere anymore. Version 2.1.3 is up now. @EvgenyOrekhov, @shroy, @HaleyWardo: If any of you are still seeing the error anywhere, if you create a reproduction in a codesandbox, I can take another look. cheers!
It's working perfectly! Thank you for the quick fix @brendanmorrell! 👏
It works now, thank you! 🎉
Thanks for the quick fix! It's looking good!
Great! glad to hear it. Thanks, guys
On Tue, Jul 11, 2023 at 10:40 AM shroy @.***> wrote:
Thanks for the quick fix! It's looking good!
— Reply to this email directly, view it on GitHub https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/issues/54#issuecomment-1631148335, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRNADLDUKUFQTIICJX3JTTXPV6XFANCNFSM6AAAAAAZUG6RWA . You are receiving this because you were mentioned.Message ID: <brendanmorrell/eslint-plugin-styled-components-a11y/issues/54/1631148335@ github.com>
When I have a styled component that wraps another styled component from a different file, I get these warnings:
Example code:
index.tsx
components/Link.tsx
This started happening with 2.1.0, worked fine with 2.0.0.