From 62708cf6b2f2579cd57c870a3905c2060ad3a620 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Fri, 18 Sep 2020 18:03:44 +0300 Subject: [PATCH] Fixed es-lint warnings and increased upper warning limit --- .travis.yml | 2 +- .../pages/RunMonkeyPage/InterfaceSelection.js | 15 +-------------- .../pages/RunMonkeyPage/LocalManualRunOptions.js | 1 - .../cc/ui/src/components/ui-components/Emoji.js | 8 ++++---- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7715ff328..092090d23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,7 +89,7 @@ script: - cd monkey_island/cc/ui - npm ci # See https://docs.npmjs.com/cli/ci.html - eslint ./src --quiet # Test for errors -- JS_WARNINGS_AMOUNT_UPPER_LIMIT=4 +- JS_WARNINGS_AMOUNT_UPPER_LIMIT=8 - eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT # Test for max warnings # Build documentation diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/InterfaceSelection.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/InterfaceSelection.js index 542edb568..6e1e9ca02 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/InterfaceSelection.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/InterfaceSelection.js @@ -1,7 +1,5 @@ -import React, {useEffect, useState} from 'react'; -import NextSelectionButton from '../../ui-components/inline-selection/NextSelectionButton'; +import React from 'react'; import InlineSelection from '../../ui-components/inline-selection/InlineSelection'; -import CommandSection from '../../ui-components/inline-selection/CommandSection'; import LocalManualRunOptions from './LocalManualRunOptions'; function InterfaceSelection(props) { @@ -15,15 +13,4 @@ const getContents = (props) => { return (
{ips}
); } -const setCommandAsContent = (props) => { - let commandComponent = () => InlineSelection(CommandSection, - { - commands: win64commands, - setComponent: props.setComponent - }, - LocalManualRunOptions - ); - props.setComponent(commandComponent, props); -} - export default InterfaceSelection; diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/LocalManualRunOptions.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/LocalManualRunOptions.js index 7c0838a80..3bd8accae 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/LocalManualRunOptions.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/LocalManualRunOptions.js @@ -7,7 +7,6 @@ import GenerateLocalWindowsPowershell from './commands/local_windows_powershell' import GenerateLocalLinuxWget from './commands/local_linux_wget'; import GenerateLocalLinuxCurl from './commands/local_linux_curl'; import CommandDisplay from './CommandDisplay'; -import RunOptions from './RunOptions'; const LocalManualRunOptions = (props) => { diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/Emoji.js b/monkey/monkey_island/cc/ui/src/components/ui-components/Emoji.js index 1773efbd2..580103500 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/Emoji.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/Emoji.js @@ -1,10 +1,10 @@ import React from 'react'; const Emoji = props => ( {props.symbol}