Remove trailing commas in object literals

They broke IE 8-9.
redux
David Majda 9 years ago
parent 2d0ab55fa2
commit 969d39e8d9

@ -6,7 +6,7 @@ var classes = {
function ctor() { this.constructor = child; } function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype; ctor.prototype = parent.prototype;
child.prototype = new ctor(); child.prototype = new ctor();
}, }
}; };
module.exports = classes; module.exports = classes;

@ -33,7 +33,7 @@ describe("plugin API", function() {
}; };
return typeof this.actual === "function"; return typeof this.actual === "function";
}, }
}); });
}); });

@ -601,31 +601,31 @@ describe("generated parser behavior", function() {
expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", { expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", {
start: { offset: 13, line: 7, column: 5 }, start: { offset: 13, line: 7, column: 5 },
end: { offset: 13, line: 7, column: 5 }, end: { offset: 13, line: 7, column: 5 }
}); });
/* Non-Unix newlines */ /* Non-Unix newlines */
expect(parser).toParse("1\rx", { // Old Mac expect(parser).toParse("1\rx", { // Old Mac
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 2, line: 2, column: 1 }, end: { offset: 2, line: 2, column: 1 }
}); });
expect(parser).toParse("1\r\nx", { // Windows expect(parser).toParse("1\r\nx", { // Windows
start: { offset: 3, line: 2, column: 1 }, start: { offset: 3, line: 2, column: 1 },
end: { offset: 3, line: 2, column: 1 }, end: { offset: 3, line: 2, column: 1 }
}); });
expect(parser).toParse("1\n\rx", { // mismatched expect(parser).toParse("1\n\rx", { // mismatched
start: { offset: 3, line: 3, column: 1 }, start: { offset: 3, line: 3, column: 1 },
end: { offset: 3, line: 3, column: 1 }, end: { offset: 3, line: 3, column: 1 }
}); });
/* Strange newlines */ /* Strange newlines */
expect(parser).toParse("1\u2028x", { // line separator expect(parser).toParse("1\u2028x", { // line separator
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 2, line: 2, column: 1 }, end: { offset: 2, line: 2, column: 1 }
}); });
expect(parser).toParse("1\u2029x", { // paragraph separator expect(parser).toParse("1\u2029x", { // paragraph separator
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 2, line: 2, column: 1 }, end: { offset: 2, line: 2, column: 1 }
}); });
}); });
}); });
@ -814,31 +814,31 @@ describe("generated parser behavior", function() {
expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", { expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", {
start: { offset: 13, line: 7, column: 5 }, start: { offset: 13, line: 7, column: 5 },
end: { offset: 13, line: 7, column: 5 }, end: { offset: 13, line: 7, column: 5 }
}); });
/* Non-Unix newlines */ /* Non-Unix newlines */
expect(parser).toParse("1\rx", { // Old Mac expect(parser).toParse("1\rx", { // Old Mac
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 2, line: 2, column: 1 }, end: { offset: 2, line: 2, column: 1 }
}); });
expect(parser).toParse("1\r\nx", { // Windows expect(parser).toParse("1\r\nx", { // Windows
start: { offset: 3, line: 2, column: 1 }, start: { offset: 3, line: 2, column: 1 },
end: { offset: 3, line: 2, column: 1 }, end: { offset: 3, line: 2, column: 1 }
}); });
expect(parser).toParse("1\n\rx", { // mismatched expect(parser).toParse("1\n\rx", { // mismatched
start: { offset: 3, line: 3, column: 1 }, start: { offset: 3, line: 3, column: 1 },
end: { offset: 3, line: 3, column: 1 }, end: { offset: 3, line: 3, column: 1 }
}); });
/* Strange newlines */ /* Strange newlines */
expect(parser).toParse("1\u2028x", { // line separator expect(parser).toParse("1\u2028x", { // line separator
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 2, line: 2, column: 1 }, end: { offset: 2, line: 2, column: 1 }
}); });
expect(parser).toParse("1\u2029x", { // paragraph separator expect(parser).toParse("1\u2029x", { // paragraph separator
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 2, line: 2, column: 1 }, end: { offset: 2, line: 2, column: 1 }
}); });
}); });
}); });
@ -1232,31 +1232,31 @@ describe("generated parser behavior", function() {
expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", { expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", {
start: { offset: 13, line: 7, column: 5 }, start: { offset: 13, line: 7, column: 5 },
end: { offset: 14, line: 7, column: 6 }, end: { offset: 14, line: 7, column: 6 }
}); });
/* Non-Unix newlines */ /* Non-Unix newlines */
expect(parser).toParse("1\rx", { // Old Mac expect(parser).toParse("1\rx", { // Old Mac
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 3, line: 2, column: 2 }, end: { offset: 3, line: 2, column: 2 }
}); });
expect(parser).toParse("1\r\nx", { // Windows expect(parser).toParse("1\r\nx", { // Windows
start: { offset: 3, line: 2, column: 1 }, start: { offset: 3, line: 2, column: 1 },
end: { offset: 4, line: 2, column: 2 }, end: { offset: 4, line: 2, column: 2 }
}); });
expect(parser).toParse("1\n\rx", { // mismatched expect(parser).toParse("1\n\rx", { // mismatched
start: { offset: 3, line: 3, column: 1 }, start: { offset: 3, line: 3, column: 1 },
end: { offset: 4, line: 3, column: 2 }, end: { offset: 4, line: 3, column: 2 }
}); });
/* Strange newlines */ /* Strange newlines */
expect(parser).toParse("1\u2028x", { // line separator expect(parser).toParse("1\u2028x", { // line separator
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 3, line: 2, column: 2 }, end: { offset: 3, line: 2, column: 2 }
}); });
expect(parser).toParse("1\u2029x", { // paragraph separator expect(parser).toParse("1\u2029x", { // paragraph separator
start: { offset: 2, line: 2, column: 1 }, start: { offset: 2, line: 2, column: 1 },
end: { offset: 3, line: 2, column: 2 }, end: { offset: 3, line: 2, column: 2 }
}); });
}); });

Loading…
Cancel
Save