.eslintrc.json 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. "$schema": "https://json.schemastore.org/eslintrc.json",
  3. "env": {
  4. "browser": false,
  5. "es2021": true,
  6. "node": true
  7. },
  8. "extends": [
  9. "plugin:react/recommended",
  10. "plugin:prettier/recommended",
  11. "plugin:react-hooks/recommended",
  12. "plugin:jsx-a11y/recommended"
  13. ],
  14. "plugins": [
  15. "react",
  16. "unused-imports",
  17. "import",
  18. "@typescript-eslint",
  19. "jsx-a11y",
  20. "prettier"
  21. ],
  22. "parser": "@typescript-eslint/parser",
  23. "parserOptions": {
  24. "ecmaFeatures": {
  25. "jsx": true
  26. },
  27. "ecmaVersion": 12,
  28. "sourceType": "module"
  29. },
  30. "settings": {
  31. "react": {
  32. "version": "detect"
  33. }
  34. },
  35. "rules": {
  36. "no-console": "warn",
  37. "react/prop-types": "off",
  38. "react/jsx-uses-react": "off",
  39. "react/react-in-jsx-scope": "off",
  40. "react-hooks/exhaustive-deps": "off",
  41. "jsx-a11y/click-events-have-key-events": "warn",
  42. "jsx-a11y/interactive-supports-focus": "warn",
  43. "prettier/prettier": "warn",
  44. "no-unused-vars": "off",
  45. "unused-imports/no-unused-vars": "off",
  46. "unused-imports/no-unused-imports": "warn",
  47. "@typescript-eslint/no-unused-vars": [
  48. "warn",
  49. {
  50. "args": "after-used",
  51. "ignoreRestSiblings": false,
  52. "argsIgnorePattern": "^_.*?$"
  53. }
  54. ],
  55. "import/order": [
  56. "warn",
  57. {
  58. "groups": [
  59. "type",
  60. "builtin",
  61. "object",
  62. "external",
  63. "internal",
  64. "parent",
  65. "sibling",
  66. "index"
  67. ],
  68. "pathGroups": [
  69. {
  70. "pattern": "~/**",
  71. "group": "external",
  72. "position": "after"
  73. }
  74. ],
  75. "newlines-between": "always"
  76. }
  77. ],
  78. "react/self-closing-comp": "warn",
  79. "react/jsx-sort-props": [
  80. "warn",
  81. {
  82. "callbacksLast": true,
  83. "shorthandFirst": true,
  84. "noSortAlphabetically": false,
  85. "reservedFirst": true
  86. }
  87. ],
  88. "padding-line-between-statements": [
  89. "warn",
  90. { "blankLine": "always", "prev": "*", "next": "return" },
  91. { "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
  92. {
  93. "blankLine": "any",
  94. "prev": ["const", "let", "var"],
  95. "next": ["const", "let", "var"]
  96. }
  97. ]
  98. }
  99. }