.eslintrc.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. "vue/no-use-v-if-with-v-for": "off",
  16. 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  17. 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  18. '@typescript-eslint/ban-types': 'off',
  19. '@typescript-eslint/explicit-module-boundary-types': 'off',
  20. '@typescript-eslint/member-delimiter-style': ['error',
  21. {
  22. multiline: {
  23. delimiter: 'none'
  24. },
  25. singleline: {
  26. delimiter: 'comma'
  27. }
  28. }],
  29. '@typescript-eslint/no-explicit-any': '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',
  38. 'vue/eqeqeq': 'error',
  39. 'vue/key-spacing': 'error',
  40. 'vue/match-component-file-name': 'error',
  41. 'vue/object-curly-spacing': 'error',
  42. 'no-useless-escape': 'off',
  43. '@typescript-eslint/no-this-alias': [
  44. 'error',
  45. {
  46. allowDestructuring: true, // Allow `const { props, state } = this`; false by default
  47. allowedNames: ['self'] // Allow `const self = this`; `[]` by default
  48. }
  49. ],
  50. 'vue/attribute-hyphenation': 'off',
  51. 'vue/custom-event-name-casing': 'off'
  52. },
  53. overrides: [
  54. {
  55. files: [
  56. '**/__tests__/*.{j,t}s?(x)',
  57. '**/tests/unit/**/*.spec.{j,t}s?(x)'
  58. ],
  59. env: {
  60. jest: true
  61. }
  62. }
  63. ]
  64. }