- one console.assert missing semicolon, assumed to be multi-line, not stripped
- one console.assert inside of a for loop without braces, results in following line accidentally looping!
I plan on adding a WARNING to catch the second error.
With the new warning, and a script to process each JS file of ours, this is the output I see:
WARNING: console.assert inside control flow statement without braces on line: 556: console.assert(contentFlow.contentNodes[i].id === flowPayload.content[i]);
WARNING: Multi-line console.assert on line 775: console.assert(!child.isPlaceholderNode, "Shouldn't delete the placeholder node.")
If the line ends in a ')' then its likely not multi-line and just a missing semicolon. Changed that warning to:
WARNING: console.assert missing trailing semicolon on line 775: console.assert(!child.isPlaceholderNode, "Shouldn't delete the placeholder node.")
Created attachment 226560 [details]
[PATCH] Proposed Fix