.eslintrc.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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": 2018,
  6. "sourceType": "module",
  7. "ecmaFeatures": {
  8. "impliedStrict": true,
  9. "jsx": true,
  10. },
  11. },
  12. "env": {
  13. "browser": true,
  14. "node": true,
  15. "es6": true,
  16. "mocha": true,
  17. },
  18. "rules": {
  19. // Possible Errors
  20. "comma-dangle": [2, "always-multiline"],
  21. "valid-jsdoc": 2,
  22. // Best Practices
  23. "block-scoped-var": 2,
  24. "complexity": [2, 15],
  25. "curly": [2, "multi-line"],
  26. "default-case": 2,
  27. "dot-location": [2, "property"],
  28. "guard-for-in": 2,
  29. "no-floating-decimal": 2,
  30. "wrap-iife": 2, //TODO: use "any" instead?
  31. // Strict Mode
  32. "strict": [2, "global"],
  33. // Variables
  34. // …
  35. // Node.js
  36. // …
  37. // Stylistic Issues
  38. "brace-style": [2, "1tbs"],
  39. "camelcase": [2, { "properties": "always" }],
  40. "quotes": [2, "double", "avoidEscape"],
  41. "require-jsdoc": 2,
  42. // ECMAScript 6
  43. // …
  44. // Legacy
  45. "max-depth": [2, 7],
  46. "max-len": [2, 140],
  47. "max-params": [2, 11],
  48. "max-statements": [2, 42],
  49. },
  50. };