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
feat: replace dependency graphemer with Intl.Segmenter
#18110
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
96d18dd
to
882002a
Compare
This is currently blocked on Firefox not supporting |
it's supported on node.js >= 16, so it seems not a blocker: re Firefox, can we add a polyfill in the playground? |
I can't say if it's acceptable for ESLint to have a core rule that works in Node.js but not in (all major) browsers. The
|
Currently eslint doesn't officially support browsers, so I think that's acceptable. thoughts? @nzakas @mdjermanovic |
The purpose of this effort was to remove |
@nzakas seems we are not on the same page. It will remove |
Ah, I see, thanks for explaining. In that case, I'm 👍 |
|
Release notes for Firefox 125: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/125 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Looks like all tests are passing, so I think we're good to go.
Would like an approval from @aladdin-add based on previous comments before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🎉
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain: replace a dependency with a native implementation.
See the discussion in #17835
Fixes #17835
What changes did you make? (Give an overview)
Replaced graphemer with the native
Segments
implementation provided byIntl.Segmenter
.Is there anything you'd like reviewers to focus on?
Segments
behavior with respect to which sequences are considered graphemes is expected to change with newer version of Unicodeid-length
andkey-spacing
Segments
API is not supported in all browsers: https://caniuse.com/?search=Segments