.eslintrc.js 802 B

1234567891011121314151617181920212223242526272829
  1. // .eslintrc.js
  2. module.exports = {
  3. parser: '@typescript-eslint/parser',
  4. extends: [
  5. 'plugin:@typescript-eslint/recommended',
  6. 'plugin:prettier/recommended'
  7. ],
  8. plugins: ['@typescript-eslint'],
  9. rules: {
  10. // 这条规则是为了防止写class interface的member时,分隔符和prettier产生冲突
  11. '@typescript-eslint/ban-ts-comment': 'off',
  12. '@typescript-eslint/no-var-requires': 'off',
  13. '@typescript-eslint/explicit-module-boundary-types': 'off',
  14. '@typescript-eslint/no-explicit-any': 'off',
  15. '@typescript-eslint/member-delimiter-style': [
  16. 'error',
  17. {
  18. multiline: {
  19. delimiter: 'none',
  20. requireLast: false
  21. },
  22. singleline: {
  23. delimiter: 'comma',
  24. requireLast: false
  25. }
  26. }
  27. ]
  28. }
  29. }