.eslintrc.json 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {
  2. "extends": ["airbnb", "prettier"],
  3. "parser": "@babel/eslint-parser",
  4. "parserOptions": {
  5. "ecmaVersion": 8,
  6. "ecmaFeatures": {
  7. "experimentalObjectRestSpread": true,
  8. "impliedStrict": true,
  9. "classes": true
  10. }
  11. },
  12. "env": {
  13. "browser": true,
  14. "node": true
  15. },
  16. "reportUnusedDisableDirectives": true,
  17. "rules": {
  18. "no-debugger": 0,
  19. "no-alert": 0,
  20. "no-unused-vars": [1, { "argsIgnorePattern": "res|next|^err" }],
  21. "prefer-arrow-callback": ["error", { "allowNamedFunctions": true }],
  22. "prefer-const": ["error", { "destructuring": "all" }],
  23. "arrow-body-style": [2, "as-needed"],
  24. "no-unused-expressions": [2, { "allowTaggedTemplates": true }],
  25. "no-param-reassign": [2, { "props": false }],
  26. "no-console": 0,
  27. "no-use-before-define": 0,
  28. "no-nested-ternary": 0,
  29. "import/prefer-default-export": 0,
  30. "import/no-extraneous-dependencies": 1,
  31. "import/no-named-as-default-member": 1,
  32. "import": 0,
  33. "func-names": 0,
  34. "space-before-function-paren": 0,
  35. "comma-dangle": 0,
  36. "max-len": 0,
  37. "import/extensions": 0,
  38. "no-underscore-dangle": 0,
  39. "consistent-return": 0,
  40. "react/display-name": 1,
  41. "react/no-array-index-key": 0,
  42. "react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }],
  43. "react/react-in-jsx-scope": 0,
  44. "react/prefer-stateless-function": 0,
  45. "react/forbid-prop-types": 0,
  46. "react/no-unescaped-entities": 0,
  47. "react/prop-types": 0,
  48. "jsx-a11y/accessible-emoji": 0,
  49. "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
  50. "react/no-unknown-property": ["error", { "ignore": ["i18nIsDynamicList"] }],
  51. "radix": 0,
  52. "no-shadow": [
  53. 2,
  54. { "hoist": "all", "allow": ["resolve", "reject", "done", "next", "err", "error"] }
  55. ],
  56. "quotes": [2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
  57. "jsx-a11y/href-no-hash": "off",
  58. "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
  59. "react/jsx-props-no-spreading": 0
  60. },
  61. "overrides": [
  62. {
  63. "files": ["test/*"],
  64. "extends": ["plugin:testing-library/react", "plugin:jest-dom/recommended"],
  65. "globals": {
  66. "globalThis": false
  67. },
  68. "rules": {
  69. "testing-library/no-node-access": ["error", { "allowContainerFirstChild": true }],
  70. "testing-library/no-manual-cleanup": "off"
  71. }
  72. }
  73. ]
  74. }