.jshintrc 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. "indent" : 4, // {int} Number of spaces to use for indentation
  14. "latedef" : false, // true: Require variables/functions to be defined before being used
  15. "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
  16. "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
  17. "noempty" : false, // true: Prohibit use of empty blocks
  18. "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
  19. "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
  20. "plusplus" : false, // true: Prohibit use of `++` & `--`
  21. "quotmark" : "single", // Quotation mark consistency:
  22. // false : do nothing (default)
  23. // true : ensure whatever is used is consistent
  24. // "single" : require single quotes
  25. // "double" : require double quotes
  26. "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
  27. "unused" : true, // Unused variables:
  28. // true : all variables, last function parameter
  29. // "vars" : all variables only
  30. // "strict" : all variables, all function parameters
  31. "strict" : false, // true: Requires all functions run in ES5 Strict Mode
  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
  37. "varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed.
  38. // Relaxing
  39. "asi" : true, // 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" : false, // true: Tolerate `ExpressionStatement` as Programs
  49. "funcscope" : false, // true: Tolerate defining variables inside control statements
  50. "globalstrict" : false, // 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. "noyield" : false, // true: Tolerate generator functions with no yield statement in them.
  58. "notypeof" : false, // true: Tolerate invalid typeof operator values
  59. "proto" : false, // true: Tolerate using the `__proto__` property
  60. "scripturl" : false, // true: Tolerate script-targeted URLs
  61. "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
  62. "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
  63. "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
  64. "validthis" : false, // true: Tolerate using this in a non-constructor function
  65. // Environments
  66. "browser" : true, // Web Browser (window, document, etc)
  67. "browserify" : false, // Browserify (node.js code in the browser)
  68. "couch" : false, // CouchDB
  69. "devel" : true, // Development/debugging (alert, confirm, etc)
  70. "dojo" : false, // Dojo Toolkit
  71. "jasmine" : false, // Jasmine
  72. "jquery" : false, // jQuery
  73. "mocha" : true, // Mocha
  74. "mootools" : false, // MooTools
  75. "node" : false, // Node.js
  76. "nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
  77. "phantom" : false, // PhantomJS
  78. "prototypejs" : false, // Prototype and Scriptaculous
  79. "qunit" : false, // QUnit
  80. "rhino" : false, // Rhino
  81. "shelljs" : false, // ShellJS
  82. "typed" : false, // Globals for typed array constructions
  83. "worker" : false, // Web Workers
  84. "wsh" : false, // Windows Scripting Host
  85. "yui" : false, // Yahoo User Interface
  86. // Custom Globals
  87. "globals" : {} // additional predefined global variables
  88. }