# noEnum

Rule `biome/noEnum`. Disallow TypeScript enum.

- Source: biome
- Technologies: TypeScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 2.1M weekly downloads of presets that enable it
- Trend: +151.7% last quarter
- Rank: #1541 by reach, #45 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `style/noEnum` | no | no | group style, since 1.9.0 | [docs](https://biomejs.dev/linter/rules/no-enum/) |

## Code examples

### Incorrect: the rule reports this

```ts
enum Foo {
    BAR = 'bar',
    BAZ = 'baz',
}
```

### Correct: the rule accepts this

```ts
const Foo = {
    BAR: 'bar',
    BAZ: 'baz',
} as const
```

```ts
type Foo = 'bar' | 'baz'
```

```ts
const enum Foo {
    BAR = 'bar',
    BAZ = 'baz',
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noEmptyObjectKeys](https://lintradar.dev/rules/biome/noEmptyObjectKeys.md): Disallow empty keys in JSON objects.
- [biome/noEvolvingTypes](https://lintradar.dev/rules/biome/noEvolvingTypes.md): Disallow variables from evolving into `any` type through reassignments.
- [biome/noDuplicateSelectors](https://lintradar.dev/rules/biome/noDuplicateSelectors.md): Disallow duplicate selectors.
- [biome/noExportedImports](https://lintradar.dev/rules/biome/noExportedImports.md): Disallow exporting an imported variable.
- [biome/noDuplicateGraphqlOperationName](https://lintradar.dev/rules/biome/noDuplicateGraphqlOperationName.md): Require unique operation names within a GraphQL document.
- [biome/noRedundantDefaultExport](https://lintradar.dev/rules/biome/noRedundantDefaultExport.md): Checks if a default export exports the same symbol as a named export.

---

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