.oxlintrc.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {
  2. "$schema": "./node_modules/oxlint/configuration_schema.json",
  3. "ignorePatterns": [
  4. "node_modules/**"
  5. ],
  6. "plugins": [
  7. "typescript",
  8. "react",
  9. "jsx-a11y"
  10. ],
  11. "jsPlugins": [
  12. "./tools/oxlint/input-number-guard.mjs"
  13. ],
  14. "categories": {
  15. "correctness": "error"
  16. },
  17. "env": {
  18. "browser": true,
  19. "es2022": true
  20. },
  21. "rules": {
  22. "typescript/no-explicit-any": "error",
  23. "typescript/no-unused-vars": [
  24. "warn",
  25. {
  26. "argsIgnorePattern": "^_",
  27. "varsIgnorePattern": "^_",
  28. "caughtErrorsIgnorePattern": "^_"
  29. }
  30. ],
  31. "typescript/ban-ts-comment": "error",
  32. "typescript/no-empty-object-type": "error",
  33. "typescript/no-namespace": "error",
  34. "typescript/no-require-imports": "error",
  35. "typescript/no-this-alias": "error",
  36. "typescript/no-unsafe-function-type": "error",
  37. "typescript/no-unused-expressions": "warn",
  38. "typescript/no-wrapper-object-types": "error",
  39. "typescript/prefer-as-const": "error",
  40. "typescript/triple-slash-reference": "error",
  41. "no-empty": [
  42. "error",
  43. {
  44. "allowEmptyCatch": true
  45. }
  46. ],
  47. "react-hooks/rules-of-hooks": "error",
  48. "react-hooks/exhaustive-deps": "error",
  49. "jsx-a11y/no-autofocus": "off",
  50. "input-number/no-synthetic-clear": "off",
  51. "jsx-a11y/prefer-tag-over-role": "off"
  52. },
  53. "overrides": [
  54. {
  55. "files": [
  56. "src/pages/settings/**/*.tsx",
  57. "src/pages/xray/**/*.tsx"
  58. ],
  59. "rules": {
  60. "input-number/no-synthetic-clear": "error"
  61. }
  62. },
  63. {
  64. "files": [
  65. "src/pages/xray/**/*Modal.tsx"
  66. ],
  67. "rules": {
  68. "input-number/no-synthetic-clear": "off"
  69. }
  70. }
  71. ]
  72. }