Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

adds illegal semicolon when a function is assigned to a variable in the middle of statements #87

Open
GoogleCodeExporter opened this issue Jun 17, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. write javascript code like
for exameple, if you `fixjsstyle` some code such as
```javascript
var a = 1,
    b = 3,
    c = {},
    d = function() {},
    e = "asdf";

the result will look like this.
var a = function() {},
b = "asdf";
2. run fixjsstyle

expected result:
var a = function() {},
b = 'asdf';

but I get
var a = function() {};,
b = 'asdf';

due to that semicolon before comma(,) the result is wrong.

linux closure-linter 2.2.6

i attach a patch here.

Thank you


Original issue reported on code.google.com by `[email protected]` on 19 Jan 2015 at 9:40

Attachments:
* [ecmalintrules.patch](https://storage.googleapis.com/google-code-attachments/closure-linter/issue-87/comment-0/ecmalintrules.patch)
@pepa65
Copy link

pepa65 commented Jan 24, 2016

Yes, the fixer should never insert a semicolon before a comma.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants