.eslintrc.json 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "env": {
  3. "browser": true,
  4. "es2021": true
  5. },
  6. "root": true,
  7. "extends": [
  8. "standard-with-typescript",
  9. "plugin:react/recommended",
  10. "plugin:@typescript-eslint/recommended",
  11. "prettier"
  12. ],
  13. "parser": "@typescript-eslint/parser",
  14. "parserOptions": {
  15. "ecmaVersion": "latest",
  16. "sourceType": "module"
  17. },
  18. "plugins": ["react"],
  19. "rules": {
  20. "no-console": "error",
  21. "@typescript-eslint/no-explicit-any": "error",
  22. "@typescript-eslint/consistent-type-definitions": ["error", "type"],
  23. "no-unused-expressions": "off",
  24. "@typescript-eslint/no-unused-expressions": "error",
  25. "no-unused-vars": "off",
  26. "@typescript-eslint/no-unused-vars": [
  27. "error",
  28. {
  29. "varsIgnorePattern": "^_",
  30. "argsIgnorePattern": "^_",
  31. "caughtErrorsIgnorePattern": "^_"
  32. }
  33. ],
  34. "@typesecript-eslint/consistent-type-imports": "off",
  35. "@typescript-eslint/strict-boolean-expressions": "off",
  36. "@typescript-eslint/no-misused-promises": [
  37. "error",
  38. {
  39. "checksVoidReturn": false
  40. }
  41. ],
  42. "@typescript-eslint/no-floating-promises": [
  43. "error",
  44. {
  45. "ignoreVoid": true
  46. }
  47. ],
  48. "@typescript-eslint/prefer-nullish-coalescing": [
  49. "error",
  50. {
  51. "ignoreConditionalTests": true,
  52. "ignoreMixedLogicalExpressions": true
  53. }
  54. ]
  55. }
  56. }