.eslintrc.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. module.exports = {
  2. root: true,
  3. env: { node: true, browser: true, 'vue/setup-compiler-macros': true },
  4. extends: [
  5. 'vue-global-api',
  6. 'eslint:recommended',
  7. 'plugin:vue/vue3-recommended',
  8. '@vue/eslint-config-typescript/recommended',
  9. 'plugin:prettier/recommended',
  10. '@vue/eslint-config-prettier',
  11. ],
  12. globals: { defineOptions: 'writable' },
  13. parser: 'vue-eslint-parser',
  14. parserOptions: { parser: '@typescript-eslint/parser', sourceType: 'module', ecmaVersion: 2020 },
  15. rules: {
  16. '@typescript-eslint/ban-ts-comment': 'off',
  17. '@typescript-eslint/no-empty-function': 'off',
  18. '@typescript-eslint/no-explicit-any': 'off',
  19. '@typescript-eslint/no-non-null-assertion': 'off',
  20. '@typescript-eslint/no-this-alias': 'off',
  21. 'no-console': 'off',
  22. 'no-debugger': 'off',
  23. 'prefer-template': 'error',
  24. 'prettier/prettier': 'warn',
  25. 'vue/attributes-order': ['warn', { alphabetical: true }],
  26. 'vue/component-name-in-template-casing': ['error', 'kebab-case', { registeredComponentsOnly: false, ignores: [] }],
  27. 'vue/html-self-closing': ['error', { html: { void: 'any', normal: 'any', component: 'always' }, svg: 'always', math: 'always' }],
  28. 'vue/multi-word-component-names': 'off',
  29. 'vue/no-reserved-component-names': 'off',
  30. 'vue/no-setup-props-destructure': 'off',
  31. 'vue/no-v-html': 'off',
  32. 'vue/require-default-prop': 'off',
  33. 'vue/v-on-event-hyphenation': ['error', 'always', { autofix: true }],
  34. },
  35. }