Skip to content

feat(eslint/jsx_a11y): implement anchor_ambiguous_text#5729

Merged
camc314 merged 3 commits intooxc-project:mainfrom
jelly:anchor_ambiguous_text
Nov 25, 2024
Merged

feat(eslint/jsx_a11y): implement anchor_ambiguous_text#5729
camc314 merged 3 commits intooxc-project:mainfrom
jelly:anchor_ambiguous_text

Conversation

@jelly
Copy link
Copy Markdown
Contributor

@jelly jelly commented Sep 12, 2024

There is a remaining clippy issue with passing COW<_, str> which I simply can't resolve, but maybe there is more to fix first in my approach.

Currently this PR might do a bit too much allocations:

  • trim() - this sadly has no cowutils replacement but might not be needed. I kept the trim() in there as a "maybe optimisation" to skip the whole string modification shenanigans
  • replace() can't be used so I used retain (which also is a bit faster iirc?), but that converts COW => String. So maybe this should chain cow_replace?
  • I'm also not sure if if normalized_str.contains(char::is_whitespace) { is worth it? But my gut feeling is that it is, as it deconstructs and constructs a whole String<>

@github-actions github-actions Bot added the A-linter Area - Linter label Sep 12, 2024
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Sep 12, 2024

CodSpeed Performance Report

Merging #5729 will not alter performance

Comparing jelly:anchor_ambiguous_text (7b3c919) with main (e26916c)

Summary

✅ 30 untouched benchmarks

@Boshen Boshen requested a review from camc314 November 25, 2024 08:43
@Boshen
Copy link
Copy Markdown
Member

Boshen commented Nov 25, 2024

@camc314 can you help and get this PR merged.

@camc314 camc314 force-pushed the anchor_ambiguous_text branch from 383fd70 to 9a0054e Compare November 25, 2024 09:19
@github-actions github-actions Bot added the C-enhancement Category - New feature or request label Nov 25, 2024
@camc314 camc314 force-pushed the anchor_ambiguous_text branch from 4675d94 to 01a9acd Compare November 25, 2024 09:25
@camc314 camc314 marked this pull request as ready for review November 25, 2024 09:26
@camc314 camc314 force-pushed the anchor_ambiguous_text branch from 01a9acd to f014a82 Compare November 25, 2024 10:00
Copy link
Copy Markdown
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

thank you!

@camc314 camc314 force-pushed the anchor_ambiguous_text branch from 98648aa to 7b3c919 Compare November 25, 2024 10:46
@camc314 camc314 merged commit 7236d14 into oxc-project:main Nov 25, 2024
Dunqing pushed a commit that referenced this pull request Nov 25, 2024
Co-authored-by: Cameron Clark <cameron.clark@hey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants