.eslintrc.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // .eslintrc.js
  2. module.exports = {
  3. root: true,
  4. env: {
  5. browser: true,
  6. node: true,
  7. es6: true
  8. },
  9. parser: 'vue-eslint-parser',
  10. parserOptions: {
  11. parser: '@typescript-eslint/parser',
  12. ecmaVersion: 2020,
  13. sourceType: 'module',
  14. jsxPragma: 'React',
  15. ecmaFeatures: {
  16. jsx: true,
  17. tsx: true
  18. }
  19. },
  20. plugins: ['@typescript-eslint', 'prettier', 'import'],
  21. extends: [
  22. 'eslint:recommended',
  23. 'plugin:@typescript-eslint/recommended',
  24. 'plugin:vue/vue3-recommended',
  25. 'prettier'
  26. ],
  27. overrides: [
  28. {
  29. files: ['*.ts', '*.tsx', '*.vue'],
  30. rules: {
  31. 'no-undef': 'off'
  32. }
  33. }
  34. ],
  35. rules: {
  36. 'no-unused-vars': ['error', { varsIgnorePattern: '.*', args: 'none' }],
  37. '@typescript-eslint/no-unused-vars': 'off',
  38. 'vue/component-name-in-template-casing': [
  39. 'error',
  40. 'kebab-case',
  41. {
  42. registeredComponentsOnly: false,
  43. ignores: []
  44. }
  45. ],
  46. 'vue/prop-name-casing': ['error', 'camelCase'],
  47. 'vue/require-v-for-key': 'error',
  48. 'vue/no-use-v-if-with-v-for': [
  49. 'error',
  50. {
  51. allowUsingIterationVar: false
  52. }
  53. ],
  54. 'vue/v-bind-style': ['error', 'shorthand'],
  55. 'vue/v-on-style': ['error', 'shorthand'],
  56. 'no-useless-escape': 0
  57. }
  58. }