New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'name' of undefined in jsx-no-target-blank #1296
Comments
That's an unclosed element; what's the full source? |
Sorry about that, here's the full source: <a
{...css(
styles.muted,
styles.footerItem,
styles.fullWidthOnMobile
)}
target="_blank"
rel="noopener noreferrer"
href="https://www.company.com/about"
>
about company
</a> |
FWIW, I can't replicate this on a freshly created |
Any chance the upgrade isn't bumping eslint-plugin-react? If you do the upgrade and then npm install eslint-plugin-react, what happens? |
I compared Here is the result of upgrading It looks like When running |
It's likely the spread that's doing it. |
Can you confirm by removing it temporarily? |
@ljharb - you're completely right, removing the spread on Any way to work around this? Edit: I can workaround this for now by using a different method of passing styles. Not sure if there's any way to work around this that lets you keep the spread. |
I don't think there's a workaround short of disabling the rule entirely for that file. |
Working on a fix. |
Thanks for the fix, you all are awesome! 😄 |
I'm getting this error after upgrading
react-scripts
to the latest version. Example code:The source line from the error is line 28, where it does
attr.name.name
.The text was updated successfully, but these errors were encountered: