[gnome-maps] JSHint: Allow late function definitions
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] JSHint: Allow late function definitions
- Date: Thu, 16 Oct 2014 05:30:38 +0000 (UTC)
commit c96417c152f602af8e04b8075509ba7016dee244
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]