1440094-1-60a1.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # HG changeset patch
  2. # User Brian Grinstead <bgrinstead@mozilla.com>
  3. # Date 1519759775 28800
  4. # Node ID 3c562a1430861a1f06cde3e312e1867e97384a0c
  5. # Parent 5e8f202b04d82eca111fd4ee5a96228b149c35ec
  6. Bug 1440094 - Allow `console` as a global for eslint;r=mossop
  7. As of Bug 1425463 it's available in all contexts (including JSM). The following
  8. patche is going to remove imports to Console.jsm, so prepare for this by allowing
  9. it to be used as a global in eslint.
  10. MozReview-Commit-ID: 3gCIspnlVgB
  11. diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
  12. --- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
  13. +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
  14. @@ -46,16 +46,17 @@ module.exports = {
  15. "StopIteration": false,
  16. "StructuredCloneHolder": false,
  17. "WebAssembly": false,
  18. "WebExtensionContentScript": false,
  19. "WebExtensionPolicy": false,
  20. "WebrtcGlobalInformation": false,
  21. // Non-standard, specific to Firefox.
  22. "XULElement": false,
  23. + "console": true,
  24. "dump": true,
  25. "openDialog": false,
  26. "sizeToContent": false,
  27. // Specific to Firefox
  28. // eslint-disable-next-line max-len
  29. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/uneval
  30. "uneval": false
  31. },