.eslintrc.json 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. "env": {
  3. "browser": true,
  4. "commonjs": true,
  5. "es6": true
  6. },
  7. "extends": "eslint:recommended",
  8. "parserOptions": {
  9. "sourceType":"module",
  10. "ecmaFeatures": {
  11. "jsx": true,
  12. "modules": true
  13. }
  14. },
  15. "rules": {
  16. "no-undef": "error",
  17. "quotes": [
  18. 2, "double", {"avoidEscape": true, "allowTemplateLiterals": true}
  19. ],
  20. "no-unused-vars": [0],
  21. "no-console": [2],
  22. "no-empty": ["error", {"allowEmptyCatch": true}],
  23. "array-bracket-spacing": ["error", "never"],
  24. "block-spacing": ["error", "always"],
  25. "brace-style": ["error", "1tbs", {"allowSingleLine": true}],
  26. "camelcase": ["error", {"properties": "never"}],
  27. "comma-dangle": ["error", "never"],
  28. "comma-spacing": ["error", {"before": false, "after": true}],
  29. "comma-style": ["error", "last"],
  30. "computed-property-spacing": ["error", "never"],
  31. "key-spacing": [
  32. "error", {"beforeColon": false, "afterColon": true, "mode": "strict"}
  33. ],
  34. "keyword-spacing": ["error", { "before": true, "after": true }],
  35. "linebreak-style": ["error", "unix"],
  36. "max-len": ["error", 120],
  37. "no-multiple-empty-lines": ["error"],
  38. "no-spaced-func": ["error"],
  39. "no-trailing-spaces": ["error"],
  40. "no-unreachable": [1],
  41. "no-whitespace-before-property": ["error"],
  42. "object-curly-spacing": ["error", "never"],
  43. "one-var-declaration-per-line": ["error", "always"],
  44. "one-var": ["error", "never"],
  45. "semi-spacing": ["error", {"before": false, "after": true}],
  46. "semi": ["error", "always"],
  47. "space-before-function-paren": ["error", "always"],
  48. "space-before-blocks": ["error", "always"],
  49. "space-in-parens": ["error", "never"],
  50. "space-infix-ops": ["error"],
  51. "unicode-bom": ["error", "never"]
  52. }
  53. }