# radix

Rule `eslint/radix`. Enforce the use of the radix argument when using `parseInt()`

- Source: eslint
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 42.3M weekly downloads of presets that enable it
- Trend: +62.4% last quarter
- Rank: #402 by reach, #461 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `radix` | no | suggestion | package `eslint` | [docs](https://eslint.org/docs/latest/rules/radix) |
| Oxlint | `radix` | no | unsafe | plugin `eslint`, category pedantic | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/radix.html) |
| Biome | `correctness/useParseIntRadix` | yes | unsafe | group correctness, since 2.0.0 | [docs](https://biomejs.dev/linter/rules/use-parse-int-radix/) |

## Code examples

### Incorrect: the rule reports this

```js
const num = parseInt("071");

const num1 = parseInt(someValue);

const num2 = parseInt("071", "abc");

const num3 = parseInt("071", 37);

const num4 = parseInt();
```

### Correct: the rule accepts this

```js
const num = parseInt("071", 10);

const num1 = parseInt("071", 8);

const num2 = parseFloat(someValue);
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "radix": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "radix": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "useParseIntRadix": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Airbnb base](https://lintradar.dev/presets/airbnb-base.md) | ESLint | `eslint-config-airbnb-base` | 241 | 6.5M | +2.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [React Native](https://lintradar.dev/presets/react-native.md) | ESLint | `@react-native/eslint-config` | 79 | 1.2M | +5.8% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [eslint/prefer-exponentiation-operator](https://lintradar.dev/rules/eslint/prefer-exponentiation-operator.md): Disallow the use of `Math.pow` in favor of the `**` operator
- [eslint/prefer-template](https://lintradar.dev/rules/eslint/prefer-template.md): Require template literals instead of string concatenation
- [eslint/no-constructor-return](https://lintradar.dev/rules/eslint/no-constructor-return.md): Disallow returning value from constructor
- [eslint/prefer-numeric-literals](https://lintradar.dev/rules/eslint/prefer-numeric-literals.md): Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
- [eslint/no-inner-declarations](https://lintradar.dev/rules/eslint/no-inner-declarations.md): Disallow variable or `function` declarations in nested blocks
- [eslint/no-useless-call](https://lintradar.dev/rules/eslint/no-useless-call.md): Disallow unnecessary calls to `.call()` and `.apply()`

---

Web page: https://lintradar.dev/rules/eslint/radix. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
