tweak optional chaining rule

This commit is contained in:
Brahim Hadriche committed 2024-03-08 23:14:32 -05:00
1 parent 58918f68fb
commit 0f6329997d
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@
},
{
"code": "NO_OPTIONAL_CHAINING",
"regex": "\\?\\.",
"regex": "\\?[\\.|\\[|\\(|@]",
"regexFlags": "ig",
"message": "No optional chaning (var1?.property). Do a type check instead."
}
@@ -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