diff --git a/apps/etherscan/src/app/EtherscanPluginClient.ts b/apps/etherscan/src/app/EtherscanPluginClient.ts index 87e26acdb4..3d1bf22d94 100644 --- a/apps/etherscan/src/app/EtherscanPluginClient.ts +++ b/apps/etherscan/src/app/EtherscanPluginClient.ts @@ -1,7 +1,7 @@ -import {PluginClient} from '@remixproject/plugin' +import { PluginClient } from '@remixproject/plugin' import { createClient } from '@remixproject/plugin-webview' -import {verify, EtherScanReturn} from './utils/verify' -import {getReceiptStatus, getEtherScanApi, getNetworkName, getProxyContractReceiptStatus} from './utils' +import { verify, EtherScanReturn } from './utils/verify' +import { getReceiptStatus, getEtherScanApi, getNetworkName, getProxyContractReceiptStatus } from './utils' import EventManager from 'events' export class EtherscanPluginClient extends PluginClient { @@ -46,7 +46,7 @@ export class EtherscanPluginClient extends PluginClient { async receiptStatus(receiptGuid: string, apiKey: string, isProxyContract: boolean) { try { - const {network, networkId} = await getNetworkName(this) + const { network, networkId } = await getNetworkName(this) if (network === 'vm') { throw new Error('Cannot check the receipt status in the selected network') } diff --git a/apps/etherscan/src/app/utils/utilities.ts b/apps/etherscan/src/app/utils/utilities.ts index f0f92ab6f7..048b6e2335 100644 --- a/apps/etherscan/src/app/utils/utilities.ts +++ b/apps/etherscan/src/app/utils/utilities.ts @@ -4,7 +4,7 @@ import { scanAPIurls } from "./networks" type RemixClient = PluginClient /* - status: 0=Error, 1=Pass + status: 0=Error, 1=Pass message: OK, NOTOK result: explanation */ @@ -14,7 +14,7 @@ export type receiptStatus = { status: string } -export const getEtherScanApi = (networkId: any) => { +export const getEtherScanApi = (networkId: any) => { if (!(networkId in scanAPIurls)) { throw new Error("no known network to verify against") } @@ -26,7 +26,7 @@ export const getNetworkName = async (client: RemixClient) => { const network = await client.call("network", "detectNetwork") if (!network) { throw new Error("no known network to verify against") - } + } return { network: network.name!.toLowerCase(), networkId: network.id } } diff --git a/apps/etherscan/src/app/utils/verify.ts b/apps/etherscan/src/app/utils/verify.ts index 4dbc70f743..41b74c0e2e 100644 --- a/apps/etherscan/src/app/utils/verify.ts +++ b/apps/etherscan/src/app/utils/verify.ts @@ -23,7 +23,7 @@ export const verify = async ( compilationResultParam: CompilerAbstract, chainRef: number | string, isProxyContract: boolean, - expectedImplAddress: string, + expectedImplAddress: string, client: PluginClient, onVerifiedContract: (value: EtherScanReturn) => void, setResults: (value: string) => void @@ -47,7 +47,7 @@ export const verify = async ( etherscanApi = getEtherScanApi(networkChainId) } } - + try { const contractMetadata = getContractMetadata( // cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository @@ -61,7 +61,7 @@ export const verify = async ( message: "Please recompile contract" } } - + const contractMetadataParsed = JSON.parse(contractMetadata) const fileName = getContractFileName( @@ -146,9 +146,9 @@ export const verify = async ( title: result, }) const returnValue = { - message: result, - succeed: false, - isProxyContract + message: result, + succeed: false, + isProxyContract } resetAfter10Seconds(client, setResults) return returnValue @@ -184,7 +184,7 @@ export const getContractFileName = ( } return fileName } - + export const getContractMetadata = ( compilationResult: CompilationResult, contractName: string diff --git a/apps/solhint/.eslintrc b/apps/solhint/.eslintrc index 2d85f9fa66..b24495e5e9 100644 --- a/apps/solhint/.eslintrc +++ b/apps/solhint/.eslintrc @@ -1,3 +1,18 @@ { "extends": "../../.eslintrc.json", + "overrides": [ + { + "files": [ + "*.ts", + "*.tsx", + "*.js", + "*.jsx" + ], + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ + "warn" + ] + } + } + ] } \ No newline at end of file diff --git a/apps/solhint/src/app/SolhintPluginClient.ts b/apps/solhint/src/app/SolhintPluginClient.ts index e386096114..0673f651e4 100644 --- a/apps/solhint/src/app/SolhintPluginClient.ts +++ b/apps/solhint/src/app/SolhintPluginClient.ts @@ -1,6 +1,7 @@ import { PluginClient } from '@remixproject/plugin' import { createClient } from '@remixproject/plugin-webview' import EventEmitter from 'events' +// eslint-disable @nrwl/nx/enforce-module-boundaries import { processStr } from 'solhint' import { applyExtends } from 'solhint/lib/config/config-file' import bestPractises from 'solhint/lib/rules/best-practises'