.eslintrc.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. },
  6. extends: ["plugin:vue/essential", "plugin:vue/recommended", "@vue/prettier"],
  7. rules: {
  8. "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
  9. "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
  10. "prefer-const": "warn",
  11. "vue/no-v-html": "off",
  12. "vue/multi-word-component-names": "off",
  13. "vue/attributes-order": [
  14. "error",
  15. {
  16. order: [
  17. "DEFINITION",
  18. "LIST_RENDERING",
  19. "CONDITIONALS",
  20. "RENDER_MODIFIERS",
  21. "GLOBAL",
  22. ["UNIQUE", "SLOT"],
  23. "TWO_WAY_BINDING",
  24. "OTHER_DIRECTIVES",
  25. "OTHER_ATTR",
  26. "EVENTS",
  27. "CONTENT",
  28. ],
  29. alphabetical: true,
  30. },
  31. ],
  32. "no-undef": "off",
  33. },
  34. parser: "vue-eslint-parser",
  35. parserOptions: {
  36. parser: "babel-eslint",
  37. },
  38. overrides: [
  39. {
  40. files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"],
  41. env: {
  42. jest: true,
  43. },
  44. },
  45. ],
  46. };