.jshintrc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {
  2. // Settings
  3. "passfail" : false, // Stop on first error.
  4. "maxerr" : 50, // Maximum error before stopping.
  5. // Predefined globals whom JSHint will ignore.
  6. "browser" : true, // Standard browser globals e.g. `window`, `document`.
  7. "couch" : false,
  8. "dojo" : false,
  9. "jquery" : true,
  10. "mootools" : false,
  11. "node" : false,
  12. "prototypejs" : false,
  13. "rhino" : false,
  14. "wsh" : false,
  15. // Custom globals.
  16. "predef" : [
  17. "define",
  18. "require"
  19. ],
  20. // Development.
  21. "debug" : false, // Allow debugger statements e.g. browser breakpoints.
  22. "devel" : false, // Allow developments statements e.g. `console.log();`.
  23. // EcmaScript 5.
  24. "es5" : false, // Allow EcmaScript 5 syntax.
  25. "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
  26. "strict" : false, // Require `use strict` pragma in every file.
  27. // The Good Parts.
  28. "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
  29. "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
  30. "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
  31. "curly" : false, // Require {} for every new block or scope.
  32. "eqeqeq" : true, // Require triple equals i.e. `===`.
  33. "eqnull" : true, // Tolerate use of `== null`.
  34. "evil" : false, // Tolerate use of `eval`.
  35. "expr" : false, // Tolerate `ExpressionStatement` as Programs.
  36. "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
  37. "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
  38. "latedef" : false, // Prohibit variable use before definition.
  39. "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
  40. "loopfunc" : false, // Allow functions to be defined within loops.
  41. "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
  42. "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`.
  43. "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
  44. "scripturl" : false, // 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" : false, // Require all non-global variables be declared before they are used.
  48. // Personal styling prefrences.
  49. "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
  50. "noempty" : true, // Prohipit use of empty blocks.
  51. "nomen" : false, // Prohibit use of initial or trailing underbars in names.
  52. "nonew" : true, // Prohibit use of constructors for side-effects.
  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. }