.jshintrc 5.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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" : false, // true: Prohibit bitwise operators (&, |, ^, etc.)
  7. "camelcase" : false, // 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. "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
  11. "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty()
  12. "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
  13. "latedef" : "nofunc", // true: Require variables/functions to be defined before being used
  14. "newcap" : true, // 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" : true, // true: Prohibit use of constructors for side-effects (without assignment)
  19. "plusplus" : false, // true: Prohibit use of `++` & `--`
  20. "quotmark" : "single", // 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" : "vars", // vars: Require all defined variables be used, ignore function params
  27. "strict" : false, // true: Requires all functions run in ES5 Strict Mode
  28. "maxparams" : false, // {int} Max number of formal params allowed per function
  29. "maxdepth" : false, // {int} Max depth of nested blocks (within functions)
  30. "maxstatements" : false, // {int} Max number statements per function
  31. "maxcomplexity" : false, // {int} Max cyclomatic complexity per function
  32. "maxlen" : false, // {int} Max number of characters per line
  33. // Relaxing
  34. "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
  35. "boss" : false, // true: Tolerate assignments where comparisons would be expected
  36. "debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
  37. "eqnull" : false, // true: Tolerate use of `== null`
  38. "es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
  39. "esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`)
  40. "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
  41. // (ex: `for each`, multiple try/catch, function expression…)
  42. "evil" : false, // true: Tolerate use of `eval` and `new Function()`
  43. "expr" : false, // true: Tolerate `ExpressionStatement` as Programs
  44. "funcscope" : false, // true: Tolerate defining variables inside control statements
  45. "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
  46. "iterator" : false, // true: Tolerate using the `__iterator__` property
  47. "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
  48. "laxbreak" : false, // true: Tolerate possibly unsafe line breakings
  49. "laxcomma" : false, // true: Tolerate comma-first style coding
  50. "loopfunc" : false, // true: Tolerate functions being defined in loops
  51. "multistr" : false, // true: Tolerate multi-line strings
  52. "noyield" : false, // true: Tolerate generator functions with no yield statement in them.
  53. "notypeof" : false, // true: Tolerate invalid typeof operator values
  54. "proto" : false, // true: Tolerate using the `__proto__` property
  55. "scripturl" : false, // true: Tolerate script-targeted URLs
  56. "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
  57. "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
  58. "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
  59. "validthis" : false, // true: Tolerate using this in a non-constructor function
  60. // Environments
  61. "browser" : true, // Web Browser (window, document, etc)
  62. "browserify" : true, // Browserify (node.js code in the browser)
  63. "couch" : false, // CouchDB
  64. "devel" : true, // Development/debugging (alert, confirm, etc)
  65. "dojo" : false, // Dojo Toolkit
  66. "jasmine" : false, // Jasmine
  67. "jquery" : false, // jQuery
  68. "mocha" : false, // Mocha
  69. "mootools" : false, // MooTools
  70. "node" : true, // Node.js
  71. "nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
  72. "prototypejs" : false, // Prototype and Scriptaculous
  73. "qunit" : false, // QUnit
  74. "rhino" : false, // Rhino
  75. "shelljs" : false, // ShellJS
  76. "worker" : false, // Web Workers
  77. "wsh" : false, // Windows Scripting Host
  78. "yui" : false, // Yahoo User Interface
  79. // Custom Globals
  80. "globals" : { // additional predefined global variables
  81. "WebSocket": true
  82. }
  83. }