Skip to content
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

react/no-unknown-property: allow viewbox on symbol #3426

Closed
pgrippi opened this issue Sep 8, 2022 · 1 comment
Closed

react/no-unknown-property: allow viewbox on symbol #3426

pgrippi opened this issue Sep 8, 2022 · 1 comment

Comments

@pgrippi
Copy link

pgrippi commented Sep 8, 2022

Similar to #3416 but for symbol instead of marker

using version 7.31.7

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox

I have a component that looks like:

<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em">
  <symbol viewBox="0 0 24 24" id="..." xmlns="http://www.w3.org/2000/svg">
    <path
      fill="currentColor"
      d="..."
    />
  </symbol>
</svg>

And it's throwing an error:

error  Invalid property 'viewBox' found on tag 'symbol', but it is only allowed on: svg  react/no-unknown-property

it might be good to also add it for pattern and view as those tags also accept viewBox according to MDN but are not listed in the allowed tags

@ljharb
Copy link
Member

ljharb commented Sep 8, 2022

This will be fixed by #3424

@ljharb ljharb closed this as completed in 8e07874 Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants