[Pkg-mozext-commits] [requestpolicy] 190/257: [ref] jshint: don't use `moz` anymore

David Prévot taffit at moszumanska.debian.org
Thu Jan 28 03:20:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit 32f188a93cff59ded28761e52bb6dc8403e6458e
Author: Martin Kimmerle <dev at 256k.de>
Date:   Thu Dec 3 13:01:53 2015 +0100

    [ref] jshint: don't use `moz` anymore
    
    Don't use Mozilla JavaScript extensions in the code anymore. The
    only feature we were using was catch-if, see
    https://developer.mozilla.org/en-
    US/docs/Web/JavaScript/Reference/Statements/try...catch#Conditional_catch_clauses
    
    As consequence, we're not affected by JSHint issue #2785
    anymore.
---
 .jshintrc                           | 2 +-
 src/content/lib/utils.jsm           | 4 ----
 src/content/main/content-policy.jsm | 6 ------
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/.jshintrc b/.jshintrc
index c4ae455..2d1bd8f 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -7,7 +7,7 @@
   "latedef": "nofunc",
   "maxcomplexity": 6,
   "maxdepth": 5,
-  "moz": true,
+  "moz": false,
   "nonew": true,
   "singleGroups": true,
   "undef": true,
diff --git a/src/content/lib/utils.jsm b/src/content/lib/utils.jsm
index ab052d3..ebb3168 100644
--- a/src/content/lib/utils.jsm
+++ b/src/content/lib/utils.jsm
@@ -96,13 +96,9 @@ var Utils = (function() {
    * @param {Object} object
    * @param {...string} properties
    */
-  // FIXME: Re-enable (W119) when JSHint issue #2785 is fixed.
-  //        https://github.com/jshint/jshint/issues/2785
-  /* jshint -W119 */
   self.getObjectPath = function(object, ...properties) {
     return properties.reduce(self.getObjectProperty, object);
   };
-  /* jshint +W119 */
 
   /**
    * @private
diff --git a/src/content/main/content-policy.jsm b/src/content/main/content-policy.jsm
index 0ce945e..7d8c29b 100644
--- a/src/content/main/content-policy.jsm
+++ b/src/content/main/content-policy.jsm
@@ -127,10 +127,7 @@ var PolicyImplementation = (function() {
 
     // Actually create the final function, as it is described
     // above.
-    // FIXME: Re-enable (W119) when JSHint issue #2785 is fixed.
-    /* jshint -W119 */
     self.shouldLoad = () => finalReturnValue;
-    /* jshint +W119 */
 
     let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
     let catMan = Utils.categoryManager;
@@ -174,10 +171,7 @@ var PolicyImplementation = (function() {
     //     aContext, aMimeTypeGuess, aExtra, aRequestPrincipal);
   };
 
-  // FIXME: Re-enable (W119) when JSHint issue #2785 is fixed.
-  /* jshint -W119 */
   self.shouldProcess = () => C.CP_OK;
-  /* jshint +W119 */
 
   //----------------------------------------------------------------------------
   // nsIFactory interface implementation

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list