Skip to content

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

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

Open
2 tasks done
fweth opened this issue Mar 30, 2025 · 2 comments
Open
2 tasks done

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

fweth opened this issue Mar 30, 2025 · 2 comments
Labels

Comments

@fweth
Copy link

fweth commented Mar 30, 2025

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • 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 fweth added the bug label Mar 30, 2025
@ljharb ljharb closed this as completed in 2f64dea Apr 3, 2025
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 4, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
@fweth
Copy link
Author

fweth commented Apr 4, 2025

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!

@ljharb
Copy link
Member

ljharb commented Apr 4, 2025

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

@ljharb ljharb reopened this Apr 4, 2025
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 5, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 6, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 9, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 12, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 13, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 17, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Apr 19, 2025
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | eslint-plugin-react | 7.37.4 | 7.37.5 |


## [v7.37.5](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7375---20250403)

##### Fixed

-   \[`no-unknown-property`]: allow shadow root attrs on `<template>` ([#3912][] [@ljharb](https://github.com/ljharb))
-   \[`prop-types`]: support `ComponentPropsWithRef` from a namespace import ([#3651][] [@corydeppen](https://github.com/corydeppen))
-   \[`jsx-no-constructed-context-values`]: detect constructed context values in React 19 `<Context>` usage ([#3910][] [@TildaDares](https://github.com/TildaDares))
-   \[`no-unknown-property`]: allow `transform-origin` on `rect` ([#3914][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`button-has-type`]: clean up phrasing ([#3909][] [@hamirmahal](https://github.com/hamirmahal))

[7.37.5]: jsx-eslint/eslint-plugin-react@v7.37.4...v7.37.5

[#3914]: jsx-eslint/eslint-plugin-react#3914

[#3912]: jsx-eslint/eslint-plugin-react#3912

[#3910]: jsx-eslint/eslint-plugin-react#3910

[#3909]: jsx-eslint/eslint-plugin-react#3909

[#3651]: jsx-eslint/eslint-plugin-react#3651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants