.eslintrc.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. },
  6. extends: [
  7. 'plugin:vue/vue3-essential',
  8. '@vue/airbnb',
  9. '@vue/typescript/recommended',
  10. '@vue/prettier',
  11. '@vue/prettier/@typescript-eslint',
  12. ],
  13. parserOptions: {
  14. ecmaVersion: 2020,
  15. parser: '@typescript-eslint/parser',
  16. },
  17. rules: {
  18. 'import/extensions': [
  19. 'error',
  20. 'ignorePackages',
  21. {
  22. js: 'never',
  23. mjs: 'never',
  24. jsx: 'never',
  25. ts: 'never',
  26. tsx: 'never',
  27. },
  28. ],
  29. 'import/no-unresolved': 'off',
  30. '@typescript-eslint/no-empty-function': 'off',
  31. '@typescript-eslint/no-explicit-any': 'off',
  32. '@typescript-eslint/explicit-module-boundary-types': 'off',
  33. '@typescript-eslint/no-non-null-assertion': 'off',
  34. 'no-unused-expressions': [
  35. 'error',
  36. {
  37. allowShortCircuit: true,
  38. },
  39. ],
  40. 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
  41. 'no-restricted-syntax': 'off',
  42. 'no-shadow': 'off',
  43. 'vue/no-v-model-argument': 'off',
  44. '@typescript-eslint/no-shadow': 'error',
  45. '@typescript-eslint/interface-name-prefix': 'off',
  46. '@typescript-eslint/no-var-requires': 'off',
  47. 'no-return-assign': 'off',
  48. 'no-param-reassign': 'off',
  49. 'no-plusplus': 'off',
  50. 'class-methods-use-this': 'off',
  51. 'no-await-in-loop': 'off',
  52. 'no-continue': 'off',
  53. 'guard-for-in': 'off',
  54. 'no-return-await': 'off',
  55. 'prefer-destructuring': 'off',
  56. '@typescript-eslint/no-this-alias': 'off',
  57. 'import/order': [
  58. 'error',
  59. {
  60. pathGroups: [
  61. {
  62. pattern: '@/**',
  63. group: 'internal',
  64. },
  65. ],
  66. groups: [['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object']],
  67. },
  68. ],
  69. },
  70. globals: {
  71. },
  72. overrides: [
  73. {
  74. files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
  75. env: {
  76. mocha: true,
  77. },
  78. },
  79. ],
  80. };