.eslintrc.json 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {
  2. "extends": ["plugin:react-hooks/recommended"],
  3. "parser": "@typescript-eslint/parser",
  4. "plugins": ["react", "@typescript-eslint"],
  5. "root": true,
  6. "rules": {
  7. "import/no-anonymous-default-export": "off",
  8. "no-restricted-globals": "off",
  9. "@typescript-eslint/no-unused-vars": "warn",
  10. "curly": "warn",
  11. "dot-notation": "warn",
  12. "no-console": [
  13. "warn",
  14. {
  15. "allow": ["warn", "error", "info"]
  16. }
  17. ],
  18. "no-else-return": "warn",
  19. "no-lonely-if": "warn",
  20. "no-restricted-syntax": [
  21. "warn",
  22. {
  23. "message": "Use 't(...)' instead of literal text in JSX",
  24. "selector": "JSXText[value=/\\w/]"
  25. }
  26. ],
  27. "no-unneeded-ternary": "warn",
  28. "no-unused-expressions": "warn",
  29. "no-unused-vars": "off",
  30. "no-useless-return": "warn",
  31. "no-var": "warn",
  32. "object-shorthand": "warn",
  33. "one-var": ["warn", "never"],
  34. "prefer-arrow-callback": "warn",
  35. "prefer-const": [
  36. "warn",
  37. {
  38. "destructuring": "all"
  39. }
  40. ],
  41. "prefer-template": "warn"
  42. }
  43. }