jshint.config 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {
  2. // Settings
  3. "passfail" : false, // Stop on first error.
  4. "maxerr" : 100, // Maximum error before stopping.
  5. // Predefined globals whom JSHint will ignore.
  6. "browser" : true, // Standard browser globals e.g. `window`, `document`.
  7. "node" : false,
  8. "rhino" : false,
  9. "couch" : false,
  10. "wsh" : true, // Windows Scripting Host.
  11. "jquery" : true,
  12. "prototypejs" : false,
  13. "mootools" : false,
  14. "dojo" : false,
  15. "predef" : [ // Custom globals.
  16. //"exampleVar",
  17. //"anotherCoolGlobal",
  18. //"iLoveDouglas"
  19. ],
  20. // Development.
  21. "debug" : false, // Allow debugger statements e.g. browser breakpoints.
  22. "devel" : true, // Allow developments statements e.g. `console.log();`.
  23. // ECMAScript 5.
  24. "es5" : true, // Allow ECMAScript 5 syntax.
  25. "strict" : false, // Require `use strict` pragma in every file.
  26. "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
  27. // The Good Parts.
  28. "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
  29. "laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
  30. "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
  31. "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
  32. "curly" : true, // Require {} for every new block or scope.
  33. "eqeqeq" : false, // Require triple equals i.e. `===`.
  34. "eqnull" : false, // Tolerate use of `== null`.
  35. "evil" : false, // Tolerate use of `eval`.
  36. "expr" : false, // Tolerate `ExpressionStatement` as Programs.
  37. "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
  38. "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
  39. "latedef" : true, // Prohipit variable use before definition.
  40. "loopfunc" : false, // Allow functions to be defined within loops.
  41. "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
  42. "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
  43. "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
  44. "scripturl" : true, // Tolerate script-targeted URLs.
  45. "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
  46. "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
  47. "undef" : true, // Require all non-global variables be declared before they are used.
  48. // Personal styling preferences.
  49. "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
  50. "noempty" : true, // Prohibit use of empty blocks.
  51. "nonew" : true, // Prohibit use of constructors for side-effects.
  52. "nomen" : false, // Prohibit use of initial or trailing underbars in names.
  53. "onevar" : false, // Allow only one `var` statement per function.
  54. "plusplus" : false, // Prohibit use of `++` & `--`.
  55. "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
  56. "trailing" : true, // Prohibit trailing whitespaces.
  57. "white" : false, // Check against strict whitespace and indentation rules.
  58. "indent" : 4 // Specify indentation spacing
  59. }