# no-mixed-enums

Rule `typescript/no-mixed-enums`. Disallow enums from having both number and string members

- Source: typescript
- Technologies: TypeScript
- Kind: style
- Needs type information: yes
- Autofix: no
- Reach: 46.6M weekly downloads of presets that enable it
- Trend: +31.9% last quarter
- Rank: #268 by reach, #1094 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-mixed-enums` | no | no | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-mixed-enums) |
| Oxlint | `typescript/no-mixed-enums` | no | no | plugin `typescript`, category pedantic | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-mixed-enums.html) |
| Biome | `style/useConsistentEnumValueType` | no | no | group style, since 2.3.13 | [docs](https://biomejs.dev/linter/rules/use-consistent-enum-value-type/) |

## Code examples

### Incorrect: the rule reports this

```ts
enum Status {
  Unknown,
  Closed = 1,
  Open = 'open',
}
```

### Correct: the rule accepts this

```ts
enum Status {
  Unknown = 0,
  Closed = 1,
  Open = 2,
}
```

```ts
enum Status {
  Unknown,
  Closed,
  Open,
}
```

```ts
enum Status {
  Unknown = 'unknown',
  Closed = 'closed',
  Open = 'open',
}
```

Examples from the ESLint documentation.

## Enable it

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

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/no-mixed-enums": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/no-mixed-enums": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useConsistentEnumValueType": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [typescript-eslint strict type-checked](https://lintradar.dev/presets/typescript-eslint-strict-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 75 | 175.9M | +29.5% |
| [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% |
| [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% |

## Related rules

- [typescript/array-type](https://lintradar.dev/rules/typescript/array-type.md): Require consistently using either `T[]` or `Array<T>` for arrays
- [typescript/no-unnecessary-template-expression](https://lintradar.dev/rules/typescript/no-unnecessary-template-expression.md): Disallow unnecessary template expressions
- [typescript/class-literal-property-style](https://lintradar.dev/rules/typescript/class-literal-property-style.md): Enforce that literals on classes are exposed in a consistent style
- [typescript/no-unsafe-return](https://lintradar.dev/rules/typescript/no-unsafe-return.md): Disallow returning a value with type `any` from a function
- [typescript/prefer-for-of](https://lintradar.dev/rules/typescript/prefer-for-of.md): Enforce the use of `for-of` loop over the standard `for` loop where possible
- [typescript/only-throw-error](https://lintradar.dev/rules/typescript/only-throw-error.md): Disallow throwing non-`Error` values as exceptions

---

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