.eslintrc.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true
  5. },
  6. extends: [
  7. 'plugin:vue/essential',
  8. '@vue/standard',
  9. '@vue/typescript/recommended'
  10. ],
  11. parserOptions: {
  12. ecmaVersion: 2020
  13. },
  14. rules: {
  15. '@typescript-eslint/ban-types': 'off',
  16. '@typescript-eslint/explicit-module-boundary-types': 'off',
  17. '@typescript-eslint/member-delimiter-style': ['error',
  18. {
  19. multiline: {
  20. delimiter: 'none'
  21. },
  22. singleline: {
  23. delimiter: 'comma'
  24. }
  25. }],
  26. '@typescript-eslint/no-explicit-any': 'off',
  27. '@typescript-eslint/no-var-requires': 'off',
  28. 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  29. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  30. 'space-before-function-paren': ['error', 'never'],
  31. 'vue/array-bracket-spacing': 'error',
  32. 'vue/arrow-spacing': 'error',
  33. 'vue/block-spacing': 'error',
  34. 'vue/brace-style': 'error',
  35. 'vue/camelcase': 'error',
  36. 'vue/comma-dangle': 'error',
  37. 'vue/component-name-in-template-casing': ['error', 'kebab-case'],
  38. 'vue/eqeqeq': 'error',
  39. 'vue/key-spacing': 'error',
  40. 'vue/match-component-file-name': 'error',
  41. 'vue/object-curly-spacing': 'error'
  42. },
  43. overrides: [
  44. {
  45. files: [
  46. '**/__tests__/*.{j,t}s?(x)',
  47. '**/tests/unit/**/*.spec.{j,t}s?(x)'
  48. ],
  49. env: {
  50. jest: true
  51. }
  52. }
  53. ]
  54. }