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.
feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent 438bb954ef
commit 853b89e314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc.js
  2. 5
      test/unit-global/frozenPromise.js

@ -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',

@ -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) {

Loading…
Cancel
Save