.eslintrc.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. module.exports = {
  2. //TODO: reorder these based on eslint docs
  3. //"parser": "babel-eslint", // for the <3 of generator comprehensions
  4. "parserOptions": {
  5. "ecmaVersion": 2017,
  6. "sourceType": "module",
  7. "ecmaFeatures": {
  8. "globalReturn": false,
  9. "impliedStrict": true,
  10. "jsx": true,
  11. "experimentalObjectRestSpread": true,
  12. },
  13. },
  14. "env": {
  15. "browser": true,
  16. "node": true,
  17. "es6": true,
  18. "mocha": true,
  19. "jquery": true,
  20. },
  21. "rules": {
  22. // Possible Errors
  23. "comma-dangle": [2, "always-multiline"],
  24. "valid-jsdoc": 2,
  25. // Best Practices
  26. "block-scoped-var": 2,
  27. "complexity": [2, 15],
  28. "curly": [2, "multi-line"],
  29. "default-case": 2,
  30. "dot-location": [2, "property"],
  31. "guard-for-in": 2,
  32. "no-floating-decimal": 2,
  33. "wrap-iife": 2, //TODO: use "any" instead?
  34. // Strict Mode
  35. "strict": [2, "global"],
  36. // Variables
  37. //
  38. // Node.js
  39. //no-sync ? ? ?
  40. // Stylistic Issues
  41. "brace-style": [2, "1tbs"],
  42. "camelcase": [2, {"properties": "always"}],
  43. "quotes": [2, "double", "avoid-escape"],
  44. "require-jsdoc": 2,
  45. // ECMAScript 6
  46. //
  47. // Legacy
  48. "max-depth": [2, 7],
  49. "max-len": [2, 140],
  50. "max-params": [2, 11],
  51. "max-statements": [2, 42],
  52. },
  53. };