From 5615d7217eddf1d997c7b7347b8025dca60ad166 Mon Sep 17 00:00:00 2001
From: Will Hunt <half-shot@molrams.com>
Date: Thu, 14 Sep 2017 01:26:43 +0100
Subject: [PATCH] Fixed linting

---
 src/messageprocessor.ts       |  2 +-
 test/test_messageprocessor.ts | 32 +++++++++++++++++++-------------
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/src/messageprocessor.ts b/src/messageprocessor.ts
index f276324..8142611 100644
--- a/src/messageprocessor.ts
+++ b/src/messageprocessor.ts
@@ -47,7 +47,7 @@ export class MessageProcessor {
     }
 
     public InsertEmbeds(content: string, msg: Discord.Message): string {
-        for (let embed of msg.embeds) {
+        for (const embed of msg.embeds) {
             let embedContent = "\n----\n"; // Horizontal rule.
             const embedTitle = embed.url ? `[${embed.title}](${embed.url})` : embed.title;
             embedContent += embedTitle != null ? `#### ${embedTitle}\n\n${embed.description}` : embed.description;
diff --git a/test/test_messageprocessor.ts b/test/test_messageprocessor.ts
index b8b39ee..71b527e 100644
--- a/test/test_messageprocessor.ts
+++ b/test/test_messageprocessor.ts
@@ -170,9 +170,9 @@ describe("MessageProcessor", () => {
             const msg = new Discord.Message(null, null, null);
             msg.embeds = [
                 new Discord.MessageEmbed(msg, {
-                    description: "TestDescription"
-                })
-            ]
+                    description: "TestDescription",
+                }),
+            ];
             const inContent = "";
             const content = processor.InsertEmbeds(inContent, msg);
             Chai.assert.equal(content, "\n----\nTestDescription");
@@ -184,8 +184,8 @@ describe("MessageProcessor", () => {
                 new Discord.MessageEmbed(msg, {
                     title: "TestTitle",
                     description: "TestDescription",
-                })
-            ]
+                }),
+            ];
             const inContent = "";
             const content = processor.InsertEmbeds(inContent, msg);
             Chai.assert.equal(content, "\n----\n#### TestTitle\n\nTestDescription");
@@ -198,8 +198,8 @@ describe("MessageProcessor", () => {
                     title: "TestTitle",
                     url: "testurl",
                     description: "TestDescription",
-                })
-            ]
+                }),
+            ];
             const inContent = "";
             const content = processor.InsertEmbeds(inContent, msg);
             Chai.assert.equal(content, "\n----\n#### [TestTitle](testurl)\n\nTestDescription");
@@ -217,11 +217,14 @@ describe("MessageProcessor", () => {
                     title: "TestTitle2",
                     url: "testurl2",
                     description: "TestDescription2",
-                })
-            ]
+                }),
+            ];
             const inContent = "";
             const content = processor.InsertEmbeds(inContent, msg);
-            Chai.assert.equal(content, "\n----\n#### [TestTitle](testurl)\n\nTestDescription\n----\n#### [TestTitle2](testurl2)\n\nTestDescription2");
+            Chai.assert.equal(
+                content,
+"\n----\n#### [TestTitle](testurl)\n\nTestDescription\n----\n#### [TestTitle2](testurl2)\n\nTestDescription2",
+            );
         });
         it("inserts embeds properly", () => {
             const processor = new MessageProcessor(new MessageProcessorOpts("localhost"), <DiscordBot> bot);
@@ -231,11 +234,14 @@ describe("MessageProcessor", () => {
                     title: "TestTitle",
                     url: "testurl",
                     description: "TestDescription",
-                })
-            ]
+                }),
+            ];
             const inContent = "Content that goes in the message";
             const content = processor.InsertEmbeds(inContent, msg);
-            Chai.assert.equal(content, "Content that goes in the message\n----\n#### [TestTitle](testurl)\n\nTestDescription");
+            Chai.assert.equal(
+                content,
+                "Content that goes in the message\n----\n#### [TestTitle](testurl)\n\nTestDescription",
+            );
         });
     });
 });
-- 
GitLab