Bug 1509270 - Allow 'location' as a writeable global property for ESLint (previously read-only). r=mossop
authorMark Banner <standard8@mozilla.com>
Tue, 27 Nov 2018 18:55:11 +0000
changeset 448380 cc540ed50749d32dfc41981b568de1abdd8b816b
parent 448379 e2a58694a2ed0fd20a52da171aceed39ce545ed4
child 448381 d44189ff5da2f3e8d2a0c24bc81d04523e616aa0
push id73828
push usermbanner@mozilla.com
push dateTue, 27 Nov 2018 19:35:32 +0000
treeherderautoland@cc540ed50749 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1509270
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509270 - Allow 'location' as a writeable global property for ESLint (previously read-only). r=mossop Differential Revision: https://phabricator.services.mozilla.com/D12748
tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
tools/lint/eslint/eslint-plugin-mozilla/package.json
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -31,16 +31,20 @@ module.exports = {
     // Specific to Firefox
     // eslint-disable-next-line max-len
     // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/InternalError
     "InternalError": true,
     "Intl": false,
     "SharedArrayBuffer": false,
     "StopIteration": false,
     "dump": true,
+    // Override the "browser" env definition of "location" to allow writing as it
+    // is a writeable property.
+    // See https://bugzilla.mozilla.org/show_bug.cgi?id=1509270#c1 for more information.
+    "location": true,
     "openDialog": false,
     "saveStack": false,
     "sizeToContent": false,
     // Specific to Firefox
     // eslint-disable-next-line max-len
     // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/uneval
     "uneval": false,
   },
--- a/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "1.0.0",
+  "version": "1.0.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
     "acorn": {
       "version": "5.7.1",
       "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",
       "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==",
       "dev": true
--- a/tools/lint/eslint/eslint-plugin-mozilla/package.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "1.0.0",
+  "version": "1.0.1",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],