Bug 1515952 - Allow ESLint rule spaced-comment to accept source-map comments. r=mossop
authorMark Banner <standard8@mozilla.com>
Fri, 21 Dec 2018 18:05:39 +0000
changeset 508842 85a2c50c0c6bdc940c450e004728392253ec296d
parent 508809 74101900e7d484cc9ddcba2cd867ca172b961ea0
child 508843 fe95776b47d90f62d202633df9e4a7c0373a91d3
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1515952
milestone66.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 1515952 - Allow ESLint rule spaced-comment to accept source-map comments. r=mossop Differential Revision: https://phabricator.services.mozilla.com/D15207
dom/base/test/chrome/nochrome_bug1346936.js
dom/base/test/chrome/nochrome_bug765993.js
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/dom/base/test/chrome/nochrome_bug1346936.js
+++ b/dom/base/test/chrome/nochrome_bug1346936.js
@@ -1,4 +1,4 @@
-// # sourceMappingURL=bar.js.map
+//# sourceMappingURL=bar.js.map
 
 // Define a single function to prevent script source from being gc'd
 function foo() {}
--- a/dom/base/test/chrome/nochrome_bug765993.js
+++ b/dom/base/test/chrome/nochrome_bug765993.js
@@ -1,4 +1,4 @@
-// # sourceMappingURL=bar.js.map
+//# sourceMappingURL=bar.js.map
 
 // Define a single function to prevent script source from being gc'd
 function foo() {}
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -366,11 +366,11 @@ module.exports = {
       "nonwords": false,
       "overrides": {
         "typeof": false, // We tend to use typeof as a function call
       },
       "words": true,
     }],
 
     // Requires or disallows a whitespace (space or tab) beginning a comment
-    "spaced-comment": "error",
+    "spaced-comment": ["error", "always", { "markers": ["#"] }],
   },
 };
--- 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.3",
+  "version": "1.0.4",
   "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.3",
+  "version": "1.0.4",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],