dom/system/gonk/tests/marionette/ril_jshint/jshintrc

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 {
     2     // JSHint Default Configuration File (as on JSHint website)
     3     // See http://jshint.com/docs/ for more details
     5     // Modify for RIL usage.
     7     "maxerr"        : 10000,    // {int} Maximum error before stopping
     9     // Enforcing
    10     "bitwise"       : false,    // true: Prohibit bitwise operators (&, |, ^, etc.)
    11     "camelcase"     : false,    // true: Identifiers must be in camelCase
    12     "curly"         : false,    // true: Require {} for every new block or scope
    13     "eqeqeq"        : false,    // true: Require triple equals (===) for comparison
    14     "forin"         : false,    // true: Require filtering for..in loops with obj.hasOwnProperty()
    15     "immed"         : false,    // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
    16     //"indent"        : 2,        // {int} Number of spaces to use for indentation
    17     "latedef"       : false,    // true: Require variables/functions to be defined before being used
    18     "newcap"        : false,    // true: Require capitalization of all constructor functions e.g. `new F()`
    19     "noarg"         : true,     // true: Prohibit use of `arguments.caller` and `arguments.callee`
    20     "noempty"       : false,    // true: Prohibit use of empty blocks
    21     "nonew"         : false,    // true: Prohibit use of constructors for side-effects (without assignment)
    22     "plusplus"      : false,    // true: Prohibit use of `++` & `--`
    23     "quotmark"      : false,    // Quotation mark consistency:
    24                                 //   false    : do nothing (default)
    25                                 //   true     : ensure whatever is used is consistent
    26                                 //   "single" : require single quotes
    27                                 //   "double" : require double quotes
    28     "undef"         : false,    // true: Require all non-global variables to be declared (prevents global leaks)
    29     "unused"        : false,    // true: Require all defined variables be used
    30     "strict"        : false,    // true: Requires all functions run in ES5 Strict Mode
    31     "trailing"      : false,    // true: Prohibit trailing whitespaces
    32     "maxparams"     : false,    // {int} Max number of formal params allowed per function
    33     "maxdepth"      : false,    // {int} Max depth of nested blocks (within functions)
    34     "maxstatements" : false,    // {int} Max number statements per function
    35     "maxcomplexity" : false,    // {int} Max cyclomatic complexity per function
    36     "maxlen"        : false,    // {int} Max number of characters per line
    38     // Relaxing
    39     "asi"           : false,     // true: Tolerate Automatic Semicolon Insertion (no semicolons)
    40     "boss"          : false,     // true: Tolerate assignments where comparisons would be expected
    41     "debug"         : false,     // true: Allow debugger statements e.g. browser breakpoints.
    42     "eqnull"        : true,      // true: Tolerate use of `== null`
    43     "es5"           : false,     // true: Allow ES5 syntax (ex: getters and setters)
    44     "esnext"        : false,     // true: Allow ES.next (ES6) syntax (ex: `const`)
    45     "moz"           : true,      // true: Allow Mozilla specific syntax (extends and overrides esnext features)
    46                                  // (ex: `for each`, multiple try/catch, function expression…)
    47     "evil"          : false,     // true: Tolerate use of `eval` and `new Function()`
    48     "expr"          : false,     // true: Tolerate `ExpressionStatement` as Programs
    49     "funcscope"     : false,     // true: Tolerate defining variables inside control statements"
    50     "globalstrict"  : true,      // true: Allow global "use strict" (also enables 'strict')
    51     "iterator"      : false,     // true: Tolerate using the `__iterator__` property
    52     "lastsemic"     : false,     // true: Tolerate omitting a semicolon for the last statement of a 1-line block
    53     "laxbreak"      : true,      // true: Tolerate possibly unsafe line breakings
    54     "laxcomma"      : false,     // true: Tolerate comma-first style coding
    55     "loopfunc"      : false,     // true: Tolerate functions being defined in loops
    56     "multistr"      : false,     // true: Tolerate multi-line strings
    57     "proto"         : true,      // true: Tolerate using the `__proto__` property
    58     "scripturl"     : false,     // true: Tolerate script-targeted URLs
    59     "smarttabs"     : false,     // true: Tolerate mixed tabs/spaces when used for alignment
    60     "shadow"        : false,     // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
    61     "sub"           : false,     // true: Tolerate using `[]` notation when it can still be expressed in dot notation
    62     "supernew"      : false,     // true: Tolerate `new function () { ... };` and `new Object;`
    63     "validthis"     : true,      // true: Tolerate using this in a non-constructor function
    65     // Environments
    66     "browser"       : false,    // Web Browser (window, document, etc)
    67     "couch"         : false,    // CouchDB
    68     "devel"         : true,     // Development/debugging (alert, confirm, etc)
    69     "dojo"          : false,    // Dojo Toolkit
    70     "jquery"        : false,    // jQuery
    71     "mootools"      : false,    // MooTools
    72     "node"          : false,    // Node.js
    73     "nonstandard"   : false,    // Widely adopted globals (escape, unescape, etc)
    74     "prototypejs"   : false,    // Prototype and Scriptaculous
    75     "rhino"         : false,    // Rhino
    76     "worker"        : true,     // Web Workers
    77     "wsh"           : false,    // Windows Scripting Host
    78     "yui"           : false,    // Yahoo User Interface
    80     // Legacy
    81     "nomen"         : false,    // true: Prohibit dangling `_` in variables
    82     "onevar"        : false,    // true: Allow only one `var` statement per function
    83     "passfail"      : false,    // true: Stop on first error
    84     "white"         : false,    // true: Check against strict whitespace and indentation rules
    86     // Custom Globals
    87     "predef"        : [ ],      // additional predefined global variables
    89     "globals": {
    90         "ChromeWorker": false,
    91         "Components": false,
    92         "DOMRequestIpcHelper": false,
    93         "ObjectWrapper": false,
    94         "PhoneNumberUtils": false,
    95         "RILNetworkInterface": false,
    96         "Services": false,
    97         "Uint8Array": false,
    98         "WAP": false,
    99         "XPCOMUtils": false,
   100         "cpmm": false,
   101         "dump": false,
   102         "gAudioManager": false,
   103         "gMessageManager": false,
   104         "gMobileMessageDatabaseService": false,
   105         "gMobileMessageService": false,
   106         "gNetworkManager": false,
   107         "gPowerManagerService": false,
   108         "gSettingsService": false,
   109         "gSmsService": false,
   110         "gSystemMessenger": false,
   111         "gSystemWorkerManager": false,
   112         "gTimeService": false,
   113         "gUUIDGenerator": false,
   114         "ppmm": true,
   116         "__end_guardian_for_easy_sorting__": false
   117     }
   118 }

mercurial