jsx-eslint / eslint-plugin-jsx-a11y

Static AST checker for a11y rules on JSX elements.
MIT License
3.38k stars 637 forks source link

[Fix] `img-redundant-alt`: fixed multibyte character support #970

Closed makotot closed 8 months ago

makotot commented 8 months ago

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 https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/417.

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

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

:exclamation: 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 ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ljharb commented 8 months ago

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

ljharb commented 8 months ago

nvm, i think i figured it out

socket-security[bot] commented 8 months ago

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
makotot commented 8 months ago

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