diff --git a/.eslintrc.js b/.eslintrc.js index 69f596075..4f366fbf6 100644 --- a/.eslintrc.js +++ b/.eslintrc.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', diff --git a/test/unit-global/frozenPromise.js b/test/unit-global/frozenPromise.js index 05f1defe7..74da3b01b 100644 --- a/test/unit-global/frozenPromise.js +++ b/test/unit-global/frozenPromise.js @@ -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) {