ricardofbarros / semistandard-format

converts your code into SemiStandard JavaScript Format
28 stars 4 forks source link

Introduces a bug for a for loop corner case #11

Closed tmcw closed 8 years ago

tmcw commented 8 years ago
for (var i = 0; i < 10; i++);
console.log(i);

This statement through node returns

~/src/decode-webp〉node formatter-bug-two.js
10

Run through semistandard-format it produces the following output:

~/src/decode-webp〉semistandard-format formatter-bug-two.js
for (var i = 0; i < 10; i++)
console.log(i);

Which produces the following output:

~/src/decode-webp〉node formatter-bug-two-standard.js
0
1
2
3
4
5
6
7
8
9
tmcw commented 8 years ago

Closing; no action