.eslintrc.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. module.exports = {
  2. root: true,
  3. env: {
  4. browser: true,
  5. node: true
  6. },
  7. parser: 'vue-eslint-parser',
  8. plugins: [ '@typescript-eslint' ],
  9. extends: [
  10. 'eslint:recommended',
  11. 'plugin:@typescript-eslint/eslint-recommended',
  12. 'plugin:@typescript-eslint/recommended',
  13. 'plugin:@typescript-eslint/recommended-requiring-type-checking',
  14. 'prettier/@typescript-eslint'
  15. ],
  16. parserOptions: {
  17. tsconfigRootDir: 'src',
  18. project: [ '../tsconfig.json' ],
  19. parser: '@typescript-eslint/parser',
  20. ecmaVersion: 2020,
  21. sourceType: 'module'
  22. },
  23. rules: {
  24. 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  25. 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  26. '@typescript-eslint/ban-ts-ignore': 'off',
  27. '@typescript-eslint/explicit-function-return-type': 'off',
  28. '@typescript-eslint/no-explicit-any': 'off',
  29. '@typescript-eslint/no-var-requires': 'off',
  30. '@typescript-eslint/no-empty-function': 'off',
  31. 'vue/custom-event-name-casing': 'off',
  32. 'no-use-before-define': 'off',
  33. // 'no-setting-before-define': [
  34. // 'error',
  35. // {
  36. // functions: false,
  37. // classes: true,
  38. // },
  39. // ],
  40. '@typescript-eslint/no-use-before-define': 'off',
  41. // '@typescript-eslint/no-setting-before-define': [
  42. // 'error',
  43. // {
  44. // functions: false,
  45. // classes: true,
  46. // },
  47. // ],
  48. '@typescript-eslint/ban-ts-comment': 'off',
  49. '@typescript-eslint/ban-types': 'off',
  50. '@typescript-eslint/no-non-null-assertion': 'off',
  51. '@typescript-eslint/explicit-module-boundary-types': 'off',
  52. '@typescript-eslint/no-unused-vars': 'off',
  53. '@typescript-eslint/camelcase': 'off',
  54. 'no-unused-vars': 'off',
  55. 'space-before-function-paren': 'off',
  56. 'vue/script-indent': 'off'
  57. },
  58. overrides: [
  59. {
  60. files: [ '*.vue' ],
  61. rules: {
  62. indent: 'off'
  63. }
  64. }
  65. ]
  66. };