From 0f6329997ddd98182f5e955e90694882ae88c495 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 8 Mar 2024 23:14:32 -0500 Subject: [PATCH] tweak optional chaining rule --- config/bsconfig.base.jsonc | 2 +- .../components/Services/ApplicationInfo/LatestLibVersionTask.bs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/bsconfig.base.jsonc b/config/bsconfig.base.jsonc index 618680c4..ce28c4ea 100644 --- a/config/bsconfig.base.jsonc +++ b/config/bsconfig.base.jsonc @@ -43,7 +43,7 @@ }, { "code": "NO_OPTIONAL_CHAINING", - "regex": "\\?\\.", + "regex": "\\?[\\.|\\[|\\(|@]", "regexFlags": "ig", "message": "No optional chaning (var1?.property). Do a type check instead." } diff --git a/playlet-lib/src/components/Services/ApplicationInfo/LatestLibVersionTask.bs b/playlet-lib/src/components/Services/ApplicationInfo/LatestLibVersionTask.bs index 7b0fa566..d0e668b8 100644 --- a/playlet-lib/src/components/Services/ApplicationInfo/LatestLibVersionTask.bs +++ b/playlet-lib/src/components/Services/ApplicationInfo/LatestLibVersionTask.bs @@ -14,6 +14,7 @@ function GetLatestPlayletLibVersionFromGithubReleases() as string if response.StatusCode() = 200 headers = response.Headers() if headers.location <> invalid + ' bs:disable-next-line NO_OPTIONAL_CHAINING regex = /\/v?(\d+\.\d+\.\d+)/ match = regex.match(headers.location) if match.Count() = 2