.eslintrc.json 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. "root": true,
  3. "env": {
  4. "browser": true,
  5. "commonjs": true,
  6. "node": true,
  7. "mocha": true
  8. },
  9. "extends": ["eslint:recommended"],
  10. "rules": {
  11. "array-bracket-spacing": ["warn", "never"],
  12. "arrow-body-style": ["warn", "as-needed"],
  13. "arrow-parens": ["warn", "as-needed"],
  14. "arrow-spacing": "warn",
  15. "brace-style": ["warn", "1tbs"],
  16. "camelcase": "warn",
  17. "comma-spacing": ["warn", {"after": true}],
  18. "dot-notation": "warn",
  19. "eqeqeq": ["warn", "smart"],
  20. "indent": ["warn", 2, {
  21. "SwitchCase": 1,
  22. "FunctionDeclaration": {"parameters": 1},
  23. "MemberExpression": 1,
  24. "CallExpression": {"arguments": 1}
  25. }],
  26. "key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
  27. "keyword-spacing": "warn",
  28. "no-console": "off",
  29. "no-empty": "off",
  30. "no-multi-spaces": "warn",
  31. "no-redeclare": "off",
  32. "no-restricted-globals": ["warn", "Promise"],
  33. "no-trailing-spaces": "warn",
  34. "no-undef": "error",
  35. "no-unused-vars": ["warn", {"args": "none"}],
  36. "one-var": ["warn", "never"],
  37. "padded-blocks": ["warn", "never"],
  38. "object-curly-spacing": ["warn", "never"],
  39. "quotes": ["warn", "single"],
  40. "react/prop-types": "off",
  41. "react/jsx-no-bind": "off",
  42. "semi": ["warn", "always"],
  43. "space-before-blocks": ["warn", "always"],
  44. "space-before-function-paren": ["warn", "never"],
  45. "space-in-parens": ["warn", "never"]
  46. }
  47. }