fixing linting for etherscan

linter rules for solhint
pull/5370/head
lianahus 7 months ago
parent d663e14efc
commit 260130339a
  1. 8
      apps/etherscan/src/app/EtherscanPluginClient.ts
  2. 15
      apps/solhint/.eslintrc
  3. 1
      apps/solhint/src/app/SolhintPluginClient.ts

@ -1,7 +1,7 @@
import {PluginClient} from '@remixproject/plugin' import { PluginClient } from '@remixproject/plugin'
import { createClient } from '@remixproject/plugin-webview' import { createClient } from '@remixproject/plugin-webview'
import {verify, EtherScanReturn} from './utils/verify' import { verify, EtherScanReturn } from './utils/verify'
import {getReceiptStatus, getEtherScanApi, getNetworkName, getProxyContractReceiptStatus} from './utils' import { getReceiptStatus, getEtherScanApi, getNetworkName, getProxyContractReceiptStatus } from './utils'
import EventManager from 'events' import EventManager from 'events'
export class EtherscanPluginClient extends PluginClient { export class EtherscanPluginClient extends PluginClient {
@ -46,7 +46,7 @@ export class EtherscanPluginClient extends PluginClient {
async receiptStatus(receiptGuid: string, apiKey: string, isProxyContract: boolean) { async receiptStatus(receiptGuid: string, apiKey: string, isProxyContract: boolean) {
try { try {
const {network, networkId} = await getNetworkName(this) const { network, networkId } = await getNetworkName(this)
if (network === 'vm') { if (network === 'vm') {
throw new Error('Cannot check the receipt status in the selected network') throw new Error('Cannot check the receipt status in the selected network')
} }

@ -1,3 +1,18 @@
{ {
"extends": "../../.eslintrc.json", "extends": "../../.eslintrc.json",
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"warn"
]
}
}
]
} }

@ -1,6 +1,7 @@
import { PluginClient } from '@remixproject/plugin' import { PluginClient } from '@remixproject/plugin'
import { createClient } from '@remixproject/plugin-webview' import { createClient } from '@remixproject/plugin-webview'
import EventEmitter from 'events' import EventEmitter from 'events'
// eslint-disable @nrwl/nx/enforce-module-boundaries
import { processStr } from 'solhint' import { processStr } from 'solhint'
import { applyExtends } from 'solhint/lib/config/config-file' import { applyExtends } from 'solhint/lib/config/config-file'
import bestPractises from 'solhint/lib/rules/best-practises' import bestPractises from 'solhint/lib/rules/best-practises'

Loading…
Cancel
Save