|
| 1 | +{ |
| 2 | + "$schema": "./node_modules/oxlint/configuration_schema.json", |
| 3 | + "plugins": ["import", "react", "jsx-a11y", "unicorn", "typescript"], |
| 4 | + "categories": { |
| 5 | + "correctness": "error" |
| 6 | + }, |
| 7 | + "env": { |
| 8 | + "builtin": true, |
| 9 | + "es2026": true, |
| 10 | + "browser": true |
| 11 | + }, |
| 12 | + "rules": { |
| 13 | + "array-callback-return": ["error", { "allowImplicit": true }], |
| 14 | + "default-case-last": "error", |
| 15 | + "default-param-last": "error", |
| 16 | + "eqeqeq": ["error", "always", { "null": "ignore" }], |
| 17 | + "guard-for-in": "error", |
| 18 | + "no-alert": "error", |
| 19 | + "no-cond-assign": ["error", "always"], |
| 20 | + "no-extend-native": "error", |
| 21 | + "no-loop-func": "error", |
| 22 | + "no-new": "error", |
| 23 | + "no-param-reassign": [ |
| 24 | + "error", |
| 25 | + { |
| 26 | + "props": true, |
| 27 | + "ignorePropertyModificationsForRegex": ["^existing", "draft"] |
| 28 | + } |
| 29 | + ], |
| 30 | + "no-return-assign": ["error", "always"], |
| 31 | + "no-self-compare": "error", |
| 32 | + "no-sequences": "error", |
| 33 | + "no-template-curly-in-string": "error", |
| 34 | + "no-unsafe-optional-chaining": [ |
| 35 | + "error", |
| 36 | + { "disallowArithmeticOperators": true } |
| 37 | + ], |
| 38 | + "no-unused-vars": [ |
| 39 | + "error", |
| 40 | + { |
| 41 | + "args": "all", |
| 42 | + "argsIgnorePattern": "^_+", |
| 43 | + "varsIgnorePattern": "^_+" |
| 44 | + } |
| 45 | + ], |
| 46 | + "no-void": ["error", { "allowAsStatement": true }], |
| 47 | + |
| 48 | + "no-console": "error", |
| 49 | + "new-cap": "error", |
| 50 | + "no-new-func": "error", |
| 51 | + "func-names": "error", |
| 52 | + "no-bitwise": "error", |
| 53 | + "no-multi-assign": "error", |
| 54 | + |
| 55 | + "no-restricted-globals": [ |
| 56 | + "error", |
| 57 | + { "name": "isFinite", "message": "Use Number.isFinite instead" }, |
| 58 | + { "name": "isNaN", "message": "Use Number.isNaN instead" }, |
| 59 | + "event", |
| 60 | + "name", |
| 61 | + "length", |
| 62 | + "status" |
| 63 | + ], |
| 64 | + "no-shadow": "error", |
| 65 | + "no-use-before-define": "error", |
| 66 | + |
| 67 | + "no-restricted-imports": [ |
| 68 | + "error", |
| 69 | + { |
| 70 | + "patterns": [ |
| 71 | + { |
| 72 | + "group": ["@local/*"], |
| 73 | + "message": "You cannot use unpublished local packages in a published package." |
| 74 | + } |
| 75 | + ] |
| 76 | + } |
| 77 | + ], |
| 78 | + |
| 79 | + "import/no-named-as-default": "error", |
| 80 | + "import/no-named-as-default-member": "error", |
| 81 | + "import/no-mutable-exports": "error", |
| 82 | + "import/no-duplicates": "error", |
| 83 | + "import/no-named-default": "error", |
| 84 | + "import/no-self-import": "error", |
| 85 | + "import/no-cycle": "error", |
| 86 | + |
| 87 | + "react/jsx-pascal-case": ["error", { "allowAllCaps": true }], |
| 88 | + "react/no-danger": "error", |
| 89 | + "react/jsx-no-target-blank": ["error", { "enforceDynamicLinks": "always" }], |
| 90 | + "react/jsx-no-comment-textnodes": "error", |
| 91 | + "react/no-array-index-key": "error", |
| 92 | + "react/button-has-type": [ |
| 93 | + "error", |
| 94 | + { "button": true, "submit": true, "reset": false } |
| 95 | + ], |
| 96 | + |
| 97 | + "react-hooks/rules-of-hooks": "error", |
| 98 | + "react-hooks/exhaustive-deps": "off", |
| 99 | + |
| 100 | + "jsx-a11y/prefer-tag-over-role": "off", |
| 101 | + "jsx-a11y/aria-role": ["error", { "ignoreNonDOM": false }], |
| 102 | + "jsx-a11y/no-noninteractive-tabindex": [ |
| 103 | + "error", |
| 104 | + { "tags": [], "roles": ["tabpanel"] } |
| 105 | + ], |
| 106 | + "jsx-a11y/label-has-associated-control": "error", |
| 107 | + "jsx-a11y/no-static-element-interactions": [ |
| 108 | + "error", |
| 109 | + { |
| 110 | + "handlers": [ |
| 111 | + "onClick", |
| 112 | + "onMouseDown", |
| 113 | + "onMouseUp", |
| 114 | + "onKeyPress", |
| 115 | + "onKeyDown", |
| 116 | + "onKeyUp" |
| 117 | + ] |
| 118 | + } |
| 119 | + ], |
| 120 | + |
| 121 | + "@typescript-eslint/ban-ts-comment": [ |
| 122 | + "error", |
| 123 | + { |
| 124 | + "ts-expect-error": "allow-with-description", |
| 125 | + "minimumDescriptionLength": 10 |
| 126 | + } |
| 127 | + ], |
| 128 | + "@typescript-eslint/no-empty-object-type": "error", |
| 129 | + "@typescript-eslint/no-explicit-any": "error", |
| 130 | + "@typescript-eslint/no-require-imports": "error", |
| 131 | + "@typescript-eslint/no-unnecessary-type-constraint": "error", |
| 132 | + "@typescript-eslint/no-implied-eval": "error", |
| 133 | + "@typescript-eslint/no-misused-promises": "error", |
| 134 | + "@typescript-eslint/no-unnecessary-condition": "error", |
| 135 | + "@typescript-eslint/no-unsafe-assignment": "error", |
| 136 | + "@typescript-eslint/no-unsafe-call": "error", |
| 137 | + "@typescript-eslint/no-unsafe-function-type": "error", |
| 138 | + |
| 139 | + "unicorn/no-new-array": "off", |
| 140 | + "unicorn/filename-case": "error", |
| 141 | + |
| 142 | + "constructor-super": "off", |
| 143 | + "no-class-assign": "off", |
| 144 | + "no-const-assign": "off", |
| 145 | + "no-dupe-keys": "off", |
| 146 | + "no-func-assign": "off", |
| 147 | + "no-import-assign": "off", |
| 148 | + "no-obj-calls": "off", |
| 149 | + "no-redeclare": "off", |
| 150 | + "no-setter-return": "off", |
| 151 | + "no-this-before-super": "off", |
| 152 | + "no-unsafe-negation": "off", |
| 153 | + "no-constant-condition": "off", |
| 154 | + "no-throw-literal": "off", |
| 155 | + "prefer-promise-reject-errors": "off" |
| 156 | + }, |
| 157 | + "ignorePatterns": [ |
| 158 | + "dist/**", |
| 159 | + "build/**", |
| 160 | + "coverage/**", |
| 161 | + "*.gen.*", |
| 162 | + "*.tsbuildinfo", |
| 163 | + ".turbo/**" |
| 164 | + ] |
| 165 | +} |
0 commit comments