Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorizzo committed Apr 6, 2020
1 parent 8e25a64 commit d96165d
Show file tree
Hide file tree
Showing 93 changed files with 653 additions and 653 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
env: {
node: true
},
'extends': [
extends: [
'plugin:vue/essential',
'@vue/standard'
],
Expand Down
8 changes: 4 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default {
return (this.dbIsOutdated) ? 'DB_OUTDATED' || null : null
},
networkName () {
let name = this.netName || ''
const name = this.netName || ''
return (name) ? name.replace('RSK', '').trim().toLowerCase() : name
}
},
Expand All @@ -119,11 +119,11 @@ export default {
},
getIcon (name) {
if (name === 'home') return 'rsk'
let entity = this.getEntity()(name)
const entity = this.getEntity()(name)
return (entity) ? entity.icon || name : name
},
onResize () {
let size = {
const size = {
w: this.$el.clientWidth,
h: this.$el.clientHeight
}
Expand All @@ -132,7 +132,7 @@ export default {
resizeThrottler () {
this.menu = false
if (!this.resizeTimeout) {
let vm = this
const vm = this
this.resizeTimeout = setTimeout(() => {
vm.resizeTimeout = null
vm.onResize()
Expand Down
6 changes: 3 additions & 3 deletions src/components/BigField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
}
},
created () {
let { decoded } = this
const { decoded } = this
// select rlp if is available
if (decoded && decoded.rlp) {
this.field = 'rlp'
Expand All @@ -34,14 +34,14 @@ export default {
return this.options || {}
},
decode () {
let { decode } = this.opts
const { decode } = this.opts
return decode
},
decoded () {
return (this.decode) ? decodeField(this.data) : null
},
value () {
let { decoded, field, data } = this
const { decoded, field, data } = this
return (decoded && field) ? decoded[field] || data : data
},
rows () {
Expand Down
6 changes: 3 additions & 3 deletions src/components/BlockBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
},
computed: {
boxFields () {
let { miner, txs, txDensity, timestamp } = this.fields
const { miner, txs, txDensity, timestamp } = this.fields
// let { blockHashrate } = this.fields
return [
[miner],
Expand All @@ -57,11 +57,11 @@ export default {
return this.getBlockColor(this.block.number)
},
bStyle () {
let color = this.blockColor
const color = this.blockColor
return { color, fill: color }
},
blockBoxStyle () {
let color = this.blockColor
const color = this.blockColor
return { 'border-color': color }
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export default {
}
},
mounted () {
let vm = this
const vm = this
this.$nextTick(() => {
vm.onResize()
})
},
watch: {
asize () {
let vm = this
const vm = this
this.$nextTick(() => {
vm.onResize()
})
Expand All @@ -55,14 +55,14 @@ export default {
return Object.assign({ size: this.size }, this.opts)
},
hRatio () {
let hr = this.heightRatio
const hr = this.heightRatio
return (undefined !== hr) ? hr : 3.5
}
},
methods: {
onResize () {
let w = this.$el.parentElement.offsetWidth
let h = w / this.hRatio
const w = this.$el.parentElement.offsetWidth
const h = w / this.hRatio
this.size = Object.assign({}, { w, h })
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/CheckAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ export default {
return isAddress(this.address)
},
checksumValid () {
let { address, chainId } = this
const { address, chainId } = this
return isValidChecksumAddress(address, chainId)
},
isValid () {
let { address, chainId } = this
const { address, chainId } = this
return isValidAddress(address, chainId)
},
checkSummed () {
return toChecksumAddress(this.address)
},
isCheckSummed () {
let { checksummed, address } = this
const { checksummed, address } = this
return checksummed === address
},
networks () {
let { chainId, address } = this
let nets = searchChecksummedNetworks(address)
const { chainId, address } = this
const nets = searchChecksummedNetworks(address)
return nets.filter(d => `${d.chainId}` !== `${chainId}`)
},
checkClass () {
Expand Down
8 changes: 4 additions & 4 deletions src/components/ConnectionStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
return true
},
lostTime () {
let { connectionEnd, now } = this
const { connectionEnd, now } = this
return (connectionEnd) ? now - connectionEnd : 0
},
waitingTime () {
Expand All @@ -67,21 +67,21 @@ export default {
return (this.connectionEnd) ? this.lostTime > WAITING_TIME : 0
},
connectedTime () {
let { connectionStart, now } = this
const { connectionStart, now } = this
return (connectionStart) ? (now - connectionStart) || 0 : 0
},
isWaiting () {
return this.waitingTime < WAITING_TIME
},
connectionStatus () {
let { isLost, isWaiting, connected, lostTime, waitingTime, connectedTime } = this
const { isLost, isWaiting, connected, lostTime, waitingTime, connectedTime } = this
if (connected) return [STATUS.CONNECTED, 'brand', connectedTime]
if (isLost) return [STATUS.LOST, 'warn', lostTime]
if (isWaiting) return [STATUS.WAITING, 'brand', waitingTime]
return [STATUS.UNABLE, 'error', waitingTime]
},
status () {
let [msg, css, time] = this.connectionStatus
const [msg, css, time] = this.connectionStatus
return { msg, css, time }
},
showTime () {
Expand Down
20 changes: 10 additions & 10 deletions src/components/ContractCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
}
},
created () {
let first = this.imports[0]
const first = this.imports[0]
if (first) this.selectFile(first.name)
},
computed: {
Expand All @@ -78,13 +78,13 @@ export default {
return this.data.code
},
contractName () {
let { name, address } = this.data
const { name, address } = this.data
return name || address
},
abi () {
let { verification } = this
let abi = (verification) ? verification.abi : null
const { verification } = this
const abi = (verification) ? verification.abi : null
return (abi) ? JSON.stringify(abi, null, 2) : null
},
Expand All @@ -101,7 +101,7 @@ export default {
},
imports () {
let sources = [...this.sources]
const sources = [...this.sources]
return sources.splice(1)
},
Expand All @@ -114,15 +114,15 @@ export default {
},
verificationData () {
let result = this.result || {}
let { name: contractName, usedSettings } = result
let { evmVersion, optimizer: optimization } = usedSettings
let { version: compilerVersion } = usedSettings.compiler
const result = this.result || {}
const { name: contractName, usedSettings } = result
const { evmVersion, optimizer: optimization } = usedSettings
const { version: compilerVersion } = usedSettings.compiler
return { contractName, compilerVersion, evmVersion, optimization }
},
selected () {
let { fileSelected } = this
const { fileSelected } = this
return this.imports.find(f => f.name === fileSelected)
}
Expand Down
24 changes: 12 additions & 12 deletions src/components/CubeOfCubes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ export default {
},
cubes () {
let cubes = []
let cs = this.cs
let cc = this.cc
let cmod = this.mod
let cx = this.size / 1.8
let cy = this.size / 2
let crows = this.crows
const cs = this.cs
const cc = this.cc
const cmod = this.mod
const cx = this.size / 1.8
const cy = this.size / 2
const crows = this.crows
for (let j = 0; j < crows; j++) {
let cyy = cy - (cs * j)
const cyy = cy - (cs * j)
for (let h = 0; h < cmod; h++) {
cubes = this.cLine(cubes, cx + (cc.x * h), cyy + (cc.y * h))
}
Expand All @@ -71,17 +71,17 @@ export default {
},
methods: {
cLine (cubes, cx, cy) {
let cc = this.cc
let cmod = this.mod
const cc = this.cc
const cmod = this.mod
for (let i = 1; i <= cmod; i++) {
let x = cx - (i * cc.x)
let y = cy + (i * cc.y)
const x = cx - (i * cc.x)
const y = cy + (i * cc.y)
cubes.push({ x, y })
}
return cubes
},
cubeStyle (cube) {
let cb = this.cubeStyleCb
const cb = this.cubeStyleCb
if (cb && typeof (cb) === 'function') {
return cb(cube)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
},
trimOptions () {
let options = this.ttOpts
let fieldOptions = this.field.trimOptions
const fieldOptions = this.field.trimOptions
if (fieldOptions) options = Object.assign(options, fieldOptions)
return options
},
Expand Down
18 changes: 9 additions & 9 deletions src/components/DataItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,33 @@ export default {
],
computed: {
delayedFields () {
let delayed = this.delayed || {}
const delayed = this.delayed || {}
return delayed.fields || []
}
},
methods: {
value (field, format) {
let raw = !format
const raw = !format
return this.getValue(field, this.data, raw)
},
isDelayed (field) {
let fields = this.delayedFields
const fields = this.delayedFields
return fields.indexOf(field) > -1
},
itemClass (field, rowNumber) {
let css = []
let fieldName = field.fieldName
let pos = this.fieldPos(field)
const css = []
const fieldName = field.fieldName
const pos = this.fieldPos(field)
if (this.isFrom(fieldName, pos)) css.push('from')
if (this.isTo(fieldName, pos)) css.push('to')
rowNumber = rowNumber || pos
let row = (rowNumber % 2) ? 'odd' : 'even'
const row = (rowNumber % 2) ? 'odd' : 'even'
css.push(row)
return css
},
componentProps (field) {
let tableName = `field-${field.fieldName}`
let delayed = this.isDelayed(field)
const tableName = `field-${field.fieldName}`
const delayed = this.isDelayed(field)
let props = { tableName, delayed }
props = (field.renderAsProps) ? Object.assign(props, field.renderAsProps) : props
return props
Expand Down
Loading

0 comments on commit d96165d

Please sign in to comment.