You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "Include a description after the '@"+directiveName+"' directive to explain why the '@"+directiveName+"' is necessary. The description must be "+formatMinimumDescLength(minDescLength) +" characters long.",
280
-
},
281
-
)
282
-
return
283
-
}
284
-
285
-
// Check minimum description length (counting grapheme clusters for Unicode)
Description: "The description for the '@"+directiveName+"' directive must be "+formatMinimumDescLength(minDescLength) +" characters long.",
275
+
Id: "tsDirectiveCommentRequiresDescription",
276
+
Description: "Include a description after the '@"+directiveName+"' directive to explain why the '@"+directiveName+"' is necessary. The description must be "+formatMinimumDescLength(minDescLength) +" characters long.",
{Code: "// @ts-expect-error: This is a very long description that exceeds minimum\nconst a = 0;", Options: map[string]interface{}{"ts-expect-error": "allow-with-description", "minimumDescriptionLength": 10}},
// Colon with single char (": a" = 3 chars, exactly at minimum)
34
+
{Code: "// @ts-expect-error: a\nconst a = 0;", Options: map[string]interface{}{"ts-expect-error": "allow-with-description"}},
35
+
// Multi-line with colon separator
36
+
{Code: "/* @ts-expect-error: ab */\nconst a = 0;", Options: map[string]interface{}{"ts-expect-error": "allow-with-description"}},
37
+
29
38
// ts-expect-error - description format
30
39
{Code: "// @ts-expect-error: TS1234 because reasons\nconst a = 0;", Options: map[string]interface{}{"ts-expect-error": map[string]interface{}{"descriptionFormat": "^: TS\\d+ because .+$"}}},
31
40
{Code: "// @ts-expect-error: TS2345 because type mismatch\nconst a = 0;", Options: map[string]interface{}{"ts-expect-error": map[string]interface{}{"descriptionFormat": "^: TS\\d+ because .+$"}}},
0 commit comments