error-message
believes that a joined array is empty when elements are conditionally pushed
#2265
Labels
error-message
believes that a joined array is empty when elements are conditionally pushed
#2265
Code like the below appears in TypeScript's test runner; an array is used to collect error messages, which are joined and thrown when non-empty. But,
error-message
thinks that this error list could be empty (though the length is checked) and errors.(Personally, I think that this check is a little too strong; it's not clear that a linter can really "prove" that an array is or isn't empty, so using that info in the lint feels iffy. But, there's a length check, which is theoretically enough for this case.)
The text was updated successfully, but these errors were encountered: