.eslintrc.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true
  5. },
  6. extends: [
  7. "plugin:vue/essential",
  8. // '@vue/standard',
  9. "eslint:recommended",
  10. "@vue/typescript/recommended"
  11. ],
  12. parserOptions: {
  13. ecmaVersion: 2020
  14. },
  15. rules: {
  16. "@typescript-eslint/ban-types": "off",
  17. "@typescript-eslint/explicit-module-boundary-types": "off",
  18. "@typescript-eslint/member-delimiter-style": [
  19. "error",
  20. {
  21. multiline: {
  22. delimiter: "none"
  23. },
  24. singleline: {
  25. delimiter: "comma"
  26. }
  27. }
  28. ],
  29. "@typescript-eslint/no-explicit-any": "off",
  30. "@typescript-eslint/no-var-requires": "off",
  31. "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
  32. "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
  33. "space-before-function-paren": [
  34. "error",
  35. { anonymous: "always", named: "never", asyncArrow: "always" }
  36. ],
  37. "vue/array-bracket-spacing": "error",
  38. "vue/arrow-spacing": "error",
  39. "vue/block-spacing": "error",
  40. "vue/brace-style": "error",
  41. "vue/camelcase": "error",
  42. "vue/comma-dangle": "error",
  43. "vue/component-name-in-template-casing": ["error", "kebab-case"],
  44. "vue/eqeqeq": "error",
  45. "vue/key-spacing": "error",
  46. "vue/match-component-file-name": "error",
  47. "vue/object-curly-spacing": ["error", "always"]
  48. },
  49. overrides: [
  50. {
  51. files: [
  52. "**/__tests__/*.{j,t}s?(x)",
  53. "**/tests/unit/**/*.spec.{j,t}s?(x)"
  54. ],
  55. env: {
  56. jest: true
  57. }
  58. }
  59. ]
  60. };