[gnome-maps/wip/refactor2: 5/9] JSHint: Allow late function definitions



commit 29579230144a2259697eb7aa7990d0400cbb3cfe
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Mon Oct 13 20:10:02 2014 +0200

    JSHint: Allow late function definitions
    
    By default JSHint warns when you use functions before they are defined.
    That's not really necessary, and it's sometimes convenient to define
    functions in "backwards" order.
    
    This patch makes JSHint only complain about using variables before they
    are declared, not functions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699967

 .jshintrc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/.jshintrc b/.jshintrc
index 1d485d9..6d9b7cc 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -9,7 +9,7 @@
     "forin"         : false,    // true: Require filtering for..in loops with obj.hasOwnProperty()
     "immed"         : false,    // true: Require immediate invocations to be wrapped in parens e.g. 
`(function () { } ());`
     "indent"        : 4,        // {int} Number of spaces to use for indentation
-    "latedef"       : true,     // true: Require variables/functions to be defined before being used
+    "latedef"       : "nofunc", // true: Require variables/functions to be defined before being used
     "newcap"        : true,     // true: Require capitalization of all constructor functions e.g. `new F()`
     "noarg"         : true,     // true: Prohibit use of `arguments.caller` and `arguments.callee`
     "noempty"       : true,     // true: Prohibit use of empty blocks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]