mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Fix no-loop-func issues (#9199)
See [`no-loop-func`](https://eslint.org/docs/rules/no-loop-func) for more information. This change enables `no-loop-func` and fixes the issues raised by the rule.
This commit is contained in:
parent
ef88d79fac
commit
3346c2fc07
@ -48,6 +48,7 @@ module.exports = {
|
|||||||
'global-require': 'error',
|
'global-require': 'error',
|
||||||
'guard-for-in': 'error',
|
'guard-for-in': 'error',
|
||||||
'no-case-declarations': 'error',
|
'no-case-declarations': 'error',
|
||||||
|
'no-loop-func': 'error',
|
||||||
'no-useless-catch': 'error',
|
'no-useless-catch': 'error',
|
||||||
'no-useless-concat': 'error',
|
'no-useless-concat': 'error',
|
||||||
/* End v2 rules */
|
/* End v2 rules */
|
||||||
|
@ -38,6 +38,8 @@ let nonDeletableCount = 0
|
|||||||
let status
|
let status
|
||||||
while (transactions.length <= 100) {
|
while (transactions.length <= 100) {
|
||||||
status = txStates[Math.floor(Math.random() * Math.floor(txStates.length - 1))]
|
status = txStates[Math.floor(Math.random() * Math.floor(txStates.length - 1))]
|
||||||
|
// This is an old migration, let's allow it
|
||||||
|
// eslint-disable-next-line no-loop-func
|
||||||
if (!deletableTxStates.find((s) => s === status)) {
|
if (!deletableTxStates.find((s) => s === status)) {
|
||||||
nonDeletableCount++
|
nonDeletableCount++
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user