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!
This commit is contained in:
Peter Blazejewicz 2019-01-08 23:38:02 +01:00 committed by Cassie Tarakajian
parent 89fa0904af
commit fe950192e7
2 changed files with 5 additions and 2 deletions

View file

@ -20,7 +20,7 @@
"no-console": 0, "no-console": 0,
"no-alert": 0, "no-alert": 0,
"no-underscore-dangle": 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"], "quote-props": [1, "consistent-as-needed"],
"no-unused-vars": [1, {"vars": "local", "args": "none"}], "no-unused-vars": [1, {"vars": "local", "args": "none"}],
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }], "consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],

View file

@ -81,7 +81,10 @@ class PreviewFrame extends React.Component {
handleConsoleEvent(messageEvent) { handleConsoleEvent(messageEvent) {
if (Array.isArray(messageEvent.data)) { 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) => { decodedMessages.every((message, index, arr) => {
const { data: args } = message; const { data: args } = message;