1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Fix no-useless-concat issues (#9200)

See [`no-useless-concat`](https://eslint.org/docs/rules/no-useless-concat) for more information.

This change enables `no-useless-concat` and fixes the issues raised by the rule.
This commit is contained in:
Whymarrh Whitby 2020-08-12 17:07:44 -02:30 committed by GitHub
parent 9842b2f1ce
commit ef88d79fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -49,6 +49,7 @@ module.exports = {
'guard-for-in': 'error',
'no-case-declarations': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
/* End v2 rules */
'arrow-parens': 'error',
'no-tabs': 'error',

View File

@ -263,10 +263,10 @@ export function generateChart (gasPrices, estimatedTimes, gasPricesMax, estimate
let text
d.forEach((el) => {
if (el && (el.value || el.value === 0) && !text) {
text = "<table class='" + 'custom-tooltip' + "'>" + "<tr><th colspan='2'>" + titleFormat(el.x) + '</th></tr>'
text = `<table class='custom-tooltip'><tr><th colspan='2'>${titleFormat(el.x)}</th></tr>`
}
})
return text + '</table>' + "<div class='tooltip-arrow'></div>"
return `${text}</table><div class='tooltip-arrow'></div>`
},
position: function () {
if (d3.select('#overlayed-circle').empty()) {

View File

@ -23,7 +23,7 @@ const insertRule = (css) => {
const insertKeyframesRule = (keyframes) => {
// random name
const name = 'anim_' + (++index) + (+new Date())
let css = '@' + 'keyframes ' + name + ' {'
let css = `@keyframes ${name} {`
Object.keys(keyframes).forEach((key) => {
css += key + ' {'