.jshintrc 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {
  2. // JSHint Meteor Configuration File
  3. // Match the Meteor Style Guide
  4. //
  5. // By @raix with contributions from @aldeed and @awatson1978
  6. // Source https://github.com/raix/Meteor-jshintrc
  7. //
  8. // See http://jshint.com/docs/ for more details
  9. "maxerr" : 50, // {int} Maximum error before stopping
  10. // Enforcing
  11. "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
  12. "camelcase" : false, // false: Identifiers do not need to be in camelCase. We would like to enforce this except for when interacting with our api objects which use snakeCase properties.
  13. "curly" : false, // false: Do not require {} for every new block or scope
  14. "eqeqeq" : true, // true: Require triple equals (===) for comparison
  15. "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
  16. "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
  17. "indent" : 2, // {int} Number of spaces to use for indentation
  18. "latedef" : false, // true: Require variables/functions to be defined before being used
  19. "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
  20. "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
  21. "noempty" : true, // true: Prohibit use of empty blocks
  22. "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
  23. "plusplus" : false, // true: Prohibit use of `++` & `--`
  24. "quotmark" : false, // Quotation mark consistency:
  25. // false : do nothing (default)
  26. // true : ensure whatever is used is consistent
  27. // "single" : require single quotes
  28. // "double" : require double quotes
  29. "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
  30. "unused" : true, // true: Require all defined variables be used
  31. "strict" : false, // false: Do not require all functions to be run in ES5 Strict Mode
  32. "trailing" : true, // true: Prohibit trailing whitespaces
  33. "maxparams" : false, // {int} Max number of formal params allowed per function
  34. "maxdepth" : false, // {int} Max depth of nested blocks (within functions)
  35. "maxstatements" : false, // {int} Max number statements per function
  36. "maxcomplexity" : false, // {int} Max cyclomatic complexity per function
  37. "maxlen" : 250, // {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" : false, // 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" : false, // 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" : true, // 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" : false, // 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" : false, // 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" : false, // true: Tolerate using this in a non-constructor function
  64. // Environments
  65. "browser" : true, // Web Browser (window, document, etc)
  66. "couch" : false, // CouchDB
  67. "devel" : true, // Development/debugging (alert, confirm, etc)
  68. "dojo" : false, // Dojo Toolkit
  69. "jquery" : false, // jQuery
  70. "mootools" : false, // MooTools
  71. "node" : false, // Node.js
  72. "nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
  73. "prototypejs" : false, // Prototype and Scriptaculous
  74. "rhino" : false, // Rhino
  75. "worker" : false, // Web Workers
  76. "wsh" : false, // Windows Scripting Host
  77. "yui" : false, // Yahoo User Interface
  78. //"meteor" : false, // Meteor.js
  79. // Legacy
  80. "nomen" : false, // true: Prohibit dangling `_` in variables
  81. "onevar" : false, // true: Allow only one `var` statement per function
  82. "passfail" : false, // true: Stop on first error
  83. "white" : false, // true: Check against strict whitespace and indentation rules
  84. // Custom globals, from http://docs.meteor.com, in the order they appear there
  85. "globals" : {
  86. "Meteor": false,
  87. "DDP": false,
  88. "Mongo": false,
  89. "Session": false,
  90. "Accounts": false,
  91. "Template": false,
  92. "Blaze": false,
  93. "Spacebars": false,
  94. "Match": false,
  95. "check": false,
  96. "Tracker": false,
  97. "ReactiveVar": false,
  98. "ReactiveDict": false,
  99. "EJSON": false,
  100. "HTTP": false,
  101. "Email": false,
  102. "Assets": false,
  103. "Package": false,
  104. "App": false, //mobile-config.js
  105. "cordova": false,
  106. "Cordova": false,
  107. "Buffer": false,
  108. // Meteor internals
  109. "DDPServer": false,
  110. "global": false,
  111. "Log": false,
  112. "MongoInternals": false,
  113. "process": false,
  114. "Retry": false,
  115. "WebApp": false,
  116. "WebAppInternals": false,
  117. // globals useful when creating Meteor packages
  118. "Npm": false,
  119. "Tinytest": false,
  120. // common Meteor packages
  121. "HTTP": true,
  122. "Random": false,
  123. "_": false, // Underscore.js
  124. "$": false, // jQuery
  125. // This package
  126. "_methodHTTP": true,
  127. "Fiber": true,
  128. "runServerMethod": true
  129. }
  130. }