.eslintrc.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true
  5. },
  6. extends: [
  7. 'plugin:vue/vue3-strongly-recommended',
  8. '@vue/standard',
  9. '@vue/typescript/recommended'
  10. ],
  11. parserOptions: {
  12. ecmaVersion: 2020
  13. },
  14. rules: {
  15. 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  16. 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  17. '@typescript-eslint/ban-types': 'off',
  18. '@typescript-eslint/explicit-module-boundary-types': 'off',
  19. '@typescript-eslint/member-delimiter-style': ['error',
  20. {
  21. multiline: {
  22. delimiter: 'none'
  23. },
  24. singleline: {
  25. delimiter: 'comma'
  26. }
  27. }],
  28. '@typescript-eslint/no-explicit-any': 'off',
  29. 'space-before-function-paren': ['error', 'never'],
  30. 'vue/array-bracket-spacing': 'error',
  31. 'vue/arrow-spacing': 'error',
  32. 'vue/block-spacing': 'error',
  33. 'vue/brace-style': 'error',
  34. 'vue/camelcase': 'error',
  35. 'vue/comma-dangle': 'error',
  36. 'vue/component-name-in-template-casing': 'error',
  37. 'vue/eqeqeq': 'error',
  38. 'vue/key-spacing': 'error',
  39. 'vue/match-component-file-name': 'error',
  40. 'vue/object-curly-spacing': 'error',
  41. 'no-useless-escape': 'off',
  42. '@typescript-eslint/no-this-alias': [
  43. 'error',
  44. {
  45. allowDestructuring: true, // Allow `const { props, state } = this`; false by default
  46. allowedNames: ['self'] // Allow `const self = this`; `[]` by default
  47. }
  48. ],
  49. 'vue/attribute-hyphenation': 'off',
  50. 'vue/custom-event-name-casing': 'off'
  51. },
  52. overrides: [
  53. {
  54. files: [
  55. '**/__tests__/*.{j,t}s?(x)',
  56. '**/tests/unit/**/*.spec.{j,t}s?(x)'
  57. ],
  58. env: {
  59. jest: true
  60. }
  61. }
  62. ]
  63. }