.jshintrc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {
  2. /*
  3. * ENVIRONMENTS
  4. * =================
  5. */
  6. // Define globals exposed by modern browsers.
  7. "browser": true,
  8. // Define globals exposed by jQuery.
  9. "jquery": true,
  10. // Define globals exposed by Node.js.
  11. "node": true,
  12. // Allow ES6.
  13. "esversion": 6,
  14. /*
  15. * ENFORCING OPTIONS
  16. * =================
  17. */
  18. // Force all variable names to use either camelCase style or UPPER_CASE
  19. // with underscores.
  20. "camelcase": true,
  21. // Prohibit use of == and != in favor of === and !==.
  22. "eqeqeq": true,
  23. // Enforce tab width of 2 spaces.
  24. "indent": 2,
  25. // Prohibit use of a variable before it is defined.
  26. "latedef": true,
  27. // Enforce line length to 100 characters
  28. "maxlen": 100,
  29. // Require capitalized names for constructor functions.
  30. "newcap": true,
  31. // Enforce use of single quotation marks for strings.
  32. "quotmark": "single",
  33. // Enforce placing 'use strict' at the top function scope
  34. // 前端项目中外层使用 strict 即可,覆盖此条规则
  35. "strict": false,
  36. // Prohibit use of explicitly undeclared variables.
  37. "undef": true,
  38. // Warn when variables are defined but never used.
  39. "unused": true,
  40. /*
  41. * RELAXING OPTIONS
  42. * =================
  43. */
  44. // Suppress warnings about == null comparisons.
  45. "eqnull": true,
  46. "globals": {
  47. "$": false,
  48. "angular": false
  49. }
  50. }