.eslintrc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. "parser": "@typescript-eslint/parser",
  3. "parserOptions": {
  4. "project": "./tsconfig.json"
  5. },
  6. "extends": [
  7. "airbnb",
  8. "airbnb-typescript",
  9. "prettier",
  10. "plugin:@typescript-eslint/eslint-recommended",
  11. "plugin:@typescript-eslint/recommended",
  12. "plugin:react/recommended",
  13. "plugin:react-hooks/recommended"
  14. ],
  15. "plugins": ["prettier"],
  16. "rules": {
  17. "prettier/prettier": ["error"]
  18. },
  19. "settings": {
  20. "react": {
  21. "version": "detect"
  22. }
  23. },
  24. "overrides": [
  25. {
  26. "files": ["*.ts", "*.tsx"],
  27. "rules": {
  28. // Allow state modification in reduce and Redux reducers
  29. "no-param-reassign": ["error", {
  30. "props": true,
  31. "ignorePropertyModificationsFor": [
  32. "acc", "state"
  33. ]
  34. }],
  35. // For https://stackoverflow.com/questions/55844608/stuck-with-eslint-error-i-e-separately-loops-should-be-avoided-in-favor-of-arra
  36. "no-restricted-syntax": "off",
  37. "import/prefer-default-export": "off",
  38. "no-underscore-dangle": "off",
  39. "jsx-a11y/no-static-element-interactions": "off",
  40. "jsx-a11y/click-events-have-key-events": "off",
  41. // For https://github.com/airbnb/javascript/issues/1885
  42. "jsx-a11y/label-has-associated-control": [ 2, {
  43. "required": {
  44. "some": [ "nesting", "id" ]
  45. }
  46. }],
  47. "react/no-array-index-key": "off"
  48. },"parserOptions": {
  49. "project": ["**/tsconfig.json"]
  50. }
  51. }
  52. ]
  53. }