docfy lint
Checks documentation quality, not just presence. Catches incomplete ApiOperation, ApiResponse, and ApiBody decorators that check and coverage wouldn't flag.
Usage
bash
npx nestjs-docfy lint [options]Options
| Option | Default | Description |
|---|---|---|
--root <path> | . | Project root directory |
--tsconfig <path> | auto-detected | Path to tsconfig.json |
--pattern <glob> | **/*.controller.ts | Glob pattern to find controllers |
--format <format> | ts | Docs file format to look for: ts or js |
--quiet | false | Suppress all output except errors |
What it checks
For every method already present in a docs file:
ApiOperationmissing asummary- Endpoints with a
@Body()parameter missing anApiResponse400 - Endpoints with a
@Body()parameter missing anApiBodydescription
Controllers without a companion docs file, or methods not yet documented at all, are left to check; lint only judges the quality of what's already there.
Example output
text
✖ POST /users
Missing 400 response
✖ GET /users
Missing operation summary
✖ PATCH /users/:id
Missing request body description
✖ 3 issue(s) found.Exits with code 1 if any issue is found, designed for CI, same as check.
.github/workflows/*.yml
# GitHub Actions example
- name: Lint documentation quality
run: npx nestjs-docfy lint