Skip to content

Commit 88a4576

Browse files
committed
fix
1 parent 008d679 commit 88a4576

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/lib/rules/use-ignore-case.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import { ESLint } from "eslint"
12
import { SnapshotRuleTester } from "eslint-snapshot-rule-tester"
3+
import semver from "semver"
24
import rule from "../../../lib/rules/use-ignore-case"
35

46
const tester = new SnapshotRuleTester({
@@ -43,6 +45,9 @@ tester.run("use-ignore-case", rule as any, {
4345
String.raw`/\b0[xX][a-fA-F0-9]+\b/`,
4446
String.raw`RegExp("[a-zA-Z]")`,
4547
String.raw`/[\q{a|A}]/v`,
46-
String.raw`/(?:(?<foo>[aA])|(?<foo>[bB]))\k<foo>/`,
48+
// ES2025
49+
...(semver.gte(ESLint.version, "9.6.0")
50+
? [String.raw`/(?:(?<foo>[aA])|(?<foo>[bB]))\k<foo>/`]
51+
: []),
4752
],
4853
})

0 commit comments

Comments
 (0)