.eslintrc.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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-unused-expressions": "off",
  29. "no-debugger": "off",
  30. "@typescript-eslint/no-var-requires": "off",
  31. "@typescript-eslint/no-explicit-any": "off",
  32. "@typescript-eslint/explicit-module-boundary-types": "off",
  33. "@typescript-eslint/ban-types": "off",
  34. "@typescript-eslint/ban-ts-comment": "off",
  35. "@typescript-eslint/no-empty-function": "off",
  36. "@typescript-eslint/no-non-null-assertion": "off",
  37. "@typescript-eslint/no-unused-vars": [
  38. "error",
  39. {
  40. argsIgnorePattern: "^_",
  41. varsIgnorePattern: "^_"
  42. }
  43. ],
  44. "no-unused-vars": [
  45. "error",
  46. {
  47. argsIgnorePattern: "^_",
  48. varsIgnorePattern: "^_"
  49. }
  50. ],
  51. // Vue
  52. "vue/no-v-html": "off",
  53. "vue/require-default-prop": "off",
  54. "vue/require-explicit-emits": "off",
  55. "vue/multi-word-component-names": "off",
  56. "vue/html-self-closing": [
  57. "error",
  58. {
  59. html: {
  60. void: "always",
  61. normal: "always",
  62. component: "always"
  63. },
  64. svg: "always",
  65. math: "always"
  66. }
  67. ],
  68. // Prettier
  69. "prettier/prettier": [
  70. "error",
  71. {
  72. endOfLine: "auto"
  73. }
  74. ]
  75. }
  76. }