Closed qx-bug-importer closed 8 years ago
Martin Wittemann (@wittemann) wrote:
The editor uses JSLint internally (the editor itself is an external component we just use) so thats where the differences come from. In general, the lint check could warn about missing semicolons too.
Thomas Herchenroeder (@thron7) wrote:
The problem with lint warning about missing semicolons is that our lint module doesn't see any semicolons at all! It is looking at the AST which doesn't contain any semicolons. So with the existing infrastructure it would not be straight forward to implement that feature.
(Possible approaches would be to (a) have the parser warn about missing semicolons (but we have just removed all warnings from the parser to have them only in the lint module), or (b) construct two syntax trees, one "concrete" that retains all punctuation and is later transformed into an abstract tree; the concrete tree could then be used for the semicolon checking (this could be used to other advantages as well)).
Martin Wittemann (@wittemann) wrote:
I then mark the bug as wontfix. First, we will always have differences between our custom lint and the JSLint which is used by the playground. Additionally, checking for semicolons would be too much work to implement.
(oliverst) wrote:
When passing demos or examples with missing semicolons to the playground the editor will show a warning. The code will run though. Maybe the check for missing semicolons should also added to the generator - at least in the "lint" mode.
assigned to Thomas Herchenroeder (@thron7)