mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #8995 from whymarrh/enable-array-callback-return
Fix array-callback-return issues
This commit is contained in:
commit
c0ff974672
@ -41,6 +41,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
|
/* TODO: Remove these when upgrading to `@metamask/eslint-config@2` */
|
||||||
|
'array-callback-return': 'error',
|
||||||
|
/* End v2 rules */
|
||||||
'arrow-parens': 'error',
|
'arrow-parens': 'error',
|
||||||
'no-tabs': 'error',
|
'no-tabs': 'error',
|
||||||
'no-mixed-operators': 'error',
|
'no-mixed-operators': 'error',
|
||||||
|
@ -47,7 +47,7 @@ function displayChart (data) {
|
|||||||
console.log(`\nbuild completed. task timeline:`)
|
console.log(`\nbuild completed. task timeline:`)
|
||||||
|
|
||||||
// build bars for bounds
|
// build bars for bounds
|
||||||
data.map((entry, index) => {
|
data.forEach((entry, index) => {
|
||||||
const [label, start, end] = entry
|
const [label, start, end] = entry
|
||||||
const [start2, end2] = [start, end].map((value) => adjust(value, first, last, 40))
|
const [start2, end2] = [start, end].map((value) => adjust(value, first, last, 40))
|
||||||
const barString = barBuilder(start2, end2)
|
const barString = barBuilder(start2, end2)
|
||||||
|
@ -67,7 +67,7 @@ export default class ContactList extends PureComponent {
|
|||||||
return 1
|
return 1
|
||||||
} else if (letter1 === letter2) {
|
} else if (letter1 === letter2) {
|
||||||
return 0
|
return 0
|
||||||
} else if (letter1 < letter2) {
|
} else {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -128,7 +128,7 @@ describe('SendFooter Component', function () {
|
|||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
Object.entries(config).map(([description, obj]) => {
|
Object.entries(config).forEach(([description, obj]) => {
|
||||||
it(description, function () {
|
it(description, function () {
|
||||||
wrapper.setProps(obj)
|
wrapper.setProps(obj)
|
||||||
assert.equal(wrapper.instance().formShouldBeDisabled(), obj.expectedResult)
|
assert.equal(wrapper.instance().formShouldBeDisabled(), obj.expectedResult)
|
||||||
|
@ -103,7 +103,7 @@ describe('send utils', function () {
|
|||||||
expectedResult: false,
|
expectedResult: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Object.entries(config).map(([description, obj]) => {
|
Object.entries(config).forEach(([description, obj]) => {
|
||||||
it(description, function () {
|
it(description, function () {
|
||||||
assert.equal(doesAmountErrorRequireUpdate(obj), obj.expectedResult)
|
assert.equal(doesAmountErrorRequireUpdate(obj), obj.expectedResult)
|
||||||
})
|
})
|
||||||
@ -166,7 +166,7 @@ describe('send utils', function () {
|
|||||||
expectedResult: { amount: INSUFFICIENT_TOKENS_ERROR },
|
expectedResult: { amount: INSUFFICIENT_TOKENS_ERROR },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Object.entries(config).map(([description, obj]) => {
|
Object.entries(config).forEach(([description, obj]) => {
|
||||||
it(description, function () {
|
it(description, function () {
|
||||||
assert.deepEqual(getAmountErrorObject(obj), obj.expectedResult)
|
assert.deepEqual(getAmountErrorObject(obj), obj.expectedResult)
|
||||||
})
|
})
|
||||||
@ -190,7 +190,7 @@ describe('send utils', function () {
|
|||||||
expectedResult: { gasFee: null },
|
expectedResult: { gasFee: null },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Object.entries(config).map(([description, obj]) => {
|
Object.entries(config).forEach(([description, obj]) => {
|
||||||
it(description, function () {
|
it(description, function () {
|
||||||
assert.deepEqual(getGasFeeErrorObject(obj), obj.expectedResult)
|
assert.deepEqual(getGasFeeErrorObject(obj), obj.expectedResult)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user