Repository navigation
v3.0.2
v3.0.2: Safer comment-rule edge cases
require-safety-comment-for-type-assertion now recognizes safety justifications on enclosing statements around unbraced control-flow bodies, and directive-require-description safely skips line comments whose values are not strings.
🐞 Fixed
- require-safety-comment-for-type-assertion: Accepts the enclosing statement's leading
SAFETY:comment for assertions inside unbracedif,for,for...in,for...of,while,do...while, labeled, andwithbodies. For example,// SAFETY: The parser validated every item.\nfor (const item of items) consume(item as User);no longer reports - by @howmanysmall in #62 - directive-require-description: Skips line comments with non-string
valuefields instead of calling string methods on them and throwing while checking directive descriptions - by @howmanysmall in #62
Full Changelog: v3.0.1...v3.0.2