.eslintrc.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. module.exports = {
  2. "extends": ["eslint:recommended"],
  3. "env": {
  4. "es6": true,
  5. "node": true
  6. },
  7. "globals": {
  8. "setTimeout": true
  9. },
  10. "parserOptions": {
  11. "sourceType": "module"
  12. },
  13. "rules": {
  14. "no-console": ["error", { "allow": ["warn", "error"] }],
  15. "no-unsafe-finally": ["off"],
  16. "camelcase": ["error", { "properties": "always" }],
  17. "brace-style": ["off"],
  18. "eqeqeq": ["error", "smart"],
  19. "indent": ["error", 2, { "SwitchCase": 1 }],
  20. "no-throw-literal": ["error"],
  21. "comma-spacing": ["error", { "before": false, "after": true }],
  22. "comma-style": ["error", "last"],
  23. "comma-dangle": ["error", "always-multiline"],
  24. "keyword-spacing": ["error"],
  25. "no-trailing-spaces": ["error"],
  26. "no-multi-spaces": ["error"],
  27. "no-spaced-func": ["error"],
  28. "no-whitespace-before-property": ["error"],
  29. "space-before-blocks": ["error"],
  30. "space-before-function-paren": ["error", "never"],
  31. "space-in-parens": ["error", "never"],
  32. "eol-last": ["error"],
  33. "quotes": ["error", "single", { "avoidEscape": true }],
  34. "no-implicit-globals": ["error"],
  35. "no-useless-concat": ["error"],
  36. "space-infix-ops": ["error", { "int32Hint": true }],
  37. "semi-spacing": ["error", { "before": false, "after": true }],
  38. "semi": ["error", "always", { "omitLastInOneLineBlock": true }],
  39. "object-curly-spacing": ["error", "always"],
  40. "array-bracket-spacing": ["error"],
  41. "max-len": ["error", 100]
  42. }
  43. };