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

feat(analyzer): useAltText don't check object spread #4935

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

fireairforce
Copy link
Member

Summary

closes: #3977

Ignore the object spread when lint/a11y/useAltText check element's attribute, the following code can pass check:

<img src="test.png" alt={alt} {...restProps}></img>

Test Plan

Add test case

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Jan 21, 2025
@ematipico
Copy link
Member

Thank you, @fireairforce, for taking care of this. As I mentioned in my comment, other rules follow the same logic, and we should update them. Unfortunately, I don't recall all of them, that's why I suggested creating an issue, so we can track them.

Copy link

codspeed-hq bot commented Jan 21, 2025

CodSpeed Performance Report

Merging #4935 will degrade performances by 6.4%

Comparing fix-3977 (97b7b3b) with next (2a80687)

Summary

❌ 1 regressions
✅ 94 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark next fix-3977 Change
react.production.min_3378072959512366797.js[cached] 1.9 ms 2 ms -6.4%

@fireairforce
Copy link
Member Author

ok,I will check in my pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants