mathiasrw / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Semicolon is added incorrectly after some function definitions #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Apparently fixjsstyle unconditionally adds a semicolon after every function 
definition, but this sometimes produces a syntax error, e.g.:

$ cat bug.js 
var a = function() {},
    b = 42;
$ node bug.js 
$ fixjsstyle bug.js
Fixed 1 errors in /home/jelle/js/bug.js
$ cat bug.js 
var a = function() {};,
    b = 42;
$ node bug.js

/home/jelle/js/bug.js:1
on (exports, require, module, __filename, __dirname) { var a = function() {};,
                                                                             ^
SyntaxError: Unexpected token ,

What version of the product are you using? On what operating system?

closure-linter 2.3.13 on Ubuntu 12.04

Original issue reported on code.google.com by jelle.zi...@gmail.com on 22 Aug 2014 at 5:31

GoogleCodeExporter commented 9 years ago

Original comment by rum...@google.com on 15 Jan 2015 at 8:52