pull/3642/head
Joseph Izang 2 years ago
parent 84535d4071
commit 8049e5dca9
  1. 18
      apps/solhint/src/app/App.tsx
  2. 7
      apps/solhint/src/app/SolhintPluginClient.ts
  3. 2
      apps/solhint/src/profile.json

@ -1,16 +1,8 @@
import React, { useEffect, useState } from "react" import React, { useEffect, useState } from "react";
import { SolHint } from "./SolhintPluginClient" import { SolHint } from "./SolhintPluginClient";
const client = new SolHint();
const client = new SolHint()
export default function App() { export default function App() {
return <></>;
return ( }
<>
<div className="">
</div>
</>
)
}

@ -1,8 +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'
import { processStr } from 'solhint' import { applyExtends, processStr } from 'solhint'
import { applyExtends } from 'solhint/lib/config/config-file'
import bestPractises from 'solhint/lib/rules/best-practises' import bestPractises from 'solhint/lib/rules/best-practises'
import naming from 'solhint/lib/rules/naming' import naming from 'solhint/lib/rules/naming'
import order from 'solhint/lib/rules/order' import order from 'solhint/lib/rules/order'
@ -30,15 +29,11 @@ const Config = `{
}` }`
export class SolHint extends PluginClient { export class SolHint extends PluginClient {
mdFile: string
eventEmitter: EventEmitter
triggerLinter: boolean triggerLinter: boolean
constructor() { constructor() {
super() super()
this.eventEmitter = new EventEmitter()
this.methods = ['lintContract', 'lintOnCompilation', 'lintContractCustomAction'] this.methods = ['lintContract', 'lintOnCompilation', 'lintContractCustomAction']
createClient(this) createClient(this)
this.mdFile = ''
this.onload().then(async () => { this.onload().then(async () => {
await this.lintOnCompilation() await this.lintOnCompilation()
}) })

@ -11,7 +11,7 @@
], ],
"kind": "none", "kind": "none",
"icon": "https://raw.githubusercontent.com/protofire/solhint/master/solhint-icon.png", "icon": "https://raw.githubusercontent.com/protofire/solhint/master/solhint-icon.png",
"location": "sidePanel", "location": "hiddenPanel",
"url": "", "url": "",
"documentation": "https://remix-plugins.readthedocs.io/en/latest/", "documentation": "https://remix-plugins.readthedocs.io/en/latest/",
"repo": "https://github.com/ethereum/remix-project", "repo": "https://github.com/ethereum/remix-project",

Loading…
Cancel
Save