# usePackageJsonValidEngines

Rule `biome/usePackageJsonValidEngines`. Enforce that the `engines` field in `package.json` is valid.

- Source: biome
- Technologies: JSON
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #596 by reach, #231 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/usePackageJsonValidEngines` | yes | no | group nursery, since 2.6.3 | [docs](https://biomejs.dev/linter/rules/use-package-json-valid-engines/) |

## Code examples

### Incorrect: the rule reports this

```json
{
    "engines": {
        "node": 24
    }
}
```

```json
{
    "engines": {
        "node": ""
    }
}
```

```json
{
    "engines": ["node >=24"]
}
```

### Correct: the rule accepts this

```json
{
    "engines": {
        "node": "^24.11.0",
        "npm": ">=11"
    }
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "usePackageJsonValidEngines": "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% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/usePackageJsonValidCpu](https://lintradar.dev/rules/biome/usePackageJsonValidCpu.md): Require the `cpu` field in `package.json` to be a valid list of processor types.
- [biome/usePackageJsonValidLicense](https://lintradar.dev/rules/biome/usePackageJsonValidLicense.md): Require the `license` field in `package.json` to be a valid license.
- [biome/useLoneAnonymousOperation](https://lintradar.dev/rules/biome/useLoneAnonymousOperation.md): Disallow an anonymous operation in a document with other operations.
- [biome/usePlaywrightValidDescribeCallback](https://lintradar.dev/rules/biome/usePlaywrightValidDescribeCallback.md): Enforce valid `describe()` callback.
- [biome/useImageSize](https://lintradar.dev/rules/biome/useImageSize.md): Enforces that `<img>` elements have both width and height attributes.
- [biome/useQwikClasslist](https://lintradar.dev/rules/biome/useQwikClasslist.md): Prefer using the `class` prop as a classlist over the `classnames` helper.

---

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