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

refactor(lint): a11y utils to reduce duplicate function definitions #5405

Merged
merged 5 commits into from
Mar 23, 2025

Conversation

unvalley
Copy link
Member

@unvalley unvalley commented Mar 20, 2025

Summary

Several a11y lint rules currently define similar functions independently.
This PR changes them to use a single consolidated implementation.
And explicitly skip linting to custom components in noStaticElementInteractions.

Test Plan

Existing tests should pass.

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Mar 20, 2025
Copy link

codspeed-hq bot commented Mar 20, 2025

CodSpeed Performance Report

Merging #5405 will not alter performance

Comparing unvalley:refactor-a11y-utils (cf9bf5e) with main (772dcf5)

Summary

✅ 95 untouched benchmarks

@unvalley unvalley marked this pull request as draft March 21, 2025 01:40
Comment on lines +101 to +104
// Custom components are not checked because we do not know what DOM will be used.
if node.is_custom_component() {
return None;
}
Copy link
Member Author

@unvalley unvalley Mar 21, 2025

Choose a reason for hiding this comment

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

noStaticElementInteractions explicitly skip custom components. Test fails without this change.

@unvalley unvalley marked this pull request as ready for review March 22, 2025 03:11
@unvalley unvalley requested review from a team March 23, 2025 08:49
@unvalley unvalley merged commit d1e5499 into biomejs:main Mar 23, 2025
15 checks passed
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