# Oxlint default

What Oxlint checks with no config: the correctness category, rules that flag code that is outright wrong or useless.

- Linter: Oxlint
- Package: `oxlint` (https://oxc.rs/docs/guide/usage/linter/config.html)
- Author: Oxc (official)
- Rules: 111
- Weekly downloads: 50.8M, +183.6% last quarter
- Technologies: javascript (84), typescript (27)

## Install

```sh
npm install -D oxlint
pnpm add -D oxlint
yarn add -D oxlint
bun add -d oxlint
```

## Config: `.oxlintrc.json`

```json
// .oxlintrc.json
{
  "categories": { "correctness": "warn" }
}
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [eslint/no-cond-assign](https://lintradar.dev/rules/eslint/no-cond-assign.md) | warn | Disallow assignment operators in conditional expressions | 282.3M |
| [eslint/no-ex-assign](https://lintradar.dev/rules/eslint/no-ex-assign.md) | warn | Disallow reassigning exceptions in `catch` clauses | 282.3M |
| [eslint/no-global-assign](https://lintradar.dev/rules/eslint/no-global-assign.md) | warn | Disallow assignments to native objects or read-only global variables | 282.3M |
| [eslint/no-shadow-restricted-names](https://lintradar.dev/rules/eslint/no-shadow-restricted-names.md) | warn | Disallow identifiers from shadowing restricted names | 282.3M |
| [eslint/no-sparse-arrays](https://lintradar.dev/rules/eslint/no-sparse-arrays.md) | warn | Disallow sparse arrays | 282.3M |
| [eslint/use-isnan](https://lintradar.dev/rules/eslint/use-isnan.md) | warn | Require calls to `isNaN()` when checking for `NaN` | 282.3M |
| [eslint/no-control-regex](https://lintradar.dev/rules/eslint/no-control-regex.md) | warn | Disallow control characters in regular expressions | 282.3M |
| [eslint/no-useless-escape](https://lintradar.dev/rules/eslint/no-useless-escape.md) | warn | Disallow unnecessary escape characters | 281.5M |
| [eslint/no-empty-character-class](https://lintradar.dev/rules/eslint/no-empty-character-class.md) | warn | Disallow empty character classes in regular expressions | 281.1M |
| [eslint/no-duplicate-case](https://lintradar.dev/rules/eslint/no-duplicate-case.md) | warn | Disallow duplicate case labels | 281.1M |
| [eslint/no-empty-pattern](https://lintradar.dev/rules/eslint/no-empty-pattern.md) | warn | Disallow empty destructuring patterns | 281.1M |
| [eslint/no-self-assign](https://lintradar.dev/rules/eslint/no-self-assign.md) | warn | Disallow assignments where both sides are exactly the same | 281.1M |
| [eslint/valid-typeof](https://lintradar.dev/rules/eslint/valid-typeof.md) | warn | Enforce comparing `typeof` expressions against valid strings | 280.8M |
| [eslint/no-with](https://lintradar.dev/rules/eslint/no-with.md) | warn | Disallow `with` statements | 279.7M |
| [eslint/no-const-assign](https://lintradar.dev/rules/eslint/no-const-assign.md) | warn | Disallow reassigning `const`, `using`, and `await using` variables | 278.7M |
| [eslint/no-dupe-keys](https://lintradar.dev/rules/eslint/no-dupe-keys.md) | warn | Disallow duplicate keys in object literals | 278.7M |
| [eslint/no-func-assign](https://lintradar.dev/rules/eslint/no-func-assign.md) | warn | Disallow reassigning `function` declarations | 278.7M |
| [eslint/no-obj-calls](https://lintradar.dev/rules/eslint/no-obj-calls.md) | warn | Disallow calling global object properties as functions | 278.7M |
| [eslint/no-unreachable](https://lintradar.dev/rules/eslint/no-unreachable.md) | warn | Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements | 278.7M |
| [eslint/no-debugger](https://lintradar.dev/rules/eslint/no-debugger.md) | warn | Disallow the use of `debugger` | 278.2M |
| [eslint/no-extra-boolean-cast](https://lintradar.dev/rules/eslint/no-extra-boolean-cast.md) | warn | Disallow unnecessary boolean casts | 278.2M |
| [eslint/no-this-before-super](https://lintradar.dev/rules/eslint/no-this-before-super.md) | warn | Disallow `this`/`super` before calling `super()` in constructors | 278.1M |
| [eslint/no-irregular-whitespace](https://lintradar.dev/rules/eslint/no-irregular-whitespace.md) | warn | Disallow irregular whitespace | 277.6M |
| [eslint/no-unsafe-negation](https://lintradar.dev/rules/eslint/no-unsafe-negation.md) | warn | Disallow negating the left operand of relational operators | 277.5M |
| [eslint/no-async-promise-executor](https://lintradar.dev/rules/eslint/no-async-promise-executor.md) | warn | Disallow using an async function as a Promise executor | 277M |
| [eslint/no-compare-neg-zero](https://lintradar.dev/rules/eslint/no-compare-neg-zero.md) | warn | Disallow comparing against `-0` | 277M |
| [eslint/no-misleading-character-class](https://lintradar.dev/rules/eslint/no-misleading-character-class.md) | warn | Disallow characters which are made with multiple code points in character class syntax | 277M |
| [eslint/no-unsafe-finally](https://lintradar.dev/rules/eslint/no-unsafe-finally.md) | warn | Disallow control flow statements in `finally` blocks | 277M |
| [eslint/no-useless-catch](https://lintradar.dev/rules/eslint/no-useless-catch.md) | warn | Disallow unnecessary `catch` clauses | 277M |
| [eslint/require-yield](https://lintradar.dev/rules/eslint/require-yield.md) | warn | Require generator functions to contain `yield` | 276.9M |
| [eslint/no-unused-labels](https://lintradar.dev/rules/eslint/no-unused-labels.md) | warn | Disallow unused labels | 276.7M |
| [eslint/no-loss-of-precision](https://lintradar.dev/rules/eslint/no-loss-of-precision.md) | warn | Disallow literal numbers that lose precision | 276.6M |
| [eslint/no-constant-condition](https://lintradar.dev/rules/eslint/no-constant-condition.md) | warn | Disallow constant expressions in conditions | 276.2M |
| [eslint/no-useless-backreference](https://lintradar.dev/rules/eslint/no-useless-backreference.md) | warn | Disallow useless backreferences in regular expressions | 275.8M |
| [eslint/no-dupe-class-members](https://lintradar.dev/rules/eslint/no-dupe-class-members.md) | warn | Disallow duplicate class members | 274.5M |
| [eslint/getter-return](https://lintradar.dev/rules/eslint/getter-return.md) | warn | Enforce `return` statements in getters | 274.2M |
| [eslint/constructor-super](https://lintradar.dev/rules/eslint/constructor-super.md) | warn | Require `super()` calls in constructors | 274.1M |
| [eslint/no-unused-vars](https://lintradar.dev/rules/eslint/no-unused-vars.md) | warn | Disallow unused variables | 273.9M |
| [eslint/no-class-assign](https://lintradar.dev/rules/eslint/no-class-assign.md) | warn | Disallow reassigning class members | 273.7M |
| [eslint/no-import-assign](https://lintradar.dev/rules/eslint/no-import-assign.md) | warn | Disallow assigning to imported bindings | 273.4M |
| [eslint/for-direction](https://lintradar.dev/rules/eslint/for-direction.md) | warn | Enforce `for` loop update clause moving the counter in the right direction | 272.8M |
| [eslint/no-dupe-else-if](https://lintradar.dev/rules/eslint/no-dupe-else-if.md) | warn | Disallow duplicate conditions in if-else-if chains | 272.8M |
| [eslint/no-nonoctal-decimal-escape](https://lintradar.dev/rules/eslint/no-nonoctal-decimal-escape.md) | warn | Disallow `\8` and `\9` escape sequences in string literals | 272.8M |
| [eslint/no-unsafe-optional-chaining](https://lintradar.dev/rules/eslint/no-unsafe-optional-chaining.md) | warn | Disallow use of optional chaining in contexts where the `undefined` value is not allowed | 272.6M |
| [eslint/no-setter-return](https://lintradar.dev/rules/eslint/no-setter-return.md) | warn | Disallow returning values from setters | 270.1M |
| [eslint/no-unused-private-class-members](https://lintradar.dev/rules/eslint/no-unused-private-class-members.md) | warn | Disallow unused private class members | 262.3M |
| [typescript/no-duplicate-enum-values](https://lintradar.dev/rules/typescript/no-duplicate-enum-values.md) | warn | Disallow duplicate enum member values | 260.7M |
| [typescript/no-non-null-asserted-optional-chain](https://lintradar.dev/rules/typescript/no-non-null-asserted-optional-chain.md) | warn | Disallow non-null assertions after an optional chain expression | 260.7M |
| [typescript/no-this-alias](https://lintradar.dev/rules/typescript/no-this-alias.md) | warn | Disallow aliasing `this` | 260.7M |
| [typescript/prefer-namespace-keyword](https://lintradar.dev/rules/typescript/prefer-namespace-keyword.md) | warn | Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules | 260.7M |
| [typescript/no-extra-non-null-assertion](https://lintradar.dev/rules/typescript/no-extra-non-null-assertion.md) | warn | Disallow extra non-null assertions | 260.7M |
| [typescript/no-misused-new](https://lintradar.dev/rules/typescript/no-misused-new.md) | warn | Enforce valid definition of `new` and `constructor` | 260.7M |
| [typescript/no-unsafe-declaration-merging](https://lintradar.dev/rules/typescript/no-unsafe-declaration-merging.md) | warn | Disallow unsafe declaration merging | 260.7M |
| [typescript/triple-slash-reference](https://lintradar.dev/rules/typescript/triple-slash-reference.md) | warn | Disallow certain triple slash directives in favor of ES6-style import declarations | 260M |
| [eslint/no-delete-var](https://lintradar.dev/rules/eslint/no-delete-var.md) | warn | Disallow deleting variables | 253.8M |
| [eslint/no-invalid-regexp](https://lintradar.dev/rules/eslint/no-invalid-regexp.md) | warn | Disallow invalid regular expression strings in `RegExp` constructors | 252.6M |
| [eslint/no-constant-binary-expression](https://lintradar.dev/rules/eslint/no-constant-binary-expression.md) | warn | Disallow expressions where the operation doesn't affect the value | 234.4M |
| [eslint/no-empty-static-block](https://lintradar.dev/rules/eslint/no-empty-static-block.md) | warn | Disallow empty static blocks | 234.3M |
| [eslint/no-unassigned-vars](https://lintradar.dev/rules/eslint/no-unassigned-vars.md) | warn | Disallow `let` or `var` variables that are read but never assigned | 233.6M |
| [typescript/prefer-as-const](https://lintradar.dev/rules/typescript/prefer-as-const.md) | warn | Enforce the use of `as const` over literal type | 232.2M |
| [typescript/no-wrapper-object-types](https://lintradar.dev/rules/typescript/no-wrapper-object-types.md) | warn | Disallow using confusing built-in primitive class wrappers | 232.2M |
| [eslint/no-new-native-nonconstructor](https://lintradar.dev/rules/eslint/no-new-native-nonconstructor.md) | warn | Disallow `new` operators with global non-constructor functions | 231.9M |
| [typescript/no-floating-promises](https://lintradar.dev/rules/typescript/no-floating-promises.md) | warn | Require Promise-like statements to be handled appropriately | 126.5M |
| [typescript/no-array-delete](https://lintradar.dev/rules/typescript/no-array-delete.md) | warn | Disallow using the `delete` operator on array values | 125.9M |
| [typescript/no-duplicate-type-constituents](https://lintradar.dev/rules/typescript/no-duplicate-type-constituents.md) | warn | Disallow duplicate constituents of union or intersection types | 125.9M |
| [typescript/no-unsafe-unary-minus](https://lintradar.dev/rules/typescript/no-unsafe-unary-minus.md) | warn | Require unary negation to take a number | 125.9M |
| [typescript/no-redundant-type-constituents](https://lintradar.dev/rules/typescript/no-redundant-type-constituents.md) | warn | Disallow members of unions and intersections that do nothing or override type information | 125.5M |
| [eslint/no-caller](https://lintradar.dev/rules/eslint/no-caller.md) | warn | Disallow the use of `arguments.caller` or `arguments.callee` | 102.1M |
| [eslint/no-eval](https://lintradar.dev/rules/eslint/no-eval.md) | warn | Disallow the use of `eval()` | 101.4M |
| [eslint/no-useless-rename](https://lintradar.dev/rules/eslint/no-useless-rename.md) | warn | Disallow renaming import, export, and destructured assignments to the same name | 100.2M |
| [typescript/no-implied-eval](https://lintradar.dev/rules/typescript/no-implied-eval.md) | warn | Disallow the use of `eval()`-like functions | 98.9M |
| [typescript/no-for-in-array](https://lintradar.dev/rules/typescript/no-for-in-array.md) | warn | Disallow iterating over an array with a for-in loop | 97.4M |
| [typescript/no-base-to-string](https://lintradar.dev/rules/typescript/no-base-to-string.md) | warn | Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified | 97.4M |
| [typescript/await-thenable](https://lintradar.dev/rules/typescript/await-thenable.md) | warn | Disallow awaiting a value that is not a Thenable | 97.4M |
| [typescript/restrict-template-expressions](https://lintradar.dev/rules/typescript/restrict-template-expressions.md) | warn | Enforce template literal expressions to be of `string` type | 97.4M |
| [typescript/no-meaningless-void-operator](https://lintradar.dev/rules/typescript/no-meaningless-void-operator.md) | warn | Disallow the `void` operator except when used to discard a value | 97.4M |
| [typescript/no-misused-spread](https://lintradar.dev/rules/typescript/no-misused-spread.md) | warn | Disallow using the spread operator when it might cause unexpected behavior | 97.4M |
| [typescript/no-useless-default-assignment](https://lintradar.dev/rules/typescript/no-useless-default-assignment.md) | warn | Disallow default values that will never be used | 97.4M |
| [typescript/unbound-method](https://lintradar.dev/rules/typescript/unbound-method.md) | warn | Enforce unbound methods are called with their expected scope | 97M |
| [unicorn/no-await-in-promise-methods](https://lintradar.dev/rules/unicorn/no-await-in-promise-methods.md) | warn | Disallow using `await` in `Promise` method parameters. | 91.3M |
| [unicorn/no-invalid-fetch-options](https://lintradar.dev/rules/unicorn/no-invalid-fetch-options.md) | warn | Disallow invalid options in `fetch()` and `new Request()`. | 91.3M |
| [unicorn/no-invalid-remove-event-listener](https://lintradar.dev/rules/unicorn/no-invalid-remove-event-listener.md) | warn | Prevent calling `EventTarget#removeEventListener()` with the result of an expression. | 91.3M |
| [unicorn/no-single-promise-in-promise-methods](https://lintradar.dev/rules/unicorn/no-single-promise-in-promise-methods.md) | warn | Disallow passing single-element arrays to `Promise` methods. | 91.3M |
| [unicorn/no-thenable](https://lintradar.dev/rules/unicorn/no-thenable.md) | warn | Disallow `then` property. | 91.3M |
| [unicorn/no-useless-fallback-in-spread](https://lintradar.dev/rules/unicorn/no-useless-fallback-in-spread.md) | warn | Disallow useless fallback when spreading in object literals. | 91.3M |
| [unicorn/no-useless-length-check](https://lintradar.dev/rules/unicorn/no-useless-length-check.md) | warn | Disallow useless array length check. | 91.3M |
| [unicorn/no-useless-spread](https://lintradar.dev/rules/unicorn/no-useless-spread.md) | warn | Disallow unnecessary spread. | 91.3M |
| [unicorn/prefer-set-size](https://lintradar.dev/rules/unicorn/prefer-set-size.md) | warn | Prefer using `Set#size` instead of `Array#length`. | 91.3M |
| [typescript/no-useless-empty-export](https://lintradar.dev/rules/typescript/no-useless-empty-export.md) | warn | Disallow empty exports that don't change anything in a module file | 82M |
| [oxc/bad-array-method-on-arguments](https://lintradar.dev/rules/oxc/bad-array-method-on-arguments.md) | warn | This rule applies when an array method is called on the arguments object itself. | 81.4M |
| [oxc/bad-char-at-comparison](https://lintradar.dev/rules/oxc/bad-char-at-comparison.md) | warn | This rule warns when a character accessed with `charAt`, `at`, or bracket notation is compared with a string of length greater than 1. | 81.4M |
| [oxc/bad-comparison-sequence](https://lintradar.dev/rules/oxc/bad-comparison-sequence.md) | warn | This rule applies when the comparison operator is applied two or more times in a row. | 81.4M |
| [oxc/bad-match-all-arg](https://lintradar.dev/rules/oxc/bad-match-all-arg.md) | warn | This rule warns when the `matchAll` method is called with a regular expression that does not have the global flag (g). | 81.4M |
| [oxc/bad-min-max-func](https://lintradar.dev/rules/oxc/bad-min-max-func.md) | warn | Checks whether the clamp function `Math.min(Math.max(x, y), z)` always evaluates to a constant result because the arguments are in the wrong order. | 81.4M |
| [oxc/bad-object-literal-comparison](https://lintradar.dev/rules/oxc/bad-object-literal-comparison.md) | warn | Checks for comparisons between object and array literals. | 81.4M |
| [oxc/bad-replace-all-arg](https://lintradar.dev/rules/oxc/bad-replace-all-arg.md) | warn | This rule warns when the `replaceAll` method is called with a regular expression that does not have the global flag (g). | 81.4M |
| [oxc/const-comparisons](https://lintradar.dev/rules/oxc/const-comparisons.md) | warn | Checks for redundant or logically impossible comparisons. This includes: - Ineffective double comparisons against constants. - Impossible comparisons involving constants. - Redundant comparisons where both operands are the same (e.g., a < a). | 81.4M |
| [oxc/erasing-op](https://lintradar.dev/rules/oxc/erasing-op.md) | warn | Checks for erasing operations, e.g., `x * 0`. | 81.4M |
| [oxc/missing-throw](https://lintradar.dev/rules/oxc/missing-throw.md) | warn | Checks whether the `throw` keyword is missing in front of a `new` expression. | 81.4M |
| [oxc/number-arg-out-of-range](https://lintradar.dev/rules/oxc/number-arg-out-of-range.md) | warn | Checks whether the radix or precision arguments of number-related functions exceed the limit. | 81.4M |
| [oxc/uninvoked-array-callback](https://lintradar.dev/rules/oxc/uninvoked-array-callback.md) | warn | This rule applies when an Array function has a callback argument used for an array with empty slots. | 81.4M |
| [eslint/no-iterator](https://lintradar.dev/rules/eslint/no-iterator.md) | warn | Disallow the use of the `__iterator__` property | 72.9M |
| [eslint/no-unused-expressions](https://lintradar.dev/rules/eslint/no-unused-expressions.md) | warn | Disallow unused expressions | 65.9M |
| [unicorn/no-new-array](https://lintradar.dev/rules/unicorn/no-new-array.md) | warn | Disallow `new Array()`. | 63.6M |
| [unicorn/prefer-string-starts-ends-with](https://lintradar.dev/rules/unicorn/prefer-string-starts-ends-with.md) | warn | Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks. | 63.6M |
| [unicorn/no-empty-file](https://lintradar.dev/rules/unicorn/no-empty-file.md) | warn | Disallow empty files. | 62.8M |
| [unicorn/no-unnecessary-await](https://lintradar.dev/rules/unicorn/no-unnecessary-await.md) | warn | Disallow awaiting non-promise values. | 62.8M |
| [typescript/no-unnecessary-parameter-property-assignment](https://lintradar.dev/rules/typescript/no-unnecessary-parameter-property-assignment.md) | warn | Disallow unnecessary assignment of constructor property parameter | 53.5M |
| [typescript/require-array-sort-compare](https://lintradar.dev/rules/typescript/require-array-sort-compare.md) | warn | Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction` | 53.5M |
| [oxc/only-used-in-recursion](https://lintradar.dev/rules/oxc/only-used-in-recursion.md) | warn | Checks for arguments that are only used in recursion with no side-effects. | 52.9M |
| [oxc/double-comparisons](https://lintradar.dev/rules/oxc/double-comparisons.md) | warn | This rule checks for double comparisons in logical expressions. | 52.9M |

---

Web page: https://lintradar.dev/presets/oxlint-default. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
