.jshintrc 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. // Settings
  3. "maxerr" : 50, // Maximum error before stopping.
  4. "passfail" : false, // Stop on first error.
  5. // Predefined globals whom JSHint will ignore.
  6. "browser" : true, // Standard browser globals e.g. `window`, `document`.
  7. "jquery" : false, // Globals exposed by the jQuery JavaScript library.
  8. "node" : true, // Globals available when your code is running inside of the Node runtime environment.
  9. // Custom globals.
  10. "globals": {
  11. "after" : false,
  12. "afterEach" : false,
  13. "angular" : false,
  14. "before" : false,
  15. "beforeEach": false,
  16. "browser" : false,
  17. "describe" : false,
  18. "expect" : false,
  19. "inject" : false,
  20. "it" : false,
  21. "jasmine" : false,
  22. "spyOn" : false,
  23. "require" : false,
  24. "define" : false
  25. },
  26. // Development.
  27. "debug" : false, // Allow debugger statements e.g. browser breakpoints.
  28. "devel" : false, // Allow developments statements e.g. `console.log();`.
  29. // EcmaScript.
  30. "esnext" : true, // Allow EcmaScript 6 syntax.
  31. "globalstrict" : true, // Allow global "use strict" (also enables 'strict').
  32. "strict" : true, // Require `use strict` pragma in every file.
  33. // The Good Parts.
  34. "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
  35. "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
  36. "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
  37. "curly" : true, // Require {} for every new block or scope.
  38. "eqeqeq" : true, // Require triple equals i.e. `===`.
  39. "eqnull" : true, // Tolerate use of `== null`.
  40. "evil" : false, // Tolerate use of `eval`.
  41. "expr" : false, // Tolerate `ExpressionStatement` as Programs.
  42. "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
  43. "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
  44. "latedef" : "nofunc", // Prohibit variable use before definition.
  45. "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
  46. "loopfunc" : false, // Allow functions to be defined within loops.
  47. "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
  48. "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`.
  49. "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
  50. "scripturl" : false, // Tolerate script-targeted URLs.
  51. "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
  52. "smarttabs" : true, // Suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only.
  53. "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
  54. "undef" : true, // Require all non-global variables be declared before they are used.
  55. // Personal styling prefrences.
  56. "camelcase" : true, // Force all variable names to use either camelCase style or UPPER_CASE with underscores.
  57. "indent" : 4, // Enforces specific tab width for your code.
  58. "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
  59. "noempty" : true, // Prohipit use of empty blocks.
  60. "nomen" : false, // Prohibit use of initial or trailing underbars in names.
  61. "nonew" : false, // Prohibit use of constructors for side-effects.
  62. "onevar" : false, // Allow only one `var` statement per function.
  63. "plusplus" : false, // Prohibit use of `++` & `--`.
  64. "quotmark" : "single", // Enforces the consistency of quotation marks used throughout your code.
  65. "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
  66. "trailing" : true, // Prohibit trailing whitespaces.
  67. "undef" : true, // Prohibits the use of explicitly undeclared variables.
  68. "unused" : "vars", // Warns when you define and never use your variables.
  69. "white" : false // Check against strict whitespace and indentation rules.
  70. }