.eslintrc.cjs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. module.exports = {
  2. root: true,
  3. env: {
  4. browser: true,
  5. node: true,
  6. es6: true
  7. },
  8. extends: [
  9. "plugin:vue/vue3-essential",
  10. "eslint:recommended",
  11. "@vue/typescript/recommended",
  12. "@vue/prettier",
  13. "@vue/eslint-config-typescript"
  14. ],
  15. parser: "vue-eslint-parser",
  16. parserOptions: {
  17. parser: "@typescript-eslint/parser",
  18. ecmaVersion: 2020,
  19. sourceType: "module",
  20. jsxPragma: "React",
  21. ecmaFeatures: {
  22. jsx: true,
  23. tsx: true
  24. }
  25. },
  26. rules: {
  27. // TS
  28. "@typescript-eslint/no-explicit-any": "off",
  29. "no-debugger": "off",
  30. "@typescript-eslint/explicit-module-boundary-types": "off",
  31. "@typescript-eslint/ban-types": "off",
  32. "@typescript-eslint/ban-ts-comment": "off",
  33. "@typescript-eslint/no-empty-function": "off",
  34. "@typescript-eslint/no-non-null-assertion": "off",
  35. "@typescript-eslint/no-unused-vars": [
  36. "error",
  37. {
  38. argsIgnorePattern: "^_",
  39. varsIgnorePattern: "^_"
  40. }
  41. ],
  42. "no-unused-vars": [
  43. "error",
  44. {
  45. argsIgnorePattern: "^_",
  46. varsIgnorePattern: "^_"
  47. }
  48. ],
  49. // Vue
  50. "vue/no-v-html": "off",
  51. "vue/require-default-prop": "off",
  52. "vue/require-explicit-emits": "off",
  53. "vue/multi-word-component-names": "off",
  54. "vue/html-self-closing": [
  55. "error",
  56. {
  57. html: {
  58. void: "always",
  59. normal: "always",
  60. component: "always"
  61. },
  62. svg: "always",
  63. math: "always"
  64. }
  65. ],
  66. // Prettier
  67. "prettier/prettier": [
  68. "error",
  69. {
  70. endOfLine: "auto"
  71. }
  72. ]
  73. }
  74. }