.jshintrc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // --------------------------------------------------------------------
  2. // WordPress JSHint Configuration
  3. // --------------------------------------------------------------------
  4. {
  5. "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
  6. "curly" : true, // Require {} for every new block or scope.
  7. "eqeqeq" : true, // Require triple equals i.e. `===`.
  8. "forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`.
  9. "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
  10. "latedef" : true, // Prohibit variable use before definition.
  11. "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
  12. "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
  13. "noempty" : true, // Prohibit use of empty blocks.
  14. "nonew" : true, // Prohibit use of constructors for side-effects.
  15. "plusplus" : false, // Prohibit use of `++` & `--`.
  16. "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
  17. "undef" : true, // Require all non-global variables be declared before they are used.
  18. "strict" : true, // Require `use strict` pragma in every file.
  19. "trailing" : true, // Prohibit trailing whitespaces.
  20. "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
  21. "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
  22. "debug" : false, // Allow debugger statements e.g. browser breakpoints.
  23. "eqnull" : false, // Tolerate use of `== null`.
  24. "es5" : false, // Allow EcmaScript 5 syntax.
  25. "esnext" : false, // Allow ES.next specific features such as `const` and `let`.
  26. "evil" : false, // Tolerate use of `eval`.
  27. "expr" : false, // Tolerate `ExpressionStatement` as Programs.
  28. "funcscope" : false, // Tolerate declarations of variables inside of control structures while accessing them later from the outside.
  29. "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
  30. "iterator" : false, // Allow usage of __iterator__ property.
  31. "lastsemic" : false, // Tolerate missing semicolons when it is omitted for the last statement in a one-line block.
  32. "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
  33. "laxcomma" : false, // Suppress warnings about comma-first coding style.
  34. "loopfunc" : false, // Allow functions to be defined within loops.
  35. "multistr" : false, // Tolerate multi-line strings.
  36. "onecase" : false, // Tolerate switches with just one case.
  37. "proto" : false, // Tolerate __proto__ property. This property is deprecated.
  38. "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
  39. "scripturl" : false, // Tolerate script-targeted URLs.
  40. "smarttabs" : false, // Tolerate mixed tabs and spaces when the latter are used for alignmnent only.
  41. "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
  42. "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
  43. "supernew" : true, // Tolerate `new function () { ... };` and `new Object;`.
  44. "validthis" : false, // Tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function.
  45. "browser" : true, // Standard browser globals e.g. `window`, `document`.
  46. "couch" : false, // Enable globals exposed by CouchDB.
  47. "devel" : false, // Allow development statements e.g. `console.log();`.
  48. "dojo" : false, // Enable globals exposed by Dojo Toolkit.
  49. "jquery" : true, // Enable globals exposed by jQuery JavaScript library.
  50. "mootools" : false, // Enable globals exposed by MooTools JavaScript framework.
  51. "node" : false, // Enable globals available when code is running inside of the NodeJS runtime environment.
  52. "nonstandard" : false, // Define non-standard but widely adopted globals such as escape and unescape.
  53. "prototypejs" : false, // Enable globals exposed by Prototype JavaScript framework.
  54. "rhino" : false, // Enable globals available when your code is running inside of the Rhino runtime environment.
  55. "wsh" : false, // Enable globals available when your code is running as a script for the Windows Script Host.
  56. "nomen" : false, // Prohibit use of initial or trailing underbars in names.
  57. "onevar" : false, // Allow only one `var` statement per function.
  58. "passfail" : false, // Stop on first error.
  59. "white" : false, // Check against strict whitespace and indentation rules.
  60. "maxerr" : 100, // Maximum errors before stopping.
  61. "predef" : [], // Extra globals.
  62. "indent" : 4 // Specify indentation spacing
  63. }