Skip to content

Commit 0b7747d

Browse files
Fixed sort-alternatives number regex (#264)
1 parent 379e4b0 commit 0b7747d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/sort-alternatives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function trySortNumberAlternatives(alternatives: Alternative[]): void {
204204
{
205205
let start = 0
206206
for (let i = 0; i < alternatives.length; i++) {
207-
if (!/^0|[1-9]\d*$/.test(alternatives[i].raw)) {
207+
if (!/^(?:0|[1-9]\d*)$/.test(alternatives[i].raw)) {
208208
if (start < i) {
209209
numberRanges.push([start, i])
210210
}

0 commit comments

Comments
 (0)