From fe950192e7d3aa6f4a3799c1bf54d701dd9b6c49 Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Tue, 8 Jan 2019 23:38:02 +0100 Subject: [PATCH] Fix ESLint errors (#793) This fixes failing `npm run lint`: - fixes `max-len` issue in code by reformat of the expression - exempt ES6 template literals from `max-len` rule using ESLint configuration change Thanks! --- .eslintrc | 2 +- client/modules/IDE/components/PreviewFrame.jsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index f3aa91ab..9c9b874a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -20,7 +20,7 @@ "no-console": 0, "no-alert": 0, "no-underscore-dangle": 0, - "max-len": [1, 120, 2, {ignoreComments: true}], + "max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}], "quote-props": [1, "consistent-as-needed"], "no-unused-vars": [1, {"vars": "local", "args": "none"}], "consistent-return": ["error", { "treatUndefinedAsUnspecified": true }], diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 712ccceb..b3f9fade 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -81,7 +81,10 @@ class PreviewFrame extends React.Component { handleConsoleEvent(messageEvent) { if (Array.isArray(messageEvent.data)) { - const decodedMessages = messageEvent.data.map(message => Object.assign(Decode(message.log), { source: message.source })); + const decodedMessages = messageEvent.data.map(message => + Object.assign(Decode(message.log), { + source: message.source + })); decodedMessages.every((message, index, arr) => { const { data: args } = message;