.eslintrc.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. module.exports = {
  2. env: {
  3. browser: true,
  4. es6: true,
  5. commonjs: true
  6. },
  7. root: true,
  8. extends: [
  9. 'eslint:recommended',
  10. 'plugin:@typescript-eslint/eslint-recommended',
  11. 'plugin:@typescript-eslint/recommended',
  12. 'prettier/@typescript-eslint',
  13. 'plugin:react/recommended'
  14. ],
  15. parser: '@typescript-eslint/parser',
  16. parserOptions: {
  17. project: 'tsconfig.eslint.json'
  18. },
  19. plugins: ['@typescript-eslint'],
  20. rules: {
  21. '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
  22. '@typescript-eslint/interface-name-prefix': [
  23. 'error',
  24. { prefixWithI: 'always' }
  25. ],
  26. '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
  27. '@typescript-eslint/no-use-before-define': 'off',
  28. '@typescript-eslint/camelcase': 'off',
  29. '@typescript-eslint/no-explicit-any': 'off',
  30. '@typescript-eslint/no-non-null-assertion': 'off',
  31. '@typescript-eslint/no-namespace': 'off',
  32. '@typescript-eslint/explicit-function-return-type': 'off',
  33. '@typescript-eslint/ban-ts-ignore': 'warn',
  34. '@typescript-eslint/no-var-requires': 'off',
  35. '@typescript-eslint/no-empty-interface': 'off',
  36. '@typescript-eslint/triple-slash-reference': 'warn',
  37. '@typescript-eslint/no-inferrable-types': 'off',
  38. 'no-inner-declarations': 'off',
  39. 'no-prototype-builtins': 'off',
  40. 'no-control-regex': 'warn',
  41. 'no-undef': 'warn',
  42. 'no-case-declarations': 'warn',
  43. 'no-useless-escape': 'off',
  44. 'prefer-const': 'warn'
  45. },
  46. settings: {
  47. react: {
  48. version: 'detect'
  49. }
  50. }
  51. };