index.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. module.exports = {
  2. extends: [
  3. "next/core-web-vitals",
  4. "eslint:recommended",
  5. "plugin:@typescript-eslint/recommended",
  6. "plugin:@typescript-eslint/recommended-requiring-type-checking",
  7. "prettier",
  8. ],
  9. parserOptions: {
  10. tsconfigRootDir: __dirname,
  11. project: "./tsconfig.json",
  12. },
  13. plugins: ["@typescript-eslint"],
  14. rules: {
  15. indent: "off",
  16. "class-methods-use-this": "off",
  17. "react/prop-types": "off",
  18. "react/display-name": "off",
  19. "react/no-unescaped-entities": "off",
  20. "no-unused-vars": "off",
  21. "@typescript-eslint/no-unused-vars": ["error"],
  22. "require-jsdoc": "off",
  23. "valid-jsdoc": "off",
  24. "max-len": "off",
  25. "new-cap": "off",
  26. "no-invalid-this": "off",
  27. eqeqeq: "error",
  28. "object-curly-spacing": ["error", "always"],
  29. "space-before-function-paren": "off",
  30. "operator-linebreak": [
  31. "error",
  32. "after",
  33. { overrides: { "?": "before", ":": "before" } },
  34. ],
  35. "import/no-anonymous-default-export": [
  36. "error",
  37. {
  38. allowNew: true,
  39. },
  40. ],
  41. "@typescript-eslint/no-unsafe-member-access": "off",
  42. "@typescript-eslint/no-unsafe-return": "off",
  43. "@typescript-eslint/no-unsafe-assignment": "off",
  44. "@typescript-eslint/no-inferrable-types": "off",
  45. "@typescript-eslint/restrict-template-expressions": "off",
  46. "@typescript-eslint/ban-types": "off",
  47. "@typescript-eslint/no-floating-promises": "off",
  48. "@typescript-eslint/no-unsafe-call": "off",
  49. "@typescript-eslint/require-await": "off",
  50. "@typescript-eslint/restrict-plus-operands": "off",
  51. "@typescript-eslint/no-var-requires": "off",
  52. "@typescript-eslint/no-empty-interface": "off",
  53. "@typescript-eslint/no-misused-promises": "off",
  54. "@typescript-eslint/no-empty-function": "off",
  55. "@typescript-eslint/explicit-module-boundary-types": "off",
  56. "@typescript-eslint/no-explicit-any": "off",
  57. "@typescript-eslint/no-unnecessary-type-assertion": "off",
  58. "react-hooks/rules-of-hooks": "off",
  59. "react-hooks/exhaustive-deps": "off",
  60. "@next/next/no-img-element": "off",
  61. "@typescript-eslint/no-unsafe-argument": "off",
  62. "jsx-a11y/alt-text": "off",
  63. // Temporarily turn these off to allow existing code.
  64. // TODO (MR): Remove me (and those above).
  65. "@typescript-eslint/no-unsafe-enum-comparison": "off",
  66. "@typescript-eslint/no-base-to-string": "off",
  67. },
  68. };