eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

[Bug]: `transform-origin` is misattributed as unknown property

Open fweth opened this issue 8 months ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues and my issue is unique
  • [x] My issue appears in the command-line and not only in the text editor

Description Overview

In SVG elements, like rect, transform-origin is misattributed as unknown property, but it is a valid attribute.

<svg>
  <rect transform-origin="center" />
</svg>

I get the following message:

Unknown property 'transform-origin' foundeslintreact/no-unknown-property

Expected Behavior

eslint-plugin-react version

7.37.4

eslint version

9.23.0

node version

v22.14.0

fweth avatar Mar 30 '25 17:03 fweth

Hi, thanks a lot for fixing this! Just one question, do I understand correctly that transform-origin has been only added to the rect element? That was just an example in my ticket, but the property is supported on all SVG elements!

fweth avatar Apr 04 '25 14:04 fweth

Yes, i only added it to rect. I’ll reopen until all of them are covered.

ljharb avatar Apr 04 '25 14:04 ljharb