1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Fix no-global-assign issues (#9209)

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

This change enables `no-global-assign` and fixes the issues raised by the rule.
This commit is contained in:
Whymarrh Whitby 2020-08-12 21:21:54 -02:30 committed by GitHub
parent 438bb954ef
commit 853b89e314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -51,6 +51,7 @@ module.exports = {
'no-case-declarations': 'error',
'no-empty': 'error',
'no-eq-null': 'error',
'no-global-assign': 'error',
'no-loop-func': 'error',
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-useless-catch': 'error',

View File

@ -1,7 +1,3 @@
/* eslint-disable no-native-reassign */
// this is what we're testing
import '../../app/scripts/lib/freezeGlobals'
import assert from 'assert'
@ -10,6 +6,7 @@ describe('Promise global is immutable', function () {
it('throws when reassinging promise (syntax 1)', function () {
try {
// eslint-disable-next-line no-global-assign,no-native-reassign
Promise = {}
assert.fail('did not throw error')
} catch (err) {