From b196a54a305260994d32c48f09929233a3445cbe Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 6 Sep 2018 09:57:16 -0400 Subject: [PATCH] fix linting --- embark-ui/src/components/Console.js | 2 +- embark-ui/src/reducers/selectors.js | 8 -------- lib/core/processes/processWrapper.js | 4 ++-- lib/modules/coverage/contract_source.js | 4 ++-- lib/modules/profiler/fuzzer.js | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/embark-ui/src/components/Console.js b/embark-ui/src/components/Console.js index 14d78c1d..85cd0218 100644 --- a/embark-ui/src/components/Console.js +++ b/embark-ui/src/components/Console.js @@ -1,6 +1,6 @@ import PropTypes from "prop-types"; import React, {Component} from 'react'; -import {Grid, Card, Form, Tabs, Tab, TabbedHeader, TabbedContainer} from 'tabler-react'; +import {Grid, Card, Form, Tab, TabbedHeader, TabbedContainer} from 'tabler-react'; import Logs from "./Logs"; import Convert from 'ansi-to-html'; diff --git a/embark-ui/src/reducers/selectors.js b/embark-ui/src/reducers/selectors.js index 115344c6..95ca30d6 100644 --- a/embark-ui/src/reducers/selectors.js +++ b/embark-ui/src/reducers/selectors.js @@ -44,18 +44,10 @@ export function getProcesses(state) { return state.entities.processes; } -export function getProcess(state, name) { - return state.entities.processes.find((process) => process.name === name); -} - export function getProcessLogs(state) { return state.entities.processLogs; } -export function getProcessLogsByProcess(state, processName) { - return state.entities.processLogs.filter((processLog => processLog.name === processName)); -} - export function getContractLogsByContract(state, contractName) { return state.entities.contractLogs.filter((contractLog => contractLog.name === contractName)); } diff --git a/lib/core/processes/processWrapper.js b/lib/core/processes/processWrapper.js index 0632d157..8c90d67a 100644 --- a/lib/core/processes/processWrapper.js +++ b/lib/core/processes/processWrapper.js @@ -1,5 +1,5 @@ -process.on('uncaughtException', function(e){ - process.send({error: e.stack}); +process.on('uncaughtException', function(e) { + process.send({error: e.stack}); }); const constants = require('../../constants'); diff --git a/lib/modules/coverage/contract_source.js b/lib/modules/coverage/contract_source.js index 1eb3d135..776444f5 100644 --- a/lib/modules/coverage/contract_source.js +++ b/lib/modules/coverage/contract_source.js @@ -321,7 +321,7 @@ class ContractSource { } } - if(node.type != 'b') coverage[node.type][node.id]++; + if(node.type !== 'b') coverage[node.type][node.id]++; if(!node.parent) return; @@ -341,7 +341,7 @@ class ContractSource { } _instructionLength(instruction) { - if(instruction.indexOf('PUSH') == -1) return 1; + if(instruction.indexOf('PUSH') === -1) return 1; return parseInt(instruction.match(/PUSH(\d+)/m)[1], 10) + 1; } } diff --git a/lib/modules/profiler/fuzzer.js b/lib/modules/profiler/fuzzer.js index c82c682b..cf9c28b7 100644 --- a/lib/modules/profiler/fuzzer.js +++ b/lib/modules/profiler/fuzzer.js @@ -50,7 +50,7 @@ class ContractFuzzer { } case kind === "bool": return self.generateRandomBool(); - case kind == "uint" || kind == "int": + case kind === "uint" || kind === "int": return self.generateRandomInt(size || 256); case kind === "bytes": return self.generateRandomStaticBytes(size || 32);