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]: flat configs are possibly undefined #3874

Closed
2 tasks done
filipw01 opened this issue Jan 10, 2025 · 1 comment
Closed
2 tasks done

[Bug]: flat configs are possibly undefined #3874

filipw01 opened this issue Jan 10, 2025 · 1 comment

Comments

@filipw01
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

Image
import tseslint from 'typescript-eslint'
import reactPlugin from 'eslint-plugin-react'

export default tseslint.config(
  reactPlugin.configs.flat.recommended
)
reactPlugin.configs.flat' is possibly 'undefined'

Is there really a chanse for this object to be undefined or is it incorrect type?

Expected Behavior

No type error

eslint-plugin-react version

v7.37.3

eslint version

v9.17.0

node version

v20.0.0

@filipw01 filipw01 added the bug label Jan 10, 2025
@ljharb
Copy link
Member

ljharb commented Jan 10, 2025

I assume this is an artifact of the recursion?

@ljharb ljharb closed this as completed in efc021f Jan 10, 2025
@ljharb ljharb marked this as a duplicate of #3875 Jan 11, 2025
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Jan 13, 2025
##### [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
cswimr pushed a commit to cswimr/gauntlet-cswimr-plugins that referenced this issue Jan 20, 2025
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.3` -> `7.37.4`](https://renovatebot.com/diffs/npm/eslint-plugin-react/7.37.3/7.37.4) |

---

### Release Notes

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

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

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

##### Fixed

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

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

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

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

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDQuMyIsInVwZGF0ZWRJblZlciI6IjM5LjExOC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://www.coastalcommits.com/cswimr/gauntlet-cswimr-plugins/pulls/24
Co-authored-by: Renovate <[email protected]>
Co-committed-by: Renovate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants