From 88a4576a2fe7a29ec80c86f9ae9ae7a2c8108ed1 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 29 Jun 2024 08:26:35 +0900 Subject: [PATCH] fix --- tests/lib/rules/use-ignore-case.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/lib/rules/use-ignore-case.ts b/tests/lib/rules/use-ignore-case.ts index 3866985ec..1a60a8bdc 100644 --- a/tests/lib/rules/use-ignore-case.ts +++ b/tests/lib/rules/use-ignore-case.ts @@ -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({ @@ -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`/(?:(?[aA])|(?[bB]))\k/`, + // ES2025 + ...(semver.gte(ESLint.version, "9.6.0") + ? [String.raw`/(?:(?[aA])|(?[bB]))\k/`] + : []), ], })