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

fix(linter/jsx_a11y): Ensure plugin settings are used #2359

Merged
merged 8 commits into from
Feb 9, 2024
Merged

Conversation

leaysgur
Copy link
Collaborator

@leaysgur leaysgur commented Feb 9, 2024

Currently, some of the rules did not use settings, so make sure they do.

  • Align implementation of getElementType()
    • (This is the only util that depends on settings)

Original rules which use getElementType() are:

  • 🙅🏻‍♂️ accessible-emoji
  • ✅ alt-text
  • 🙅🏻‍♂️ anchor-ambiguous-text
  • ✅ anchor-has-content
  • anchor-is-valid
  • 🙆🏻‍♀️ aria-activedescendant-has-tabindex
  • 🙆🏻‍♀️ aria-role
  • 🙆🏻‍♀️ aria-unsupported-elements
  • autocomplete-valid
  • 🙆🏻‍♀️ click-events-have-key-events
  • 🙅🏻‍♂️ control-has-associated-label
  • heading-has-content
  • 🙆🏻‍♀️ html-has-lang
  • ✅ iframe-has-title
  • 🙆🏻‍♀️ img-redundant-alt
  • 🙅🏻‍♂️ interactive-supports-focus
  • 🙅🏻‍♂️ label-has-associated-control
  • 🙅🏻‍♂️ label-has-for
  • 🙆🏻‍♀️ lang
  • 🙆🏻‍♀️ media-has-caption
  • ✅ no-aria-hidden-on-focusable
  • 🙆🏻‍♀️ no-autofocus
  • 🙆🏻‍♀️ no-distracting-elements
  • 🙅🏻‍♂️ no-interactive-element-to-noninteractive-role
  • 🙅🏻‍♂️ no-noninteractive-element-interactions
  • 🙅🏻‍♂️ no-noninteractive-element-to-interactive-role
  • 🙅🏻‍♂️ no-noninteractive-tabindex
  • 🙅🏻‍♂️ no-onchange
  • 🙆🏻‍♀️ no-redundant-roles
  • 🙅🏻‍♂️ no-static-element-interactions
  • ✅ prefer-tag-over-role
  • 🙆🏻‍♀️ role-has-required-aria-props
  • 🙆🏻‍♀️ role-supports-aria-props
  • 🙆🏻‍♀️ scope

🙅🏻‍♂️ = Not implemented yet by oxlint / ✅ = Fixed by this PR / 🙆🏻‍♀️ = Already used

@github-actions github-actions bot added the A-linter Area - Linter label Feb 9, 2024
Copy link

codspeed-hq bot commented Feb 9, 2024

CodSpeed Performance Report

Merging #2359 will not alter performance

Comparing jsx_a11y-settings (a356af4) with main (ca77ccc)

Summary

✅ 27 untouched benchmarks

@Boshen
Copy link
Member

Boshen commented Feb 9, 2024

This is awesome! Thank you so much!

@Boshen Boshen merged commit 2521b52 into main Feb 9, 2024
20 checks passed
@Boshen Boshen deleted the jsx_a11y-settings branch February 9, 2024 12:55
IWANABETHATGUY pushed a commit to IWANABETHATGUY/oxc that referenced this pull request May 29, 2024
Currently, some of the rules did not use `settings`, so make sure they
do.

- [x] Align implementation of `getElementType()`
  - (This is the only util that depends on `settings`)

Original rules which use `getElementType()` are:

- [x] 🙅🏻‍♂️ accessible-emoji
- [x] ✅ alt-text
- [x] 🙅🏻‍♂️ anchor-ambiguous-text
- [x] ✅ anchor-has-content
- [x] anchor-is-valid
  - TODO: `from_configuration()` not implemented => oxc-project#2361 
- [x] 🙆🏻‍♀️ aria-activedescendant-has-tabindex
- [x] 🙆🏻‍♀️ aria-role
- [x] 🙆🏻‍♀️ aria-unsupported-elements
- [x] autocomplete-valid
- TODO: `from_configuration()` not implemented and needed for this =>
oxc-project#2362
- [x] 🙆🏻‍♀️ click-events-have-key-events
- [x] 🙅🏻‍♂️ control-has-associated-label
- [x] heading-has-content
  - TODO: 1 test should be failed but passes 🤔 => oxc-project#2360 
- [x] 🙆🏻‍♀️ html-has-lang
- [x] ✅ iframe-has-title
- [x] 🙆🏻‍♀️ img-redundant-alt
- [x] 🙅🏻‍♂️ interactive-supports-focus
- [x] 🙅🏻‍♂️ label-has-associated-control
- [x] 🙅🏻‍♂️ label-has-for
- [x] 🙆🏻‍♀️ lang
- [x] 🙆🏻‍♀️ media-has-caption
- [x] ✅ no-aria-hidden-on-focusable
- [x] 🙆🏻‍♀️ no-autofocus
- [x] 🙆🏻‍♀️ no-distracting-elements
- [x] 🙅🏻‍♂️ no-interactive-element-to-noninteractive-role
- [x] 🙅🏻‍♂️ no-noninteractive-element-interactions
- [x] 🙅🏻‍♂️ no-noninteractive-element-to-interactive-role
- [x] 🙅🏻‍♂️ no-noninteractive-tabindex
- [x] 🙅🏻‍♂️ no-onchange
- [x] 🙆🏻‍♀️ no-redundant-roles
- [x] 🙅🏻‍♂️ no-static-element-interactions
- [x] ✅ prefer-tag-over-role
- [x] 🙆🏻‍♀️ role-has-required-aria-props
- [x] 🙆🏻‍♀️ role-supports-aria-props
- [x] 🙆🏻‍♀️ scope

🙅🏻‍♂️ = Not implemented yet by oxlint / ✅ = Fixed by this PR / 🙆🏻‍♀️ =
Already used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants