.eslintrc.json 1.7 KB

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