From 969d39e8d9342b934b4e9e4b2d22f2d46b8cbb80 Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 21 Aug 2015 15:40:28 +0200 Subject: [PATCH] Remove trailing commas in object literals They broke IE 8-9. --- lib/utils/classes.js | 2 +- spec/api/plugin-api.spec.js | 2 +- .../generated-parser-behavior.spec.js | 36 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/utils/classes.js b/lib/utils/classes.js index ec0798a..1ad305e 100644 --- a/lib/utils/classes.js +++ b/lib/utils/classes.js @@ -6,7 +6,7 @@ var classes = { function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); - }, + } }; module.exports = classes; diff --git a/spec/api/plugin-api.spec.js b/spec/api/plugin-api.spec.js index fa53455..9cb82cb 100644 --- a/spec/api/plugin-api.spec.js +++ b/spec/api/plugin-api.spec.js @@ -33,7 +33,7 @@ describe("plugin API", function() { }; return typeof this.actual === "function"; - }, + } }); }); diff --git a/spec/behavior/generated-parser-behavior.spec.js b/spec/behavior/generated-parser-behavior.spec.js index dd524ad..e9b6870 100644 --- a/spec/behavior/generated-parser-behavior.spec.js +++ b/spec/behavior/generated-parser-behavior.spec.js @@ -601,31 +601,31 @@ describe("generated parser behavior", function() { expect(parser).toParse("1\n2\n\n3\n\n\n4 5 x", { start: { offset: 13, line: 7, column: 5 }, - end: { offset: 13, line: 7, column: 5 }, + end: { offset: 13, line: 7, column: 5 } }); /* Non-Unix newlines */ expect(parser).toParse("1\rx", { // Old Mac 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 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 start: { offset: 3, line: 3, column: 1 }, - end: { offset: 3, line: 3, column: 1 }, + end: { offset: 3, line: 3, column: 1 } }); /* Strange newlines */ expect(parser).toParse("1\u2028x", { // line separator 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 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", { start: { offset: 13, line: 7, column: 5 }, - end: { offset: 13, line: 7, column: 5 }, + end: { offset: 13, line: 7, column: 5 } }); /* Non-Unix newlines */ expect(parser).toParse("1\rx", { // Old Mac 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 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 start: { offset: 3, line: 3, column: 1 }, - end: { offset: 3, line: 3, column: 1 }, + end: { offset: 3, line: 3, column: 1 } }); /* Strange newlines */ expect(parser).toParse("1\u2028x", { // line separator 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 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", { start: { offset: 13, line: 7, column: 5 }, - end: { offset: 14, line: 7, column: 6 }, + end: { offset: 14, line: 7, column: 6 } }); /* Non-Unix newlines */ expect(parser).toParse("1\rx", { // Old Mac 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 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 start: { offset: 3, line: 3, column: 1 }, - end: { offset: 4, line: 3, column: 2 }, + end: { offset: 4, line: 3, column: 2 } }); /* Strange newlines */ expect(parser).toParse("1\u2028x", { // line separator 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 start: { offset: 2, line: 2, column: 1 }, - end: { offset: 3, line: 2, column: 2 }, + end: { offset: 3, line: 2, column: 2 } }); });