Commit 2789b546 authored by gxkai's avatar gxkai

lint: 调整

parent b88a6fcd
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"plugins": ["@typescript-eslint", "@nrwl/nx"], "plugins": ["@typescript-eslint", "@nrwl/nx"],
"extends": "standard", "extends": "standard",
"rules": { "rules": {
"no-useless-escape": "off"
}, },
"overrides": [ "overrides": [
{ {
......
...@@ -165,27 +165,27 @@ class App { ...@@ -165,27 +165,27 @@ class App {
registry.put({ api: self._components.filesProviders, name: 'fileproviders' }) registry.put({ api: self._components.filesProviders, name: 'fileproviders' })
migrateFileSystem(self._components.filesProviders.browser) migrateFileSystem(self._components.filesProviders.browser)
// 请求token // 请求token
window.parent.postMessage({event: 'getToken'}, '\*') window.parent.postMessage({ event: 'getToken' }, '\*')
window.addEventListener("message", this.handleListenMessage, false) window.addEventListener('message', this.handleListenMessage, false)
} }
handleListenMessage(event$){ handleListenMessage (event$) {
const {event,data} = event$.data const { event, data } = event$.data
if (!event) return if (!event) return
// 接收token // 接收token
if (event === 'giveToken') { if (event === 'giveToken') {
registry.put({api: data, name: 'baas-token'}) registry.put({ api: data, name: 'baas-token' })
} }
// 接收合约zip文件 // 接收合约zip文件
if (event === 'giveStoreUrl') { if (event === 'giveStoreUrl') {
axios.get(data, { axios.get(data, {
responseType: 'blob' responseType: 'blob'
}).then(async _ => { }).then(async _ => {
await resetWorkspaces() await resetWorkspaces()
const files = await unZipFile(_.data) const files = await unZipFile(_.data)
await uploadFile( {files}, '', ()=> {}, ) await uploadFile({ files }, '', () => {})
window.parent.postMessage({event: 'showIframe'}, '\*') window.parent.postMessage({ event: 'showIframe' }, '\*')
}) })
} }
} }
...@@ -243,9 +243,9 @@ class App { ...@@ -243,9 +243,9 @@ class App {
window.location.hostname !== 'remix.ethereum.org' && window.location.hostname !== 'remix.ethereum.org' &&
window.location.hostname !== 'localhost' && window.location.hostname !== 'localhost' &&
window.location.hostname !== '127.0.0.1') { window.location.hostname !== '127.0.0.1') {
// modalDialogCustom.alert(`The Remix IDE has moved to http://remix.ethereum.org.\n // modalDialogCustom.alert(`The Remix IDE has moved to http://remix.ethereum.org.\n
// This instance of Remix you are visiting WILL NOT BE UPDATED.\n // This instance of Remix you are visiting WILL NOT BE UPDATED.\n
// Please make a backup of your contracts and start using http://remix.ethereum.org`) // Please make a backup of your contracts and start using http://remix.ethereum.org`)
} }
if (window.location.protocol.indexOf('https') === 0) { if (window.location.protocol.indexOf('https') === 0) {
toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.') toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.')
...@@ -499,7 +499,7 @@ class App { ...@@ -499,7 +499,7 @@ class App {
await appManager.activatePlugin(['home']) await appManager.activatePlugin(['home'])
// await appManager.activatePlugin(['settings']) // await appManager.activatePlugin(['settings'])
// await appManager.activatePlugin(['pluginManager']) // await appManager.activatePlugin(['pluginManager'])
await appManager.activatePlugin(['hiddenPanel', 'contextualListener', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport']) await appManager.activatePlugin(['hiddenPanel', 'contextualListener', 'terminal', 'blockchain', 'fetchAndCompile', 'contentImport'])
appManager.on('filePanel', 'workspaceInitializationCompleted', async () => { appManager.on('filePanel', 'workspaceInitializationCompleted', async () => {
await appManager.registerContextMenuItems() await appManager.registerContextMenuItems()
...@@ -509,7 +509,7 @@ class App { ...@@ -509,7 +509,7 @@ class App {
appManager.on('editor', 'editorMounted', () => { appManager.on('editor', 'editorMounted', () => {
const basePlugins = ['solidity', 'udapp', 'debugger'] const basePlugins = ['solidity', 'udapp', 'debugger']
if (Array.isArray(workspace)) { if (Array.isArray(workspace)) {
const workspace$ = Array.from(new Set([...workspace, ... basePlugins])) const workspace$ = Array.from(new Set([...workspace, ...basePlugins]))
appManager.activatePlugin(workspace$).then(async () => { appManager.activatePlugin(workspace$).then(async () => {
try { try {
if (params.deactivate) { if (params.deactivate) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment