From 6f451bd2ecb87b987bb30b6685100fd5bf04d1ee Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 31 Aug 2021 10:47:06 +0200 Subject: [PATCH] linting --- apps/remix-ide/src/app/tabs/compile-tab.js | 9 +----- libs/remix-lib/src/index.ts | 5 +--- libs/remix-lib/src/types/ICompilerApi.ts | 28 ++----------------- libs/remix-ui/solidity-compiler/src/index.ts | 2 +- .../src/lib/actions/compiler.ts | 9 ------ .../solidity-compiler/src/lib/types/index.ts | 12 +------- 6 files changed, 6 insertions(+), 59 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index e451ffd1f3..fdbcb02425 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -5,12 +5,9 @@ import { SolidityCompiler } from '@remix-ui/solidity-compiler' // eslint-disable import { CompileTabLogic } from '@remix-ui/solidity-compiler' // eslint-disable-line import { CompilerApiMixin } from '@remixproject/solidity-compiler-plugin' import { ViewPlugin } from '@remixproject/engine-web' -<<<<<<< HEAD + import QueryParams from '../../lib/query-params' // import { ICompilerApi } from '@remix-project/remix-lib-ts' -======= -import { ICompilerApi } from '@remix-project/remix-lib-ts' ->>>>>>> 49c62946c (better org of types) import * as packageJson from '../../../../../package.json' const yo = require('yo-yo') @@ -36,11 +33,7 @@ const profile = { // - methods: ['getCompilationResult'] class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerApi -<<<<<<< HEAD constructor (config, fileManager) { -======= - constructor () { ->>>>>>> 49c62946c (better org of types) super(profile) this.fileManager = fileManager this.config = config diff --git a/libs/remix-lib/src/index.ts b/libs/remix-lib/src/index.ts index 51be11a255..5295649938 100644 --- a/libs/remix-lib/src/index.ts +++ b/libs/remix-lib/src/index.ts @@ -18,11 +18,8 @@ import * as typeConversion from './execution/typeConversion' import { TxRunnerVM } from './execution/txRunnerVM' import { TxRunnerWeb3 } from './execution/txRunnerWeb3' import * as txResultHelper from './helpers/txResultHelper' -<<<<<<< HEAD + export { ICompilerApi, ConfigurationSettings } from './types/ICompilerApi' -======= -export { ICompilerApi, ConfigurationSettings} from './types/ICompilerApi' ->>>>>>> 49c62946c (better org of types) const helpers = { ui: uiHelper, diff --git a/libs/remix-lib/src/types/ICompilerApi.ts b/libs/remix-lib/src/types/ICompilerApi.ts index dc8ba3101d..d70885434a 100644 --- a/libs/remix-lib/src/types/ICompilerApi.ts +++ b/libs/remix-lib/src/types/ICompilerApi.ts @@ -7,7 +7,6 @@ export interface ICompilerApi { compileTabLogic: any contractsDetails: Record configurationSettings: ConfigurationSettings -<<<<<<< HEAD getCompilerParameters: () => ConfigurationSettings setCompilerParameters: (ConfigurationSettings?) => void @@ -20,19 +19,6 @@ export interface ICompilerApi { getCompilationResult: () => any -======= - - setHardHatCompilation: (value: boolean) => void - getParameters: () => any - setParameters: (params) => void - getConfiguration: (value: string) => string - setConfiguration: (name: string, value: string) => void - getFileManagerMode: () => string - setCompilerConfig: (settings: any) => void - - getCompilationResult: () => any - ->>>>>>> 49c62946c (better org of types) onCurrentFileChanged: (fileName: string) => void onResetResults: () => void, onSetWorkspace: (workspace: any) => void @@ -40,17 +26,13 @@ export interface ICompilerApi { onCompilationFinished: (contractsDetails: any, contractMap: any) => void onSessionSwitched: () => void onContentChanged: () => void -<<<<<<< HEAD resolveContentAndSave: (url: string) => Promise -======= - ->>>>>>> 49c62946c (better org of types) + fileExists: (file: string) => Promise writeFile: (file: string, content: string) => Promise readFile: (file: string) => Promise open: (file: string) => void -<<<<<<< HEAD saveCurrentFile: () => void logToTerminal: (log: terminalLog) => {} @@ -62,9 +44,6 @@ export type terminalLog = { type: 'info' | 'error' | 'warning' value: string } -======= - } ->>>>>>> 49c62946c (better org of types) export interface ConfigurationSettings { version: string, @@ -72,8 +51,5 @@ export interface ConfigurationSettings { language: string, optimize: boolean, runs: string -<<<<<<< HEAD -} -======= + } ->>>>>>> 49c62946c (better org of types) diff --git a/libs/remix-ui/solidity-compiler/src/index.ts b/libs/remix-ui/solidity-compiler/src/index.ts index 30a13c42f4..317c79cefa 100644 --- a/libs/remix-ui/solidity-compiler/src/index.ts +++ b/libs/remix-ui/solidity-compiler/src/index.ts @@ -1,2 +1,2 @@ export * from './lib/solidity-compiler' -export * from './lib/logic' \ No newline at end of file +export * from './lib/logic' diff --git a/libs/remix-ui/solidity-compiler/src/lib/actions/compiler.ts b/libs/remix-ui/solidity-compiler/src/lib/actions/compiler.ts index afdcb09795..bc43ed73b1 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/actions/compiler.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/actions/compiler.ts @@ -26,11 +26,7 @@ export const resetCompilerMode = () => (dispatch: React.Dispatch) => { }) } -<<<<<<< HEAD export const listenToEvents = (compileTabLogic: CompileTabLogic, api) => (dispatch: React.Dispatch) => { -======= -export const listenToEvents = (compileTabLogic, api) => (dispatch: React.Dispatch) => { ->>>>>>> 5a22644c4 (fix iframe plugin api) api.onSessionSwitched = () => { dispatch(setEditorMode('sessionSwitched')) } @@ -46,11 +42,6 @@ export const listenToEvents = (compileTabLogic, api) => (dispatch: React.Dispatc api.onContentChanged = () => { dispatch(setEditorMode('contentChanged')) } -<<<<<<< HEAD - -======= - ->>>>>>> 5a22644c4 (fix iframe plugin api) compileTabLogic.compiler.event.register('loadingCompiler', () => { dispatch(setCompilerMode('loadingCompiler')) }) diff --git a/libs/remix-ui/solidity-compiler/src/lib/types/index.ts b/libs/remix-ui/solidity-compiler/src/lib/types/index.ts index d1cb987169..5c33ffec17 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/types/index.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/types/index.ts @@ -1,16 +1,9 @@ import { ICompilerApi, ConfigurationSettings } from '@remix-project/remix-lib-ts' -<<<<<<< HEAD import { CompileTabLogic } from '../logic/compileTabLogic' export type onCurrentFileChanged = (fileName: string) => void export interface SolidityCompilerProps { api: ICompilerApi -======= -export type onCurrentFileChanged = (fileName: string) => void - -export interface SolidityCompilerProps { - plugin: ICompilerApi ->>>>>>> 49c62946c (better org of types) } export interface CompilerContainerProps { @@ -30,8 +23,5 @@ export interface ContractSelectionProps { } | Record, modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, contractsDetails: Record -<<<<<<< HEAD -} -======= + } ->>>>>>> 49c62946c (better org of types)