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

[Bug]: react/no-danger — TypeError: Cannot read properties of undefined (reading 'split') #3833

Closed
2 tasks done
sylvainDNS opened this issue Sep 27, 2024 · 17 comments
Closed
2 tasks done
Labels

Comments

@sylvainDNS
Copy link

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

Hi team, thanks for your work on this lib 🙏

Using react/no-danger rule with option ['error', { customComponentNames: ['*'] }] cause a command-line error.

Documentation about it: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md

Here is how I use the rule in my eslint configuration:

    'react/no-danger': ['error', { customComponentNames: ['*'] }],

When I run eslint ./src on my project, an error occurred (only using customComponentNames option):

❯ eslint ./src

Oops! Something went wrong! :(

ESLint: 8.57.0

TypeError: Cannot read properties of undefined (reading 'split')
Occurred while linting /Users/sylvain/react-app/src/App.tsx:74
Rule: "react/no-danger"
    at Minimatch.match (/Users/sylvain/react-app/node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js:743:9)
    at minimatch (/Users/sylvain/react-app/node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js:125:42)
    at /Users/sylvain/react-app/node_modules/.pnpm/eslint-plugin-react@7.37.0_eslint@8.57.0/node_modules/eslint-plugin-react/lib/rules/no-danger.js:82:83
    at Array.some (<anonymous>)
    at JSXAttribute (/Users/sylvain/react-app/node_modules/.pnpm/eslint-plugin-react@7.37.0_eslint@8.57.0/node_modules/eslint-plugin-react/lib/rules/no-danger.js:82:68)
    at ruleErrorHandler (/Users/sylvain/react-app/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/linter.js:1076:28)
    at /Users/sylvain/react-app/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/sylvain/react-app/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/sylvain/react-app/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
/Users/sylvain/react-app:
Exit status 2

This error is triggered by this line

const enableCheckingCustomComponent = customComponentNames.some((name) => minimatch(functionName, name));

Actually I don't know why, but sometimes functionName is undefined

const functionName = node.parent.name.name;

Expected Behavior

Locally I patched eslint-plugin-react like this:

diff --git a/lib/rules/no-danger.js b/lib/rules/no-danger.js
index fb702632082068b08954ebb849d0994da6fac5b6..be0f82185cd9bc8358f29f5a19104ad3343996d7 100644
--- a/lib/rules/no-danger.js
+++ b/lib/rules/no-danger.js
@@ -77,10 +77,9 @@ module.exports = {
 
     return {
       JSXAttribute(node) {
-        const functionName = node.parent.name.name;
-
-        const enableCheckingCustomComponent = customComponentNames.some((name) => minimatch(functionName, name));
+        const functionName = node.parent.name.name ?? '';
 
+        const enableCheckingCustomComponent =  customComponentNames.some((name) => name === '*' || minimatch(functionName, name));
         if ((enableCheckingCustomComponent || jsxUtil.isDOMComponent(node.parent)) && isDangerous(node.name.name)) {
           report(context, messages.dangerousProp, 'dangerousProp', {
             node,

The first change is made to prevent functionName from being undefined (although this doesn't explain why).

The second change is made to skip the check on component names if we defined the rule on '*'.

I can make a PR if you want.

eslint-plugin-react version

v7.37.0

eslint version

v8.57.0

node version

v20.16.0

@sylvainDNS sylvainDNS added the bug label Sep 27, 2024
@ljharb
Copy link
Member

ljharb commented Sep 27, 2024

Can you provide the code that this is crashing on?

@halouvi
Copy link

halouvi commented Oct 21, 2024

I have the same issue and it seems that there are two conditions that need to be present for this error to be thrown:

  1. The component is rendered using dot notation.
  2. The component receives props.
import React from 'react';

const Component = () => <></>;

const NestedComponent = () => <></>;

Component.NestedComponent = NestedComponent;

export const RenderTest = () => <Component.NestedComponent key=""/>;

@ljharb
Copy link
Member

ljharb commented Oct 21, 2024

@halouvi that test case passes for me. What eslint config are you using?

@halouvi
Copy link

halouvi commented Oct 22, 2024

@ljharb these are my eslint package versions:

"eslint": "8.27.0",
"@typescript-eslint/eslint-plugin": "5.30.5",
"@typescript-eslint/parser": "5.30.5",
"eslint-config-airbnb-typescript": "16.2.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-typescript": "2.7.1",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-styled-components-a11y": "0.1.0",

And this is my eslintrc.json:

{
    "root": true,
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": [
        "airbnb-typescript",
        "prettier",
        "plugin:styled-components-a11y/recommended"
    ],
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 2018,
        "sourceType": "module",
        "project": "./tsconfig.json",
        "extraFileExtensions": [".html"]
    },
    "parser": "@typescript-eslint/parser",
    "plugins": [
        "react",        
        "react-hooks",
        "jsx-a11y",
        "filenames",
        "import",
        "@typescript-eslint",
        "prettier"
    ],
    "rules": {
        "react/require-default-props": [0],
        "import/prefer-default-export": "off",
        "no-debugger": [1],
        "no-console": [1],
        "no-return-await": "off",
        "no-plusplus": "off",
        "no-prototype-builtins": "off",
        "no-underscore-dangle": "off",
        "no-use-before-define": "off",
        "arrow-body-style": "off",
        "@typescript-eslint/no-use-before-define": "off",
        "camelcase": "off",
        "react/button-has-type": [0],
        "react/no-unescaped-entities": [0],
        "no-param-reassign": [
            "error",
            {
                "props": false
            }
        ],
        "@typescript-eslint/indent": "off",
        "@typescript-eslint/camelcase": "off",
        "prefer-object-spread": "off",
        "react/no-danger": [
            "error",
            { "customComponentNames": ["*"] }
        ],
        "react/jsx-props-no-spreading": "off",
        "react/prop-types": "off",
        "react/jsx-fragments": "off",
        "react-hooks/rules-of-hooks": "error",
        "react-hooks/exhaustive-deps": "error",
        "lines-between-class-members": "off",
        "class-methods-use-this": "off",
        "filenames/match-exported": 2,
        "import/no-extraneous-dependencies": [
            "error",
            {
                "devDependencies": [
                    "**/*.stories.tsx",
                    "**/*.test.tsx",
                    "**/*.test.ts",
                    "./setupTests.ts"
                ]
            }
        ],
        "import/no-cycle": "off",
        "jsx-a11y/click-events-have-key-events": "warn",
        "jsx-a11y/interactive-supports-focus": "warn",
        "prettier/prettier": "error",
        "react/destructuring-assignment": "off",
        "jsx-a11y/label-has-associated-control": "off",
        "jsx-a11y/label-has-for": "warn",
        "jsx-a11y/mouse-events-have-key-events": "warn",
        "jsx-a11y/no-static-element-interactions": "warn",
        "jsx-a11y/alt-text": "warn",
        "styled-components-a11y/accessible-emoji": "warn",
        "styled-components-a11y/anchor-has-content": "warn",
        "styled-components-a11y/anchor-is-valid": "warn",
        "styled-components-a11y/aria-activedescendant-has-tabindex": "warn",
        "styled-components-a11y/aria-props": "warn",
        "styled-components-a11y/aria-proptypes": "warn",
        "styled-components-a11y/aria-role": "warn",
        "styled-components-a11y/aria-unsupported-elements": "warn",
        "styled-components-a11y/autocomplete-valid": "warn",
        "styled-components-a11y/click-events-have-key-events": "warn",
        "styled-components-a11y/control-has-associated-label": "warn",
        "styled-components-a11y/heading-has-content": "warn",
        "styled-components-a11y/img-redundant-alt": "warn",
        "styled-components-a11y/interactive-supports-focus": "warn",
        "styled-components-a11y/label-has-associated-control": ["warn"],
        "styled-components-a11y/label-has-for": "off",
        "styled-components-a11y/media-has-caption": "warn",
        "styled-components-a11y/mouse-events-have-key-events": "warn",
        "styled-components-a11y/no-access-key": "warn",
        "styled-components-a11y/no-autofocus": "warn",
        "styled-components-a11y/no-distracting-elements": "warn",
        "styled-components-a11y/no-interactive-element-to-noninteractive-role": "warn",
        "styled-components-a11y/no-noninteractive-element-interactions": "warn",
        "styled-components-a11y/no-noninteractive-element-to-interactive-role": "warn",
        "styled-components-a11y/no-noninteractive-tabindex": "warn",
        "styled-components-a11y/no-onchange": "warn",
        "styled-components-a11y/no-redundant-roles": "warn",
        "styled-components-a11y/no-static-element-interactions": "warn",
        "styled-components-a11y/role-has-required-aria-props": "warn",
        "styled-components-a11y/role-supports-aria-props": "warn",
        "styled-components-a11y/alt-text": "warn",
        "styled-components-a11y/scope": "warn",
        "styled-components-a11y/tabindex-no-positive": "warn",
        "styled-components-a11y/html-has-lang": "off",
        "styled-components-a11y/iframe-has-title": "off",
        "@typescript-eslint/lines-between-class-members": "off",
        "@typescript-eslint/naming-convention": "off",
        "@typescript-eslint/keyword-spacing": "off",
        "@typescript-eslint/return-await": "warn",
        "curly": ["error", "all"],
        "react/jsx-key": ["error", { "checkFragmentShorthand": true }],
        "react/jsx-indent": "off",
        "react/jsx-indent-props": "off",
        "react/jsx-no-bind": "off"
    },
    "settings": {
        "import/parsers": {
            "@typescript-eslint/parser": [".ts", ".tsx"]
        }
    }
}

@sylvainDNS
Copy link
Author

sylvainDNS commented Oct 22, 2024

Thank you @halouvi to find how to trigger the issue.

Here is a sandbox that reproduce it. Uncomment <Component.NestedComponent /> and you will see eslint crash.

https://codesandbox.io/p/devbox/react-no-danger-reading-split-error-9c2fy7?file=%2Fsrc%2FApp.tsx%3A5%2C1

@ljharb
Copy link
Member

ljharb commented Oct 23, 2024

Thanks, that helped!

@ljharb ljharb closed this as completed in 1c3621a Oct 23, 2024
@halouvi
Copy link

halouvi commented Nov 3, 2024

@ljharb Thanks for the fix 🙏 Do you know when the next version containing this fix is scheduled to be released?

@ljharb
Copy link
Member

ljharb commented Nov 3, 2024

There's no release schedule, but probably within the next week or two.

@halouvi
Copy link

halouvi commented Nov 19, 2024

@ljharb I don't mean to bother but do you think there's any chance of releasing a version this week?

@chribjel
Copy link

chribjel commented Dec 3, 2024

I also encountered this problem now. If the release cannot be published yet, would you consider making a "canary"/"next" release, that is just the newest from the master branch? @ljharb

@ljharb
Copy link
Member

ljharb commented Dec 3, 2024

@chribjel no, that would be identical to just publishing the default branch.

@halouvi
Copy link

halouvi commented Dec 23, 2024

@ljharb respectfully, is there a schedule for a version release? it's been two months now.

@ljharb
Copy link
Member

ljharb commented Dec 23, 2024

There's no release schedule

@ljharb
Copy link
Member

ljharb commented Dec 24, 2024

https://github.com/jsx-eslint/eslint-plugin-react/releases/tag/v7.37.3 has been released.

@halouvi
Copy link

halouvi commented Dec 24, 2024

@ljharb Appreciate it! 🙏

cswimr pushed a commit to cswimr/gauntlet-cswimr-plugins that referenced this issue Dec 27, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | devDependencies | patch | [`7.37.2` -> `7.37.3`](https://renovatebot.com/diffs/npm/eslint-plugin-react/7.37.2/7.37.3) |

---

### Release Notes

<details>
<summary>jsx-eslint/eslint-plugin-react (eslint-plugin-react)</summary>

### [`v7.37.3`](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7373---20241223)

[Compare Source](jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3)

##### Fixed

-   \[`no-danger`]: avoid a crash on a nested component name ([#&#8203;3833][] [@&#8203;ljharb](https://github.com/ljharb))
-   \[Fix] types: correct generated type declaration ([#&#8203;3840][] [@&#8203;ocavue](https://github.com/ocavue))
-   \[`no-unknown-property`]: support `precedence` prop in react 19 ([#&#8203;3829][] [@&#8203;acusti](https://github.com/acusti))
-   \[`prop-types`]: props missing in validation when using generic types from a namespace import ([#&#8203;3859][] [@&#8203;rbondoc96](https://github.com/rbondoc96))

##### Changed

-   \[Tests] \[`jsx-no-script-url`]: Improve tests ([#&#8203;3849][] [@&#8203;radu2147](https://github.com/radu2147))
-   \[Docs] fix broken links: \[`default-props-match-prop-types`], \[`jsx-boolean-value`], \[`jsx-curly-brace-presence`], \[`jsx-no-bind`], \[`no-array-index-key`], \[`no-is-mounted`], \[`no-render-return-value`], \[`require-default-props`] ([#&#8203;3841][] [@&#8203;bastiendmt](https://github.com/bastiendmt))

[7.37.3]: jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3

[#&#8203;3859]: jsx-eslint/eslint-plugin-react#3859

[#&#8203;3849]: jsx-eslint/eslint-plugin-react#3849

[#&#8203;3841]: jsx-eslint/eslint-plugin-react#3841

[#&#8203;3840]: jsx-eslint/eslint-plugin-react#3840

[#&#8203;3833]: jsx-eslint/eslint-plugin-react#3833

[#&#8203;3829]: jsx-eslint/eslint-plugin-react#3829

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44My40IiwidXBkYXRlZEluVmVyIjoiMzkuODMuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://www.coastalcommits.com/cswimr/gauntlet-cswimr-plugins/pulls/9
Co-authored-by: Renovate <renovate@coastalcommits.com>
Co-committed-by: Renovate <renovate@coastalcommits.com>
@christian-kreuzberger-dtx

Just ran into this problem, and noticed that I have @microsoft/eslint-plugin-sdl installed, which had an older version of eslint-plugin-react, which caused this issue:

$> npm ls eslint-plugin-react
  ├─┬ @microsoft/eslint-plugin-sdl@1.0.1
  │ └── eslint-plugin-react@7.35.2
  └── eslint-plugin-react@7.37.4

https://github.com/microsoft/eslint-plugin-sdl/blob/17251ab42242d81c5e7a3ddad3fa51d50cded757/package.json#L26

To fix this, I added an override to package.json:

  "overrides": {
    "eslint-plugin-react": "7.37.4"
  },

@ljharb
Copy link
Member

ljharb commented Jan 21, 2025

Please also file an issue on that eslint plugin to unpin their deps.

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this issue Feb 26, 2025
| datasource | package             | from    | to     |
| ---------- | ------------------- | ------- | ------ |
| npm        | eslint-plugin-react | 7.31.10 | 7.37.4 |


## [v7.37.4](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7374---20250112)

##### Fixed

-   \[`no-unknown-property`]: support `onBeforeToggle`, `popoverTarget`, `popoverTargetAction` attributes ([#3865][] [@acusti](https://github.com/acusti))
-   \[types] fix types of flat configs ([#3874][] [@ljharb](https://github.com/ljharb))

[7.37.4]: jsx-eslint/eslint-plugin-react@v7.37.3...v7.37.4

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

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


## [v7.37.3](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7373---20241223)

##### Fixed

-   \[`no-danger`]: avoid a crash on a nested component name ([#3833][] [@ljharb](https://github.com/ljharb))
-   \[Fix] types: correct generated type declaration ([#3840][] [@ocavue](https://github.com/ocavue))
-   \[`no-unknown-property`]: support `precedence` prop in react 19 ([#3829][] [@acusti](https://github.com/acusti))
-   \[`prop-types`]: props missing in validation when using generic types from a namespace import ([#3859][] [@rbondoc96](https://github.com/rbondoc96))

##### Changed

-   \[Tests] \[`jsx-no-script-url`]: Improve tests ([#3849][] [@radu2147](https://github.com/radu2147))
-   \[Docs] fix broken links: \[`default-props-match-prop-types`], \[`jsx-boolean-value`], \[`jsx-curly-brace-presence`], \[`jsx-no-bind`], \[`no-array-index-key`], \[`no-is-mounted`], \[`no-render-return-value`], \[`require-default-props`] ([#3841][] [@bastiendmt](https://github.com/bastiendmt))

[7.37.3]: jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3

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

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

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

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

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

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


## [v7.37.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7372---20241022)

##### Fixed

-   \[`destructuring-assignment`]: fix false negative when using `typeof props.a` ([#3835][] [@golopot](https://github.com/golopot))

##### Changed

-   \[Refactor] \[`destructuring-assignment`]: use `getParentStatelessComponent` ([#3835][] [@golopot](https://github.com/golopot))

[7.37.2]: jsx-eslint/eslint-plugin-react@v7.37.1...v7.37.2

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


## [v7.37.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7371---20241001)

##### Fixed

-   \[meta] do not npmignore `d.ts` files ([#3836][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[readme] Fix shared settings link ([#3834][] [@MgenGlder](https://github.com/MgenGlder))

[7.37.1]: jsx-eslint/eslint-plugin-react@v7.37.0...v7.37.1

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

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


## [v7.37.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7370---20240926)

##### Added

-   add type generation ([#3830][] [@voxpelli](https://github.com/voxpelli))
-   \[`no-unescaped-entities`]: add suggestions ([#3831][] [@StyleShit](https://github.com/StyleShit))
-   \[`forbid-component-props`]: add `allowedForPatterns`/`disallowedForPatterns` options ([#3805][] [@Efimenko](https://github.com/Efimenko))
-   \[`no-unstable-nested-components`]: add `propNamePattern` to support custom render prop naming conventions ([#3826][] [@danreeves](https://github.com/danreeves))

##### Changed

-   \[readme] flat config example for react 17+ ([#3824][] [@GabenGar](https://github.com/GabenGar))

[7.37.0]: jsx-eslint/eslint-plugin-react@v7.36.1...v7.37.0

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

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

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

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

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


## [v7.36.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7361---20240912)

##### Fixed

-   \[`no-is-mounted`]: fix logic in method name check ([#3821][] [@Mathias-S](https://github.com/Mathias-S))
-   \[`jsx-no-literals`]: Avoid crashing on valueless boolean props ([#3823][] [@reosarevok](https://github.com/reosarevok))

[7.36.1]: jsx-eslint/eslint-plugin-react@v7.36.0...v7.36.1

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

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


## [v7.36.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7360---20240912)

##### Added

-   \[`no-string-refs`]: allow this.refs in > 18.3.0 ([#3807][] [@henryqdineen](https://github.com/henryqdineen))
-   \[`jsx-no-literals`] Add `elementOverrides` option and the ability to ignore this rule on specific elements ([#3812][] [@Pearce-Ropion](https://github.com/Pearce-Ropion))
-   \[`forward-ref-uses-ref`]: add rule for checking ref parameter is added (\[[#3667](https://github.com/jsx-eslint/eslint-plugin-react/issues/3667)]\[] [@NotWoods](https://github.com/NotWoods))

##### Fixed

-   \[`function-component-definition`], \[`boolean-prop-naming`], \[`jsx-first-prop-new-line`], \[`jsx-props-no-multi-spaces`], `propTypes`: use type args ([#3629][] [@HenryBrown0](https://github.com/HenryBrown0))
-   JSX pragma: fail gracefully ([#3632][] [@ljharb](https://github.com/ljharb))
-   \[`jsx-props-no-spreading`]: add `explicitSpread` option to schema ([#3799][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Tests] add [@typescript-eslint/parser](https://github.com/typescript-eslint/parser) v6 ([#3629][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Tests] add [@typescript-eslint/parser](https://github.com/typescript-eslint/parser) v7 and v8 ([#3629][] [@hampustagerud](https://github.com/hampustagerud))
-   \[Docs] \[`no-danger`]: update broken link ([#3817][] [@lucasrmendonca](https://github.com/lucasrmendonca))
-   \[types] add jsdoc type annotations ([#3731][] [@y-hsgw](https://github.com/y-hsgw))
-   \[Tests] `button-has-type`: add test case with spread ([#3731][] [@y-hsgw](https://github.com/y-hsgw))

[7.36.0]: jsx-eslint/eslint-plugin-react@v7.35.2...v7.36.0

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

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

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

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

[#3694]: jsx-eslint/eslint-plugin-react#3667

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

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

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


## [v7.35.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7352---20240903)

##### Fixed

-   \[`jsx-curly-brace-presence`]: avoid autofixing attributes with double quotes to a double quoted attribute ([#3814][] [@ljharb](https://github.com/ljharb))

[7.35.2]: jsx-eslint/eslint-plugin-react@v7.35.1...v7.35.2

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


## [v7.35.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7351---20240902)

##### Fixed

-   \[`jsx-curly-brace-presence`]: do not trigger on strings containing a quote character ([#3798][] [@akulsr0](https://github.com/akulsr0))

[7.35.1]: jsx-eslint/eslint-plugin-react@v7.35.0...v7.35.1

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


## [v7.35.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7350---20240719)

##### Added

-   support eslint v9 ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic))
-   export flat configs from plugin root and fix flat config crash ([#3694][] [@bradzacher](https://github.com/bradzacher) [@mdjermanovic](https://github.com/mdjermanovic))
-   add \[`jsx-props-no-spread-multi`] ([#3724][] [@SimonSchick](https://github.com/SimonSchick))
-   \[`forbid-component-props`]: add `propNamePattern` to allow / disallow prop name patterns ([#3774][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-handler-names`]: support ignoring component names ([#3772][] [@akulsr0](https://github.com/akulsr0))
-   version settings: Allow react defaultVersion to be configurable ([#3771][] [@onlywei](https://github.com/onlywei))
-   \[`jsx-closing-tag-location`]: add `line-aligned` option ([#3777] [@kimtaejin3](https://github.com/kimtaejin3))
-   \[`no-danger`]: add `customComponentNames` option ([#3748][] [@akulsr0](https://github.com/akulsr0))

##### Fixed

-   \[`no-invalid-html-attribute`]: substitute placeholders in suggestion messages ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic))
-   \[`sort-prop-types`]: single line type ending without semicolon ([#3784][] [@akulsr0](https://github.com/akulsr0))
-   \[`require-default-props`]: report when required props have default value ([#3785][] [@akulsr0](https://github.com/akulsr0))

##### Changed

-   \[Refactor] `variableUtil`: Avoid creating a single flat variable scope for each lookup ([#3782][] [@DanielRosenwasser](https://github.com/DanielRosenwasser))

[7.35.0]: jsx-eslint/eslint-plugin-react@v7.34.4...v7.35.0

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

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

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

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

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

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

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

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

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

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

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


## [v7.34.4](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7344---20240713)

##### Fixed

-   \[`prop-types`]: fix `className` missing in prop validation false negative ([#3749][] [@akulsr0](https://github.com/akulsr0))
-   \[`sort-prop-types`]: Check for undefined before accessing `node.typeAnnotation.typeAnnotation` ([#3779][] [@tylerlaprade](https://github.com/tylerlaprade))

[7.34.4]: jsx-eslint/eslint-plugin-react@v7.34.3...v7.34.4

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

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


## [v7.34.3](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7343---20240618)

##### Fixed

-   \[`prop-types`]: null-check rootNode before calling getScope ([#3762][] [@crnhrv](https://github.com/crnhrv))
-   \[`boolean-prop-naming`]: avoid a crash with a spread prop ([#3733][] [@ljharb](https://github.com/ljharb))
-   \[`jsx-boolean-value`]: `assumeUndefinedIsFalse` with `never` must not allow explicit `true` value ([#3757][] [@6uliver](https://github.com/6uliver))
-   \[`no-object-type-as-default-prop`]: enable rule for components with many parameters ([#3768][] [@JulienR1](https://github.com/JulienR1))
-   \[`jsx-key`]: incorrect behavior for checkKeyMustBeforeSpread with map callbacks ([#3769][] [@akulsr0](https://github.com/akulsr0))

[7.34.3]: jsx-eslint/eslint-plugin-react@v7.34.2...v7.34.3

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

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

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

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

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


## [v7.34.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7342---20240524)

##### Fixed

-   \[`boolean-prop-naming`]: avoid a crash with a non-TSTypeReference type ([#3718][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`jsx-no-leaked-render`]: invalid report if left eside is boolean ([#3746][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-closing-bracket-location`]: message shows `{{details}}` when there are no details ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic))
-   \[`no-invalid-html-attribute`]: ensure error messages are correct ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic), [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Refactor] create various eslint utils to fix eslint deprecations ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic), [@ljharb](https://github.com/ljharb))

[7.34.2]: jsx-eslint/eslint-plugin-react@v7.34.1...v7.34.2

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

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

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


## [v7.34.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7341---20240315)

##### Fixed

-   \[`jsx-no-leaked-render`]: prevent wrongly adding parens ([#3700][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`boolean-prop-naming`]: detect TS interfaces ([#3701][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`boolean-prop-naming`]: literalType error fix ([#3704][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`boolean-prop-naming`]: allow TSIntersectionType ([#3705][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`no-unknown-property`]: support `popover`, `popovertarget`, `popovertargetaction` attributes ([#3707][] [@ljharb](https://github.com/ljharb))
-   \[`no-unknown-property`]: only match `data-*` attributes containing `-` ([#3713][] [@silverwind](https://github.com/silverwind))
-   \[`checked-requires-onchange-or-readonly`]: correct options that were behaving opposite ([#3715][] [@jaesoekjjang](https://github.com/jaesoekjjang))

##### Changed

-   \[`boolean-prop-naming`]: improve error message ([@ljharb](https://github.com/ljharb))

[7.34.1]: jsx-eslint/eslint-plugin-react@v7.34.0...v7.34.1

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

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

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

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

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

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

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


## [v7.34.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7340---20240303)

##### Added

-   \[`sort-prop-types`]: give errors on TS types ([#3615][] [@akulsr0](https://github.com/akulsr0))
-   \[`no-invalid-html-attribute`]: add support for `apple-touch-startup-image` `rel` attributes in `link` tags ([#3638][] [@thomashockaday](https://github.com/thomashockaday))
-   \[`no-unknown-property`]: add requireDataLowercase option ([#3645][] [@HermanBilous](https://github.com/HermanBilous))
-   \[`no-unknown-property`]: add `displaystyle` on `<math>` ([#3652][] [@lounsbrough](https://github.com/lounsbrough))
-   \[`prefer-read-only-props`], \[`prop-types`], component detection: allow components to be async functions ([#3654][] [@pnodet](https://github.com/pnodet))
-   \[`no-unknown-property`]: support `onResize` on audio/video tags ([#3662][] [@caesar1030](https://github.com/caesar1030))
-   \[`jsx-wrap-multilines`]: add `never` option to prohibit wrapping parens on multiline JSX ([#3668][] [@reedws](https://github.com/reedws))
-   \[`jsx-filename-extension`]: add `ignoreFilesWithoutCode` option to allow empty files ([#3674][] [@burtek](https://github.com/burtek))
-   \[`jsx-boolean-value`]: add `assumeUndefinedIsFalse` option ([#3675][] [@developer-bandi](https://github.com/developer-bandi))
-   `linkAttribute` setting, \[`jsx-no-target-blank`]: support multiple properties ([#3673][] [@burtek](https://github.com/burtek))
-   \[`jsx-no-script-url`]: add `includeFromSettings` option to support `linkAttributes` setting ([#3673][] [@burtek](https://github.com/burtek))
-   \[`jsx-one-expression-per-line`]: add `non-jsx` option to allow non-JSX children in one line ([#3677][] [@burtek](https://github.com/burtek))
-   add \[`checked-requires-onchange-or-readonly`] rule ([#3680][] [@jaesoekjjang](https://github.com/jaesoekjjang))

##### Fixed

-   \[`jsx-no-leaked-render`]: preserve RHS parens for multiline jsx elements while fixing ([#3623][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-key`]: detect conditional returns ([#3630][] [@yialo](https://github.com/yialo))
-   \[`jsx-newline`]: prevent a crash when `allowMultilines` ([#3633][] [@ljharb](https://github.com/ljharb))
-   \[`no-unknown-property`]: use a better regex to avoid a crash ([#3666][] [@ljharb](https://github.com/ljharb) [@SCH227](https://github.com/SCH227))
-   \[`prop-types`]: handle nested forwardRef + memo ([#3679][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`no-unknown-property`]: add `fetchPriority` ([#3697][] [@SevereCloud](https://github.com/SevereCloud))
-   \[`forbid-elements`]: prevent a crash on `createElement()` ([#3632][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[`jsx-boolean-value`]: make error messages clearer ([#3691][] [@developer-bandi](https://github.com/developer-bandi))
-   \[Refactor] `propTypes`: extract type params to var ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Refactor] \[`boolean-prop-naming`]: invert if statement ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Refactor] \[`function-component-definition`]: exit early if no type params ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Refactor] \[`jsx-props-no-multi-spaces`]: extract type parameters to var ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Docs] \[`jsx-key`]: fix correct example ([#3656][] [@developer-bandi](https://github.com/developer-bandi))
-   \[Tests] `jsx-wrap-multilines`: passing tests ([#3545][] [@burtek](https://github.com/burtek))
-   \[Docs] \[`iframe-missing-sandbox`]: fix link to iframe attribute on mdn ([#3690][] [@nnmrts](https://github.com/nnmrts))
-   \[Docs] \[`hook-use-state`]: fix an undefined variable ([#3626][] [@chentsulin](https://github.com/chentsulin))

[7.34.0]: jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


## [v7.33.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7332---20230815)

##### Fixed

-   \[`no-deprecated`]: prevent false positive on commonjs import ([#3614][] [@akulsr0](https://github.com/akulsr0))
-   \[`no-unsafe`]: report on the method instead of the entire component ([@ljharb](https://github.com/ljharb))
-   \[`no-deprecated`]: report on the destructured property instead of the entire variable declarator ([@ljharb](https://github.com/ljharb))
-   \[`no-deprecated`]: report on the imported specifier instead of the entire import statement ([@ljharb](https://github.com/ljharb))
-   \[`no-invalid-html-attribute`]: report more granularly ([@ljharb](https://github.com/ljharb))

[7.33.2]: jsx-eslint/eslint-plugin-react@v7.33.1...v7.33.2

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


## [v7.33.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7331---20230729)

##### Fixed

-   \[`require-default-props`]: fix config schema ([#3605][] [@controversial](https://github.com/controversial))
-   \[`jsx-curly-brace-presence`]: Revert \[[#3538](https://github.com/jsx-eslint/eslint-plugin-react/issues/3538)]\[] due to issues with intended string type casting usage ([#3611][] [@taozhou-glean](https://github.com/taozhou-glean))
-   \[`sort-prop-types`]: ensure sort-prop-types respects noSortAlphabetically ([#3610][] [@caesar1030](https://github.com/caesar1030))

[7.33.1]: jsx-eslint/eslint-plugin-react@v7.33.0...v7.33.1

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

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

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


## [v7.33.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7330---20230719)

##### Added

-   \[`display-name`]: add `checkContextObjects` option ([#3529][] [@JulesBlm](https://github.com/JulesBlm))
-   \[`jsx-first-prop-new-line`]: add `multiprop` option ([#3533][] [@haydncomley](https://github.com/haydncomley))
-   \[`no-deprecated`]: add React 18 deprecations ([#3548][] [@sergei-startsev](https://github.com/sergei-startsev))
-   \[`forbid-component-props`]: add `disallowedFor` option ([#3417][] [@jacketwpbb](https://github.com/jacketwpbb))

##### Fixed

-   \[`no-array-index-key`]: consider flatMap ([#3530][] [@k-yle](https://github.com/k-yle))
-   \[`jsx-curly-brace-presence`]: handle single and only expression template literals ([#3538][] [@taozhou-glean](https://github.com/taozhou-glean))
-   \[`no-unknown-property`]: allow `onLoad` on `source` ([@ljharb](https://github.com/ljharb))
-   \[`jsx-first-prop-new-line`]: ensure autofix preserves generics in component name ([#3546][] [@ljharb](https://github.com/ljharb))
-   \[`no-unknown-property`]: allow `fill` prop on `<symbol>` ([#3555][] [@stefanprobst](https://github.com/stefanprobst))
-   \[`display-name`], \[`prop-types`]: when checking for a capitalized name, ignore underscores entirely ([#3560][] [@ljharb](https://github.com/ljharb))
-   \[`no-unused-state`]: avoid crashing on a class field function with destructured state ([#3568][] [@ljharb](https://github.com/ljharb))
-   \[`no-unused-prop-types`]: allow using spread with object expression in jsx ([#3570][] [@akulsr0](https://github.com/akulsr0))
-   Revert "\[`destructuring-assignment`]: Handle destructuring of useContext in SFC" ([#3583][] \[[#2797](https://github.com/jsx-eslint/eslint-plugin-react/issues/2797)]\[] [@102](https://github.com/102))
-   \[`prefer-read-only-props`]: add TS support ([#3593][] [@HenryBrown0](https://github.com/HenryBrown0))

##### Changed

-   \[Docs] \[`jsx-newline`], \[`no-unsafe`], \[`static-property-placement`]: Fix code syntax highlighting ([#3563][] [@nbsp1221](https://github.com/nbsp1221))
-   \[readme] resore configuration URL ([#3582][] [@gokaygurcan](https://github.com/gokaygurcan))
-   \[Docs] \[`jsx-no-bind`]: reword performance rationale ([#3581][] [@gpoole](https://github.com/gpoole))

<!---->

-   \[Docs] \[`jsx-first-prop-new-line`]: add missing `multiprop` value ([#3598][] [@dzek69](https://github.com/dzek69))

[7.33.0]: jsx-eslint/eslint-plugin-react@v7.32.2...v7.33.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


## [v7.32.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7322---20230128)

##### Fixed

-   configs: restore `parserOptions` in legacy configs (\[[#3523](https://github.com/jsx-eslint/eslint-plugin-react/issues/3523)]\[] [@ljharb](https://github.com/ljharb))
-   \[`jsx-no-constructed-context-values`], \[`jsx-no-useless-fragment`]: add a rule schema ([@ljharb](https://github.com/ljharb))
    ( \[`no-unknown-property`]: add `fill` for `<marker>` ([#3525][] [@alexey-koran](https://github.com/alexey-koran))

[7.32.2]: jsx-eslint/eslint-plugin-react@v7.32.1...v7.32.2

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

[#3520]: jsx-eslint/eslint-plugin-react#3523


## [v7.32.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7321---20230116)

##### Fixed

-   prevent circular dependency in index and "all" config ([#3519][] [@ljharb](https://github.com/ljharb))
-   \[`destructuring-assignment`]: do not force destructuring of optionally chained properties ([#3520][] [@ljharb](https://github.com/ljharb))

[7.32.1]: jsx-eslint/eslint-plugin-react@v7.32.0...v7.32.1

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

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


## [v7.32.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7320---20230110)

##### Added

-   support new config system ([#3429][] [@jjangga0214](https://github.com/jjangga0214))
-   \[`hook-use-state`]: add `allowDestructuredState` option ([#3449][] [@ljharb](https://github.com/ljharb))
-   add \[`sort-default-props`] and deprecate \[`jsx-sort-default-props`] ([#1861][] [@alexzherdev](https://github.com/alexzherdev))
-   add \[`no-object-type-as-default-prop`] rule ([#2848][] [@cyan33](https://github.com/cyan33) [@fengkx](https://github.com/fengkx))

##### Fixed

-   configs: avoid legacy config system error ([#3461][] [@ljharb](https://github.com/ljharb))
-   \[`sort-prop-types`]: restore autofixing ([#3452][], [#3471][] [@ROSSROSALES](https://github.com/ROSSROSALES))
-   \[`no-unknown-property`]: do not check `fbs` elements ([#3494][] [@brianogilvie](https://github.com/brianogilvie))
-   \[`jsx-newline`]: No newline between comments and jsx elements ([#3493][] [@justmejulian](https://github.com/justmejulian))
-   \[`jsx-no-leaked-render`]: Don't report errors on empty strings if React >= v18 ([#3488][] [@himanshu007-creator](https://github.com/himanshu007-creator))
-   \[`no-invalid-html-attribute`]: convert autofix to suggestion ([#3474][] [@himanshu007-creator](https://github.com/himanshu007-creator) [@ljharb](https://github.com/ljharb))
-   \[`jsx-no-leaked-render`]: fix removing parentheses for conditionals ([#3502][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-no-leaked-render`]: invalid fixes in coerce mode ([#3511][] [@akulsr0](https://github.com/akulsr0))
-   \[`destructuring-assignment`]: Handle destructuring of useContext in SFC ([#2797][] [@Zinyon](https://github.com/Zinyon) [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`jsx-no-leaked-render`]: Remove mentions of empty strings for React 18 ([#3468][] [@karlhorky](https://github.com/karlhorky))
-   \[Docs] update `eslint-doc-generator` to v1.0.0 ([#3499][] [@bmish](https://github.com/bmish))
-   \[meta] add issue template ([#3483][] [@ROSSROSALES](https://github.com/ROSSROSALES))
-   \[Docs] Use emoji for jsx-runtime config and config file for eslint-doc-generator ([#3504][] [@bmish](https://github.com/bmish))
-   \[Docs] \[`prefer-exact-props`]: fix example flow syntax ([#3510][] [@smackfu](https://github.com/smackfu))
-   \[Perf] use `anyOf` instead of `oneOf` ([@ljharb](https://github.com/ljharb) [@remcohaszing](https://github.com/remcohaszing))

[7.32.0]: jsx-eslint/eslint-plugin-react@v7.31.11...v7.32.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


## [v7.31.11](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#73111---20221117)

##### Fixed

-   \[`jsx-no-target-blank`]: allow ternaries with literals ([#3464][] [@akulsr0](https://github.com/akulsr0))
-   \[`no-unknown-property`]: add `inert` attribute ([#3484][] [@ljharb](https://github.com/ljharb))
-   \[`jsx-key`]: detect keys in logical expression and conditional expression ([#3490][] [@metreniuk](https://github.com/metreniuk))

##### Changed

-   \[Perf] component detection: improve performance by avoiding traversing parents unnecessarily ([#3459][] [@golopot](https://github.com/golopot))
-   \[Docs] `forbid-component-props`: inclusive language w/ allowlist ([#3473][] [@AndersDJohnson](https://github.com/AndersDJohnson))
-   \[Docs] automate doc generation with `eslint-doc-generator` ([#3469][] [@bmish](https://github.com/bmish))

[7.31.11]: jsx-eslint/eslint-plugin-react@v7.31.10...v7.31.11

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

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

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

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

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

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


## [v7.37.4](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7374---20250112)

##### Fixed

-   \[`no-unknown-property`]: support `onBeforeToggle`, `popoverTarget`, `popoverTargetAction` attributes ([#3865][] [@acusti](https://github.com/acusti))
-   \[types] fix types of flat configs ([#3874][] [@ljharb](https://github.com/ljharb))

[7.37.4]: jsx-eslint/eslint-plugin-react@v7.37.3...v7.37.4

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

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


## [v7.37.3](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7373---20241223)

##### Fixed

-   \[`no-danger`]: avoid a crash on a nested component name ([#3833][] [@ljharb](https://github.com/ljharb))
-   \[Fix] types: correct generated type declaration ([#3840][] [@ocavue](https://github.com/ocavue))
-   \[`no-unknown-property`]: support `precedence` prop in react 19 ([#3829][] [@acusti](https://github.com/acusti))
-   \[`prop-types`]: props missing in validation when using generic types from a namespace import ([#3859][] [@rbondoc96](https://github.com/rbondoc96))

##### Changed

-   \[Tests] \[`jsx-no-script-url`]: Improve tests ([#3849][] [@radu2147](https://github.com/radu2147))
-   \[Docs] fix broken links: \[`default-props-match-prop-types`], \[`jsx-boolean-value`], \[`jsx-curly-brace-presence`], \[`jsx-no-bind`], \[`no-array-index-key`], \[`no-is-mounted`], \[`no-render-return-value`], \[`require-default-props`] ([#3841][] [@bastiendmt](https://github.com/bastiendmt))

[7.37.3]: jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3

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

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

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

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

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

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


## [v7.37.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7372---20241022)

##### Fixed

-   \[`destructuring-assignment`]: fix false negative when using `typeof props.a` ([#3835][] [@golopot](https://github.com/golopot))

##### Changed

-   \[Refactor] \[`destructuring-assignment`]: use `getParentStatelessComponent` ([#3835][] [@golopot](https://github.com/golopot))

[7.37.2]: jsx-eslint/eslint-plugin-react@v7.37.1...v7.37.2

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


## [v7.37.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7371---20241001)

##### Fixed

-   \[meta] do not npmignore `d.ts` files ([#3836][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[readme] Fix shared settings link ([#3834][] [@MgenGlder](https://github.com/MgenGlder))

[7.37.1]: jsx-eslint/eslint-plugin-react@v7.37.0...v7.37.1

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

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


## [v7.37.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7370---20240926)

##### Added

-   add type generation ([#3830][] [@voxpelli](https://github.com/voxpelli))
-   \[`no-unescaped-entities`]: add suggestions ([#3831][] [@StyleShit](https://github.com/StyleShit))
-   \[`forbid-component-props`]: add `allowedForPatterns`/`disallowedForPatterns` options ([#3805][] [@Efimenko](https://github.com/Efimenko))
-   \[`no-unstable-nested-components`]: add `propNamePattern` to support custom render prop naming conventions ([#3826][] [@danreeves](https://github.com/danreeves))

##### Changed

-   \[readme] flat config example for react 17+ ([#3824][] [@GabenGar](https://github.com/GabenGar))

[7.37.0]: jsx-eslint/eslint-plugin-react@v7.36.1...v7.37.0

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

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

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

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

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


## [v7.36.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7361---20240912)

##### Fixed

-   \[`no-is-mounted`]: fix logic in method name check ([#3821][] [@Mathias-S](https://github.com/Mathias-S))
-   \[`jsx-no-literals`]: Avoid crashing on valueless boolean props ([#3823][] [@reosarevok](https://github.com/reosarevok))

[7.36.1]: jsx-eslint/eslint-plugin-react@v7.36.0...v7.36.1

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

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


## [v7.36.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7360---20240912)

##### Added

-   \[`no-string-refs`]: allow this.refs in > 18.3.0 ([#3807][] [@henryqdineen](https://github.com/henryqdineen))
-   \[`jsx-no-literals`] Add `elementOverrides` option and the ability to ignore this rule on specific elements ([#3812][] [@Pearce-Ropion](https://github.com/Pearce-Ropion))
-   \[`forward-ref-uses-ref`]: add rule for checking ref parameter is added (\[[#3667](https://github.com/jsx-eslint/eslint-plugin-react/issues/3667)]\[] [@NotWoods](https://github.com/NotWoods))

##### Fixed

-   \[`function-component-definition`], \[`boolean-prop-naming`], \[`jsx-first-prop-new-line`], \[`jsx-props-no-multi-spaces`], `propTypes`: use type args ([#3629][] [@HenryBrown0](https://github.com/HenryBrown0))
-   JSX pragma: fail gracefully ([#3632][] [@ljharb](https://github.com/ljharb))
-   \[`jsx-props-no-spreading`]: add `explicitSpread` option to schema ([#3799][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Tests] add [@typescript-eslint/parser](https://github.com/typescript-eslint/parser) v6 ([#3629][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Tests] add [@typescript-eslint/parser](https://github.com/typescript-eslint/parser) v7 and v8 ([#3629][] [@hampustagerud](https://github.com/hampustagerud))
-   \[Docs] \[`no-danger`]: update broken link ([#3817][] [@lucasrmendonca](https://github.com/lucasrmendonca))
-   \[types] add jsdoc type annotations ([#3731][] [@y-hsgw](https://github.com/y-hsgw))
-   \[Tests] `button-has-type`: add test case with spread ([#3731][] [@y-hsgw](https://github.com/y-hsgw))

[7.36.0]: jsx-eslint/eslint-plugin-react@v7.35.2...v7.36.0

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

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

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

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

[#3694]: jsx-eslint/eslint-plugin-react#3667

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

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

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


## [v7.35.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7352---20240903)

##### Fixed

-   \[`jsx-curly-brace-presence`]: avoid autofixing attributes with double quotes to a double quoted attribute ([#3814][] [@ljharb](https://github.com/ljharb))

[7.35.2]: jsx-eslint/eslint-plugin-react@v7.35.1...v7.35.2

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


## [v7.35.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7351---20240902)

##### Fixed

-   \[`jsx-curly-brace-presence`]: do not trigger on strings containing a quote character ([#3798][] [@akulsr0](https://github.com/akulsr0))

[7.35.1]: jsx-eslint/eslint-plugin-react@v7.35.0...v7.35.1

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


## [v7.35.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7350---20240719)

##### Added

-   support eslint v9 ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic))
-   export flat configs from plugin root and fix flat config crash ([#3694][] [@bradzacher](https://github.com/bradzacher) [@mdjermanovic](https://github.com/mdjermanovic))
-   add \[`jsx-props-no-spread-multi`] ([#3724][] [@SimonSchick](https://github.com/SimonSchick))
-   \[`forbid-component-props`]: add `propNamePattern` to allow / disallow prop name patterns ([#3774][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-handler-names`]: support ignoring component names ([#3772][] [@akulsr0](https://github.com/akulsr0))
-   version settings: Allow react defaultVersion to be configurable ([#3771][] [@onlywei](https://github.com/onlywei))
-   \[`jsx-closing-tag-location`]: add `line-aligned` option ([#3777] [@kimtaejin3](https://github.com/kimtaejin3))
-   \[`no-danger`]: add `customComponentNames` option ([#3748][] [@akulsr0](https://github.com/akulsr0))

##### Fixed

-   \[`no-invalid-html-attribute`]: substitute placeholders in suggestion messages ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic))
-   \[`sort-prop-types`]: single line type ending without semicolon ([#3784][] [@akulsr0](https://github.com/akulsr0))
-   \[`require-default-props`]: report when required props have default value ([#3785][] [@akulsr0](https://github.com/akulsr0))

##### Changed

-   \[Refactor] `variableUtil`: Avoid creating a single flat variable scope for each lookup ([#3782][] [@DanielRosenwasser](https://github.com/DanielRosenwasser))

[7.35.0]: jsx-eslint/eslint-plugin-react@v7.34.4...v7.35.0

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

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

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

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

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

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

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

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

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

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

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


## [v7.34.4](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7344---20240713)

##### Fixed

-   \[`prop-types`]: fix `className` missing in prop validation false negative ([#3749][] [@akulsr0](https://github.com/akulsr0))
-   \[`sort-prop-types`]: Check for undefined before accessing `node.typeAnnotation.typeAnnotation` ([#3779][] [@tylerlaprade](https://github.com/tylerlaprade))

[7.34.4]: jsx-eslint/eslint-plugin-react@v7.34.3...v7.34.4

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

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


## [v7.34.3](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7343---20240618)

##### Fixed

-   \[`prop-types`]: null-check rootNode before calling getScope ([#3762][] [@crnhrv](https://github.com/crnhrv))
-   \[`boolean-prop-naming`]: avoid a crash with a spread prop ([#3733][] [@ljharb](https://github.com/ljharb))
-   \[`jsx-boolean-value`]: `assumeUndefinedIsFalse` with `never` must not allow explicit `true` value ([#3757][] [@6uliver](https://github.com/6uliver))
-   \[`no-object-type-as-default-prop`]: enable rule for components with many parameters ([#3768][] [@JulienR1](https://github.com/JulienR1))
-   \[`jsx-key`]: incorrect behavior for checkKeyMustBeforeSpread with map callbacks ([#3769][] [@akulsr0](https://github.com/akulsr0))

[7.34.3]: jsx-eslint/eslint-plugin-react@v7.34.2...v7.34.3

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

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

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

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

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


## [v7.34.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7342---20240524)

##### Fixed

-   \[`boolean-prop-naming`]: avoid a crash with a non-TSTypeReference type ([#3718][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`jsx-no-leaked-render`]: invalid report if left eside is boolean ([#3746][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-closing-bracket-location`]: message shows `{{details}}` when there are no details ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic))
-   \[`no-invalid-html-attribute`]: ensure error messages are correct ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic), [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Refactor] create various eslint utils to fix eslint deprecations ([#3759][] [@mdjermanovic](https://github.com/mdjermanovic), [@ljharb](https://github.com/ljharb))

[7.34.2]: jsx-eslint/eslint-plugin-react@v7.34.1...v7.34.2

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

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

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


## [v7.34.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7341---20240315)

##### Fixed

-   \[`jsx-no-leaked-render`]: prevent wrongly adding parens ([#3700][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`boolean-prop-naming`]: detect TS interfaces ([#3701][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`boolean-prop-naming`]: literalType error fix ([#3704][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`boolean-prop-naming`]: allow TSIntersectionType ([#3705][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`no-unknown-property`]: support `popover`, `popovertarget`, `popovertargetaction` attributes ([#3707][] [@ljharb](https://github.com/ljharb))
-   \[`no-unknown-property`]: only match `data-*` attributes containing `-` ([#3713][] [@silverwind](https://github.com/silverwind))
-   \[`checked-requires-onchange-or-readonly`]: correct options that were behaving opposite ([#3715][] [@jaesoekjjang](https://github.com/jaesoekjjang))

##### Changed

-   \[`boolean-prop-naming`]: improve error message ([@ljharb](https://github.com/ljharb))

[7.34.1]: jsx-eslint/eslint-plugin-react@v7.34.0...v7.34.1

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

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

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

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

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

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

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


## [v7.34.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7340---20240303)

##### Added

-   \[`sort-prop-types`]: give errors on TS types ([#3615][] [@akulsr0](https://github.com/akulsr0))
-   \[`no-invalid-html-attribute`]: add support for `apple-touch-startup-image` `rel` attributes in `link` tags ([#3638][] [@thomashockaday](https://github.com/thomashockaday))
-   \[`no-unknown-property`]: add requireDataLowercase option ([#3645][] [@HermanBilous](https://github.com/HermanBilous))
-   \[`no-unknown-property`]: add `displaystyle` on `<math>` ([#3652][] [@lounsbrough](https://github.com/lounsbrough))
-   \[`prefer-read-only-props`], \[`prop-types`], component detection: allow components to be async functions ([#3654][] [@pnodet](https://github.com/pnodet))
-   \[`no-unknown-property`]: support `onResize` on audio/video tags ([#3662][] [@caesar1030](https://github.com/caesar1030))
-   \[`jsx-wrap-multilines`]: add `never` option to prohibit wrapping parens on multiline JSX ([#3668][] [@reedws](https://github.com/reedws))
-   \[`jsx-filename-extension`]: add `ignoreFilesWithoutCode` option to allow empty files ([#3674][] [@burtek](https://github.com/burtek))
-   \[`jsx-boolean-value`]: add `assumeUndefinedIsFalse` option ([#3675][] [@developer-bandi](https://github.com/developer-bandi))
-   `linkAttribute` setting, \[`jsx-no-target-blank`]: support multiple properties ([#3673][] [@burtek](https://github.com/burtek))
-   \[`jsx-no-script-url`]: add `includeFromSettings` option to support `linkAttributes` setting ([#3673][] [@burtek](https://github.com/burtek))
-   \[`jsx-one-expression-per-line`]: add `non-jsx` option to allow non-JSX children in one line ([#3677][] [@burtek](https://github.com/burtek))
-   add \[`checked-requires-onchange-or-readonly`] rule ([#3680][] [@jaesoekjjang](https://github.com/jaesoekjjang))

##### Fixed

-   \[`jsx-no-leaked-render`]: preserve RHS parens for multiline jsx elements while fixing ([#3623][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-key`]: detect conditional returns ([#3630][] [@yialo](https://github.com/yialo))
-   \[`jsx-newline`]: prevent a crash when `allowMultilines` ([#3633][] [@ljharb](https://github.com/ljharb))
-   \[`no-unknown-property`]: use a better regex to avoid a crash ([#3666][] [@ljharb](https://github.com/ljharb) [@SCH227](https://github.com/SCH227))
-   \[`prop-types`]: handle nested forwardRef + memo ([#3679][] [@developer-bandi](https://github.com/developer-bandi))
-   \[`no-unknown-property`]: add `fetchPriority` ([#3697][] [@SevereCloud](https://github.com/SevereCloud))
-   \[`forbid-elements`]: prevent a crash on `createElement()` ([#3632][] [@ljharb](https://github.com/ljharb))

##### Changed

-   \[`jsx-boolean-value`]: make error messages clearer ([#3691][] [@developer-bandi](https://github.com/developer-bandi))
-   \[Refactor] `propTypes`: extract type params to var ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Refactor] \[`boolean-prop-naming`]: invert if statement ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Refactor] \[`function-component-definition`]: exit early if no type params ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Refactor] \[`jsx-props-no-multi-spaces`]: extract type parameters to var ([#3634][] [@HenryBrown0](https://github.com/HenryBrown0))
-   \[Docs] \[`jsx-key`]: fix correct example ([#3656][] [@developer-bandi](https://github.com/developer-bandi))
-   \[Tests] `jsx-wrap-multilines`: passing tests ([#3545][] [@burtek](https://github.com/burtek))
-   \[Docs] \[`iframe-missing-sandbox`]: fix link to iframe attribute on mdn ([#3690][] [@nnmrts](https://github.com/nnmrts))
-   \[Docs] \[`hook-use-state`]: fix an undefined variable ([#3626][] [@chentsulin](https://github.com/chentsulin))

[7.34.0]: jsx-eslint/eslint-plugin-react@v7.33.2...v7.34.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


## [v7.33.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7332---20230815)

##### Fixed

-   \[`no-deprecated`]: prevent false positive on commonjs import ([#3614][] [@akulsr0](https://github.com/akulsr0))
-   \[`no-unsafe`]: report on the method instead of the entire component ([@ljharb](https://github.com/ljharb))
-   \[`no-deprecated`]: report on the destructured property instead of the entire variable declarator ([@ljharb](https://github.com/ljharb))
-   \[`no-deprecated`]: report on the imported specifier instead of the entire import statement ([@ljharb](https://github.com/ljharb))
-   \[`no-invalid-html-attribute`]: report more granularly ([@ljharb](https://github.com/ljharb))

[7.33.2]: jsx-eslint/eslint-plugin-react@v7.33.1...v7.33.2

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


## [v7.33.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7331---20230729)

##### Fixed

-   \[`require-default-props`]: fix config schema ([#3605][] [@controversial](https://github.com/controversial))
-   \[`jsx-curly-brace-presence`]: Revert \[[#3538](https://github.com/jsx-eslint/eslint-plugin-react/issues/3538)]\[] due to issues with intended string type casting usage ([#3611][] [@taozhou-glean](https://github.com/taozhou-glean))
-   \[`sort-prop-types`]: ensure sort-prop-types respects noSortAlphabetically ([#3610][] [@caesar1030](https://github.com/caesar1030))

[7.33.1]: jsx-eslint/eslint-plugin-react@v7.33.0...v7.33.1

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

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

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


## [v7.33.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7330---20230719)

##### Added

-   \[`display-name`]: add `checkContextObjects` option ([#3529][] [@JulesBlm](https://github.com/JulesBlm))
-   \[`jsx-first-prop-new-line`]: add `multiprop` option ([#3533][] [@haydncomley](https://github.com/haydncomley))
-   \[`no-deprecated`]: add React 18 deprecations ([#3548][] [@sergei-startsev](https://github.com/sergei-startsev))
-   \[`forbid-component-props`]: add `disallowedFor` option ([#3417][] [@jacketwpbb](https://github.com/jacketwpbb))

##### Fixed

-   \[`no-array-index-key`]: consider flatMap ([#3530][] [@k-yle](https://github.com/k-yle))
-   \[`jsx-curly-brace-presence`]: handle single and only expression template literals ([#3538][] [@taozhou-glean](https://github.com/taozhou-glean))
-   \[`no-unknown-property`]: allow `onLoad` on `source` ([@ljharb](https://github.com/ljharb))
-   \[`jsx-first-prop-new-line`]: ensure autofix preserves generics in component name ([#3546][] [@ljharb](https://github.com/ljharb))
-   \[`no-unknown-property`]: allow `fill` prop on `<symbol>` ([#3555][] [@stefanprobst](https://github.com/stefanprobst))
-   \[`display-name`], \[`prop-types`]: when checking for a capitalized name, ignore underscores entirely ([#3560][] [@ljharb](https://github.com/ljharb))
-   \[`no-unused-state`]: avoid crashing on a class field function with destructured state ([#3568][] [@ljharb](https://github.com/ljharb))
-   \[`no-unused-prop-types`]: allow using spread with object expression in jsx ([#3570][] [@akulsr0](https://github.com/akulsr0))
-   Revert "\[`destructuring-assignment`]: Handle destructuring of useContext in SFC" ([#3583][] \[[#2797](https://github.com/jsx-eslint/eslint-plugin-react/issues/2797)]\[] [@102](https://github.com/102))
-   \[`prefer-read-only-props`]: add TS support ([#3593][] [@HenryBrown0](https://github.com/HenryBrown0))

##### Changed

-   \[Docs] \[`jsx-newline`], \[`no-unsafe`], \[`static-property-placement`]: Fix code syntax highlighting ([#3563][] [@nbsp1221](https://github.com/nbsp1221))
-   \[readme] resore configuration URL ([#3582][] [@gokaygurcan](https://github.com/gokaygurcan))
-   \[Docs] \[`jsx-no-bind`]: reword performance rationale ([#3581][] [@gpoole](https://github.com/gpoole))

<!---->

-   \[Docs] \[`jsx-first-prop-new-line`]: add missing `multiprop` value ([#3598][] [@dzek69](https://github.com/dzek69))

[7.33.0]: jsx-eslint/eslint-plugin-react@v7.32.2...v7.33.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


## [v7.32.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7322---20230128)

##### Fixed

-   configs: restore `parserOptions` in legacy configs (\[[#3523](https://github.com/jsx-eslint/eslint-plugin-react/issues/3523)]\[] [@ljharb](https://github.com/ljharb))
-   \[`jsx-no-constructed-context-values`], \[`jsx-no-useless-fragment`]: add a rule schema ([@ljharb](https://github.com/ljharb))
    ( \[`no-unknown-property`]: add `fill` for `<marker>` ([#3525][] [@alexey-koran](https://github.com/alexey-koran))

[7.32.2]: jsx-eslint/eslint-plugin-react@v7.32.1...v7.32.2

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

[#3520]: jsx-eslint/eslint-plugin-react#3523


## [v7.32.1](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7321---20230116)

##### Fixed

-   prevent circular dependency in index and "all" config ([#3519][] [@ljharb](https://github.com/ljharb))
-   \[`destructuring-assignment`]: do not force destructuring of optionally chained properties ([#3520][] [@ljharb](https://github.com/ljharb))

[7.32.1]: jsx-eslint/eslint-plugin-react@v7.32.0...v7.32.1

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

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


## [v7.32.0](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7320---20230110)

##### Added

-   support new config system ([#3429][] [@jjangga0214](https://github.com/jjangga0214))
-   \[`hook-use-state`]: add `allowDestructuredState` option ([#3449][] [@ljharb](https://github.com/ljharb))
-   add \[`sort-default-props`] and deprecate \[`jsx-sort-default-props`] ([#1861][] [@alexzherdev](https://github.com/alexzherdev))
-   add \[`no-object-type-as-default-prop`] rule ([#2848][] [@cyan33](https://github.com/cyan33) [@fengkx](https://github.com/fengkx))

##### Fixed

-   configs: avoid legacy config system error ([#3461][] [@ljharb](https://github.com/ljharb))
-   \[`sort-prop-types`]: restore autofixing ([#3452][], [#3471][] [@ROSSROSALES](https://github.com/ROSSROSALES))
-   \[`no-unknown-property`]: do not check `fbs` elements ([#3494][] [@brianogilvie](https://github.com/brianogilvie))
-   \[`jsx-newline`]: No newline between comments and jsx elements ([#3493][] [@justmejulian](https://github.com/justmejulian))
-   \[`jsx-no-leaked-render`]: Don't report errors on empty strings if React >= v18 ([#3488][] [@himanshu007-creator](https://github.com/himanshu007-creator))
-   \[`no-invalid-html-attribute`]: convert autofix to suggestion ([#3474][] [@himanshu007-creator](https://github.com/himanshu007-creator) [@ljharb](https://github.com/ljharb))
-   \[`jsx-no-leaked-render`]: fix removing parentheses for conditionals ([#3502][] [@akulsr0](https://github.com/akulsr0))
-   \[`jsx-no-leaked-render`]: invalid fixes in coerce mode ([#3511][] [@akulsr0](https://github.com/akulsr0))
-   \[`destructuring-assignment`]: Handle destructuring of useContext in SFC ([#2797][] [@Zinyon](https://github.com/Zinyon) [@ljharb](https://github.com/ljharb))

##### Changed

-   \[Docs] \[`jsx-no-leaked-render`]: Remove mentions of empty strings for React 18 ([#3468][] [@karlhorky](https://github.com/karlhorky))
-   \[Docs] update `eslint-doc-generator` to v1.0.0 ([#3499][] [@bmish](https://github.com/bmish))
-   \[meta] add issue template ([#3483][] [@ROSSROSALES](https://github.com/ROSSROSALES))
-   \[Docs] Use emoji for jsx-runtime config and config file for eslint-doc-generator ([#3504][] [@bmish](https://github.com/bmish))
-   \[Docs] \[`prefer-exact-props`]: fix example flow syntax ([#3510][] [@smackfu](https://github.com/smackfu))
-   \[Perf] use `anyOf` instead of `oneOf` ([@ljharb](https://github.com/ljharb) [@remcohaszing](https://github.com/remcohaszing))

[7.32.0]: jsx-eslint/eslint-plugin-react@v7.31.11...v7.32.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


## [v7.31.11](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#73111---20221117)

##### Fixed

-   \[`jsx-no-target-blank`]: allow ternaries with literals ([#3464][] [@akulsr0](https://github.com/akulsr0))
-   \[`no-unknown-property`]: add `inert` attribute ([#3484][] [@ljharb](https://github.com/ljharb))
-   \[`jsx-key`]: detect keys in logical expression and conditional expression ([#3490][] [@metreniuk](https://github.com/metreniuk))

##### Changed

-   \[Perf] component detection: improve performance by avoiding traversing parents unnecessarily ([#3459][] [@golopot](https://github.com/golopot))
-   \[Docs] `forbid-component-props`: inclusive language w/ allowlist ([#3473][] [@AndersDJohnson](https://github.com/AndersDJohnson))
-   \[Docs] automate doc generation with `eslint-doc-generator` ([#3469][] [@bmish](https://github.com/bmish))

[7.31.11]: jsx-eslint/eslint-plugin-react@v7.31.10...v7.31.11

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

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

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

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

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

[#3459]: jsx-eslint/eslint-plugin-react#3459
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

5 participants