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] img-redundant-alt: fixed multibyte character support #970

Merged
1 commit merged into from
Jan 9, 2024

Conversation

makotot
Copy link
Contributor

@makotot makotot commented Jan 8, 2024

Fixes #969.

Is it possible to replace the word boundary \b with \s+? Although it has passed unit tests.

Also, it seemed more natural not to check word boundaries for multibyte characters, which may be a difficult point to handle also related to #417.

(?!{) is removed because there is no difference in the unit test results whether it is there or not.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

you'll need import includes from 'array-includes'; rather than .includes but otherwise this looks great!

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (540cb7a) 99.01% compared to head (7058725) 99.02%.

❗ Current head 7058725 differs from pull request most recent head 2d8d557. Consider uploading reports for the commit 2d8d557 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #970   +/-   ##
=======================================
  Coverage   99.01%   99.02%           
=======================================
  Files         105      105           
  Lines        1628     1634    +6     
  Branches      578      579    +1     
=======================================
+ Hits         1612     1618    +6     
  Misses         16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@makotot makotot requested a review from ljharb January 9, 2024 15:09
@ljharb ljharb changed the title [Fix]: no error with multibyte characters specified in words option [Fix] img-redundant-alt: fixed multibyte character support Jan 9, 2024
@ljharb
Copy link
Member

ljharb commented Jan 9, 2024

@makotot hm, i rebased this and fixed one of the .includes usages, and now tests are failing. mind taking a look?

@ljharb
Copy link
Member

ljharb commented Jan 9, 2024

nvm, i think i figured it out

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
string.prototype.includes 2.0.0 None +0 13.8 kB nicolo-ribaudo

@ljharb ljharb closed this pull request by merging all changes into jsx-eslint:main in 4c7e781 Jan 9, 2024
@makotot
Copy link
Contributor Author

makotot commented Jan 10, 2024

Didn't reply due to sleep time. Thanks 🙌
I will wait for a new version to be released that includes this fix.

@makotot makotot deleted the issue969 branch January 10, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[img-redundant-alt] words option does not work with double-byte character words.
2 participants