Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jun 28, 2024
1 parent 008d679 commit 88a4576
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/lib/rules/use-ignore-case.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ESLint } from "eslint"
import { SnapshotRuleTester } from "eslint-snapshot-rule-tester"
import semver from "semver"
import rule from "../../../lib/rules/use-ignore-case"

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

0 comments on commit 88a4576

Please sign in to comment.