.jshintrc 6.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. // JSHint Default Configuration File (as on JSHint website)
  3. // See http://jshint.com/docs/ for more details
  4. "maxerr" : 50, // {int} Maximum error before stopping
  5. // Enforcing
  6. "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
  7. "camelcase" : true, // true: Identifiers must be in camelCase
  8. "curly" : true, // true: Require {} for every new block or scope
  9. "eqeqeq" : true, // true: Require triple equals (===) for comparison
  10. "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
  11. "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
  12. "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
  13. "latedef" : false, // true: Require variables/functions to be defined before being used
  14. "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
  15. "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
  16. "noempty" : true, // true: Prohibit use of empty blocks
  17. "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
  18. "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
  19. "plusplus" : false, // true: Prohibit use of `++` and `--`
  20. "quotmark" : true, // Quotation mark consistency:
  21. // false : do nothing (default)
  22. // true : ensure whatever is used is consistent
  23. // "single" : require single quotes
  24. // "double" : require double quotes
  25. "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
  26. "unused" : true, // Unused variables:
  27. // true : all variables, last function parameter
  28. // "vars" : all variables only
  29. // "strict" : all variables, all function parameters
  30. "strict" : true, // true: Requires all functions run in ES5 Strict Mode
  31. "maxparams" : false, // {int} Max number of formal params allowed per function
  32. "maxdepth" : false, // {int} Max depth of nested blocks (within functions)
  33. "maxstatements" : false, // {int} Max number statements per function
  34. "maxcomplexity" : false, // {int} Max cyclomatic complexity per function
  35. "maxlen" : false, // {int} Max number of characters per line
  36. "varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed.
  37. // Relaxing
  38. "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
  39. "boss" : false, // true: Tolerate assignments where comparisons would be expected
  40. "debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
  41. "eqnull" : false, // true: Tolerate use of `== null`
  42. "esversion" : 5, // {int} Specify the ECMAScript version to which the code must adhere.
  43. "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
  44. // (ex: `for each`, multiple try/catch, function expression…)
  45. "evil" : false, // true: Tolerate use of `eval` and `new Function()`
  46. "expr" : false, // true: Tolerate `ExpressionStatement` as Programs
  47. "funcscope" : false, // true: Tolerate defining variables inside control statements
  48. "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
  49. "iterator" : false, // true: Tolerate using the `__iterator__` property
  50. "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
  51. "laxbreak" : false, // true: Tolerate possibly unsafe line breakings
  52. "laxcomma" : false, // true: Tolerate comma-first style coding
  53. "loopfunc" : false, // true: Tolerate functions being defined in loops
  54. "multistr" : false, // true: Tolerate multi-line strings
  55. "noyield" : false, // true: Tolerate generator functions with no yield statement in them.
  56. "notypeof" : false, // true: Tolerate invalid typeof operator values
  57. "proto" : false, // true: Tolerate using the `__proto__` property
  58. "scripturl" : false, // true: Tolerate script-targeted URLs
  59. "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
  60. "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
  61. "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
  62. "validthis" : false, // true: Tolerate using this in a non-constructor function
  63. // Environments
  64. "browser" : true, // Web Browser (window, document, etc)
  65. "browserify" : false, // Browserify (node.js code in the browser)
  66. "couch" : false, // CouchDB
  67. "devel" : true, // Development/debugging (alert, confirm, etc)
  68. "dojo" : false, // Dojo Toolkit
  69. "jasmine" : false, // Jasmine
  70. "jquery" : false, // jQuery
  71. "mocha" : true, // Mocha
  72. "mootools" : false, // MooTools
  73. "node" : true, // Node.js
  74. "nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
  75. "phantom" : false, // PhantomJS
  76. "prototypejs" : false, // Prototype and Scriptaculous
  77. "qunit" : false, // QUnit
  78. "rhino" : false, // Rhino
  79. "shelljs" : false, // ShellJS
  80. "typed" : false, // Globals for typed array constructions
  81. "worker" : false, // Web Workers
  82. "wsh" : false, // Windows Scripting Host
  83. "yui" : false, // Yahoo User Interface
  84. // Custom Globals
  85. "globals" : {} // additional predefined global variables
  86. }