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,16 +165,16 @@ class App { ...@@ -165,16 +165,16 @@ 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') {
...@@ -183,8 +183,8 @@ class App { ...@@ -183,8 +183,8 @@ class App {
}).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' }, '\*')
}) })
} }
} }
...@@ -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