# usePackageJsonCpu

Rule `biome/usePackageJsonCpu`. Require the `cpu` field in `package.json`.

- Source: biome
- Technologies: JSON
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1962 by reach

## Linters

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

## Code examples

### Incorrect: the rule reports this

```json
{
    "name": "my-package",
    "version": "1.0.0"
}
```

### Correct: the rule accepts this

```json
{
    "name": "my-package",
    "version": "1.0.0",
    "cpu": ["x64", "arm64"]
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "usePackageJsonCpu": "error"
      }
    }
  }
}
```

## Related rules

- [biome/useNamedLayer](https://lintradar.dev/rules/biome/useNamedLayer.md): Disallow anonymous cascade layers.
- [biome/usePackageJsonEngines](https://lintradar.dev/rules/biome/usePackageJsonEngines.md): Require the `engines` field in `package.json`.
- [biome/useLogicalProperties](https://lintradar.dev/rules/biome/useLogicalProperties.md): Prefer logical CSS properties over physical properties.
- [biome/useReactCompiler](https://lintradar.dev/rules/biome/useReactCompiler.md): Validate files with React Compiler.
- [biome/useLayeredStyles](https://lintradar.dev/rules/biome/useLayeredStyles.md): Enforce style rules to be defined within a cascade layer.
- [biome/useReactFunctionComponents](https://lintradar.dev/rules/biome/useReactFunctionComponents.md): Enforce that components are defined as functions and never as classes.

---

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