.eslintrc.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. module.exports = {
  2. extends: [
  3. 'eslint:recommended',
  4. 'plugin:@typescript-eslint/eslint-recommended',
  5. 'plugin:@typescript-eslint/recommended',
  6. 'plugin:prettier/recommended'
  7. ],
  8. parser: '@typescript-eslint/parser',
  9. parserOptions: {
  10. project: 'tsconfig.json',
  11. sourceType: 'module'
  12. },
  13. plugins: ['@typescript-eslint'],
  14. rules: {
  15. '@typescript-eslint/naming-convention': [
  16. 'error',
  17. {
  18. selector: 'interface',
  19. format: ['PascalCase'],
  20. custom: {
  21. regex: '^I[A-Z]',
  22. match: true
  23. }
  24. }
  25. ],
  26. '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
  27. '@typescript-eslint/no-explicit-any': 'off',
  28. '@typescript-eslint/no-namespace': 'off',
  29. '@typescript-eslint/no-use-before-define': 'off',
  30. '@typescript-eslint/quotes': [
  31. 'error',
  32. 'single',
  33. { avoidEscape: true, allowTemplateLiterals: false }
  34. ],
  35. curly: ['error', 'all'],
  36. eqeqeq: 'error',
  37. 'prefer-arrow-callback': 'error'
  38. }
  39. };