Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): check JSX spread elements for misused spread usage#10653

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

ronami
Copy link
Member

PR Checklist

Overview

This PR addresses#10648 and adjusts the rule to checkJSXSpreadAttribute nodes for being valid object-spread.

I didn't add any check for the other type of JSX spread node,JSXSpreadChild, as it seems TypeScript always flags it if it isn't an array:

<div>{...x}</div>

Even if the type being spread is astring, it still gets reported by TypeScript (playground link). I've checked this is reported on the lowest version of TypeScript on the playground (v4.8.4).

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@ronami!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedJan 14, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitd8ecc9c
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/678bf9be7c38af00087b5bcd
😎 Deploy Previewhttps://deploy-preview-10653--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (🔴 down 5 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify site configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedJan 14, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commitd8ecc9c.

CommandStatusDurationResult
nx test eslint-plugin✅ Succeeded5m 47sView ↗
nx test visitor-keys✅ Succeeded<1sView ↗
nx test eslint-plugin --coverage=false✅ Succeeded7m 23sView ↗
nx run types:build✅ Succeeded<1sView ↗
nx run-many --target=build --exclude website --...✅ Succeeded24sView ↗
nx test utils✅ Succeeded<1sView ↗
nx run-many --target=clean✅ Succeeded12sView ↗
nx test type-utils✅ Succeeded<1sView ↗
Additional runs (24)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-01-18 19:14:54 UTC

@nx-cloudNx Cloud
Copy link

View yourCI Pipeline Execution ↗ for commitad1467a.

CommandStatusDurationResult
nx run-many --target=clean✅ Succeeded12sView ↗

☁️Nx Cloud last updated this comment at2025-01-14 16:59:32 UTC

@ronamironami marked this pull request as ready for reviewJanuary 14, 2025 16:59
@Josh-CenaJosh-Cena added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelJan 14, 2025
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the catch!

ronami reacted with heart emoji
@Josh-CenaJosh-Cena merged commit916b989 intotypescript-eslint:mainJan 18, 2025
62 checks passed
@ronamironami deleted the no-misused-spread-jsx branchJanuary 19, 2025 05:08
renovatebot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull requestJan 21, 2025
##### [v8.21.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8210-2025-01-20)##### 🩹 Fixes-   **eslint-plugin:** \[no-duplicate-enum-values] handle template literal ([#10675](typescript-eslint/typescript-eslint#10675))-   **eslint-plugin:** \[no-base-to-string] don't crash for recursive array or tuple types ([#10633](typescript-eslint/typescript-eslint#10633))-   **eslint-plugin:** \[no-for-in-array] report on any type which may be an array or array-like ([#10535](typescript-eslint/typescript-eslint#10535))-   **eslint-plugin:** check JSX spread elements for misused spread usage ([#10653](typescript-eslint/typescript-eslint#10653))-   **eslint-plugin:** \[no-unnecessary-type-arguments] handle type args on jsx ([#10630](typescript-eslint/typescript-eslint#10630))##### ❤️ Thank You-   Ronen Amiel-   YeonJuan [@yeonjuan](https://github.com/yeonjuan)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
renovatebot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull requestJan 21, 2025
##### [v8.21.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8210-2025-01-20)##### 🩹 Fixes-   **eslint-plugin:** \[no-duplicate-enum-values] handle template literal ([#10675](typescript-eslint/typescript-eslint#10675))-   **eslint-plugin:** \[no-base-to-string] don't crash for recursive array or tuple types ([#10633](typescript-eslint/typescript-eslint#10633))-   **eslint-plugin:** \[no-for-in-array] report on any type which may be an array or array-like ([#10535](typescript-eslint/typescript-eslint#10535))-   **eslint-plugin:** check JSX spread elements for misused spread usage ([#10653](typescript-eslint/typescript-eslint#10653))-   **eslint-plugin:** \[no-unnecessary-type-arguments] handle type args on jsx ([#10630](typescript-eslint/typescript-eslint#10630))##### ❤️ Thank You-   Ronen Amiel-   YeonJuan [@yeonjuan](https://github.com/yeonjuan)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
renovatebot added a commit to andrei-picus-tink/auto-renovate that referenced this pull requestJan 24, 2025
| datasource | package                          | from   | to     || ---------- | -------------------------------- | ------ | ------ || npm        | @typescript-eslint/eslint-plugin | 8.20.0 | 8.21.0 || npm        | @typescript-eslint/parser        | 8.20.0 | 8.21.0 |## [v8.21.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8210-2025-01-20)##### 🩹 Fixes-   **eslint-plugin:** \[no-duplicate-enum-values] handle template literal ([#10675](typescript-eslint/typescript-eslint#10675))-   **eslint-plugin:** \[no-base-to-string] don't crash for recursive array or tuple types ([#10633](typescript-eslint/typescript-eslint#10633))-   **eslint-plugin:** \[no-for-in-array] report on any type which may be an array or array-like ([#10535](typescript-eslint/typescript-eslint#10535))-   **eslint-plugin:** check JSX spread elements for misused spread usage ([#10653](typescript-eslint/typescript-eslint#10653))-   **eslint-plugin:** \[no-unnecessary-type-arguments] handle type args on jsx ([#10630](typescript-eslint/typescript-eslint#10630))##### ❤️ Thank You-   Ronen Amiel-   YeonJuan [@yeonjuan](https://github.com/yeonjuan)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
renovatebot added a commit to andrei-picus-tink/auto-renovate that referenced this pull requestJan 24, 2025
| datasource | package                          | from   | to     || ---------- | -------------------------------- | ------ | ------ || npm        | @typescript-eslint/eslint-plugin | 8.20.0 | 8.21.0 || npm        | @typescript-eslint/parser        | 8.20.0 | 8.21.0 |## [v8.21.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8210-2025-01-20)##### 🩹 Fixes-   **eslint-plugin:** \[no-duplicate-enum-values] handle template literal ([#10675](typescript-eslint/typescript-eslint#10675))-   **eslint-plugin:** \[no-base-to-string] don't crash for recursive array or tuple types ([#10633](typescript-eslint/typescript-eslint#10633))-   **eslint-plugin:** \[no-for-in-array] report on any type which may be an array or array-like ([#10535](typescript-eslint/typescript-eslint#10535))-   **eslint-plugin:** check JSX spread elements for misused spread usage ([#10653](typescript-eslint/typescript-eslint#10653))-   **eslint-plugin:** \[no-unnecessary-type-arguments] handle type args on jsx ([#10630](typescript-eslint/typescript-eslint#10630))##### ❤️ Thank You-   Ronen Amiel-   YeonJuan [@yeonjuan](https://github.com/yeonjuan)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJan 27, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

@Josh-CenaJosh-CenaJosh-Cena approved these changes

Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: [no-misused-spread] False negative for spread in JSX
3 participants
@ronami@JoshuaKGoldberg@Josh-Cena

[8]ページ先頭

©2009-2025 Movatter.jp