From 4a16e0798c46f1e03f6f595aba8a5a7c66d9d06c Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 25 Jun 2021 10:38:28 +0530 Subject: [PATCH] linting fix --- .../src/lib/remix-ui-static-analyser.tsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 780db91400..2e3329736e 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -134,10 +134,10 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { const showWarningsByModule = (showOnlyModule: string) => { let count = 0 - if(allWarnings[showOnlyModule]) { + if (allWarnings[showOnlyModule]) { const newWarningState = {} newWarningState[showOnlyModule] = allWarnings[showOnlyModule] - setWarningState({[showOnlyModule]: allWarnings[showOnlyModule]}) + setWarningState({ [showOnlyModule]: allWarnings[showOnlyModule] }) count = allWarnings[showOnlyModule].length } else if (showOnlyModule === 'all') { setWarningState(allWarnings) @@ -153,7 +153,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { const warningMessage = [] const warningErrors = [] - /******************** Remix Analysis ********************/ + // Remix Analysis runner.run(lastCompilationResult, categoryIndex, results => { results.map((result) => { let moduleName @@ -207,7 +207,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { warningMessage.push({ msg, options, hasWarning: true, warningModuleName: moduleName }) }) }) - /******************** Slither Analysis ********************/ + // Slither Analysis if (slitherEnabled) { props.analysisModule.call('solidity-logic', 'getCompilerState').then((compilerState) => { const { currentVersion, optimize, evmVersion } = compilerState @@ -245,7 +245,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { fileName, errLine: row, errCol: column, - item: { warning: item.description}, + item: { warning: item.description }, name: item.title, locationString, more: item.more, @@ -265,8 +265,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { setShowSlitherResult('node') if (categoryIndex.length > 0) { props.event.trigger('staticAnaysisWarning', [warningCount]) + } } - } }) } else { if (categoryIndex.length) { @@ -451,15 +451,15 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
- {}} - display = {showSlitherResult} - /> + {}} + display = {showSlitherResult} + />

{Object.entries(warningState).length > 0 && @@ -469,8 +469,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { (Object.entries(warningState).map((element, index) => (
{element[0]} - {element[1]['map']((x, i) => ( - x.hasWarning ? ( + {element[1]['map']((x, i) => ( // eslint-disable-line dot-notation + x.hasWarning ? ( // eslint-disable-next-line dot-notation