diff --git a/src/rules/commentFormatRule.ts b/src/rules/commentFormatRule.ts index 5665678897e..47ade09cd9f 100644 --- a/src/rules/commentFormatRule.ts +++ b/src/rules/commentFormatRule.ts @@ -180,8 +180,8 @@ function walk(ctx: Lint.WalkContext) { return; } const commentText = fullText.slice(start, end); - // whitelist //#region and //#endregion and JetBrains IDEs' "//noinspection ..." - if (/^(?:#(?:end)?region|noinspection\s)/.test(commentText)) { + // whitelist //#region and //#endregion and JetBrains IDEs' "//noinspection ...", "//region", "//endregion" + if (/^(?:#?(?:end)?region|noinspection\s)/.test(commentText)) { return; }