-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
breakingThis change is backwards-incompatibleThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLint
Description
ESLint version
v9.36.0
What problem do you want to solve?
Replace natural-compare with some native alternatives. See this
What do you think is the correct solution?
Use one from this alternatives instead:
String.prototype.localeCompare
function naturalCompare(a, b) {
return String.prototype.localeCompare.call(a, b, undefined, { numeric: true });
}Intl.Collator.prototype.compare
const collator = new Intl.Collator(undefined, { numeric: true });
const naturalCompare = collator.compare;Participation
- I am willing to submit a pull request for this change.
Additional comments
No response
Metadata
Metadata
Assignees
Labels
breakingThis change is backwards-incompatibleThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLint
Type
Projects
Status
Feedback Needed