From 9d61ca13cb508322511e540d26b2aad34b612060 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Wed, 24 Jun 2026 10:49:18 +0200 Subject: [PATCH] Use regex to test node name --- eslint/NoObservableScopeLeak.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint/NoObservableScopeLeak.js b/eslint/NoObservableScopeLeak.js index 83a3c9a11..a8bfec867 100644 --- a/eslint/NoObservableScopeLeak.js +++ b/eslint/NoObservableScopeLeak.js @@ -41,7 +41,7 @@ const rule = ESLintUtils.RuleCreator( node.parent.object === node && node.parent.property.type === "Identifier" && !safeScopeMethods.includes(node.parent.property.name) && - node.name.endsWith("cope") + /(^s|S)cope$/.test(node.name) ) { // TODO: Once oxlint supports lint rules that rely on TypeScript type-awareness, // Verify that the variable is actually of type ObservableScope rather than just