feat(linter): implement aria/proptypes#17253
Conversation
bf6cbf0 to
001bb64
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements the aria-proptypes lint rule from the jsx-a11y plugin to validate ARIA state and property values in JSX elements. The rule ensures that ARIA attributes use valid values according to the WAI-ARIA specification.
Key Changes
- Added validation for all ARIA property types including boolean, tristate, string, integer, number, token, and token list
- Implemented comprehensive test coverage with 135+ test cases covering valid and invalid patterns
- Acknowledged limitation: non-literal expressions like
{!true}are not validated to avoid false positives
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/oxc_linter/src/rules/jsx_a11y/aria_proptypes.rs | New rule implementation with validation logic for ARIA property types, diagnostic messages, and comprehensive test suite |
| crates/oxc_linter/src/rules.rs | Module registration for the new aria_proptypes rule |
| crates/oxc_linter/src/generated/rule_runner_impls.rs | Generated rule runner implementation for the new rule |
| crates/oxc_linter/src/snapshots/jsx_a11y_aria_proptypes.snap.new | Test snapshot file containing expected diagnostic output for failing test cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
001bb64 to
61f620d
Compare
CodSpeed Performance ReportMerging #17253 will not alter performanceComparing Summary
Footnotes
|
6af73ab to
4f7c482
Compare
|
ugh i broke the tests - ill fix them |
related to #1141
I implemented jsx_a11y
aria_proptypesrule.