JSHint: Re-order jshintrc options to split common from project settings
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 13 Apr 2013 06:47:00 +0000 (08:47 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 13 Apr 2013 06:48:41 +0000 (08:48 +0200)
There are certain options required by our coding conventions.
The others are specifically overriding it for core. Either
because we have certain code that needs laxing or because we
can be stricter.

Comments can be used in jshintrc since a while now. Though
they are invalid JSON, many parsers (including JSHint) allow
them for documentation purposes.

Change-Id: I43ace21208121e866900b2cbe1efbcebadd2946a

.jshintrc

index 7fa138d..c4e265a 100644 (file)
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,15 +1,10 @@
 {
-       "predef": [
-               "mediaWiki",
-               "jQuery",
-               "QUnit"
-       ],
+       /* Common */
 
-       "bitwise": true,
+       // Enforcing
        "camelcase": true,
        "curly": true,
        "eqeqeq": true,
-       "forin": false,
        "immed": true,
        "latedef": true,
        "newcap": true,
        "noempty": true,
        "nonew": true,
        "quotmark": "single",
-       "regexp": false,
+       "trailing": true,
        "undef": true,
        "unused": true,
-       "strict": false,
-       "trailing": true,
+       // Legacy
+       "onevar": true,
+
+       /* Local */
 
+       // Enforcing
+       "bitwise": true,
+       "forin": false,
+       "regexp": false,
+       "strict": false,
+       // Relaxing
        "laxbreak": true,
        "smarttabs": true,
        "multistr": true,
-
+       // Environment
        "browser": true,
-
+       // Legacy
        "nomen": true,
-       "onevar": true
+
+       "predef": [
+               "mediaWiki",
+               "jQuery",
+               "QUnit"
+       ]
 }