---
title: "Code Health"
description: "Scores every JavaScript and TypeScript file from 1 to 10 for how easy it is to change, using CodeScene's Code Health rules and thresholds: complex, long and deeply nested functions, complex conditionals, bumpy roads (several chunks of nested logic), too many arguments, duplicated functions, primitive-heavy arguments and large files. Hotspots (the most often changed files in the last year of git history) get a higher severity. Honours `.codescene/code-health-rules.json` and `@codescene(disable:...)` comments."
url: https://openaudit.se/auditors/code.health/
---

# Code Health

`code.health`

Scores every JavaScript and TypeScript file from 1 to 10 for how easy it is to change, using CodeScene's Code Health rules and thresholds: complex, long and deeply nested functions, complex conditionals, bumpy roads (several chunks of nested logic), too many arguments, duplicated functions, primitive-heavy arguments and large files. Hotspots (the most often changed files in the last year of git history) get a higher severity. Honours `.codescene/code-health-rules.json` and `@codescene(disable:...)` comments.

- **Engine:** Built-in
- **Targets:** Codebase
- **Areas:** Maintainability
- **Runs:** By default, when the target applies
- **Network:** Only the target itself

## Run only this auditor

```sh
bunx @openaudit/cli . --only code.health
```

Built into openaudit; nothing to install.

## More maintainability auditors

- [Code quality](https://openaudit.se/auditors/code.quality/) (`code.quality`)
- [Change coupling and knowledge](https://openaudit.se/auditors/code.history/) (`code.history`)
- [Language strictness config](https://openaudit.se/auditors/code.strictness/) (`code.strictness`)
- [jscpd copy-paste detection](https://openaudit.se/auditors/code.jscpd/) (`code.jscpd`)
- [knip unused code scan](https://openaudit.se/auditors/code.knip/) (`code.knip`)
- [oxlint](https://openaudit.se/auditors/code.oxlint/) (`code.oxlint`)
- [Biome lint](https://openaudit.se/auditors/code.biome/) (`code.biome`)
- [ESLint](https://openaudit.se/auditors/code.eslint/) (`code.eslint`)
