# @cspell/cspell-json-reporter

> JSON reporter for CSpell

Latest version **10.3.3** (published 2026-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cspell/cspell-json-reporter
pnpm add @cspell/cspell-json-reporter
yarn add @cspell/cspell-json-reporter
bun add @cspell/cspell-json-reporter
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 10.3.3 |
| Published | 2026-09-16 |
| First published | 2021-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=22.18.0 |
| Dependencies | 1 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1684 |
| Author | Jason Dent |
| Maintainers | jason-dent |

## Links

- npm: https://www.npmjs.com/package/@cspell/cspell-json-reporter
- Repository: https://github.com/streetsidesoftware/cspell
- Homepage: https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-json-reporter#readme
- Issues: https://github.com/streetsidesoftware/cspell/labels/cspell-json-reporter
- npm.io page: https://npm.io/package/@cspell/cspell-json-reporter

## Dependencies (1)

- [@cspell/cspell-types](https://npm.io/package/@cspell/cspell-types.md) 10.3.3

## Recent versions

- 10.3.3 (latest) — 2026-09-16
- 10.3.2-alpha.0 (next) — 2026-09-13
- 5.21.2 (cspell5) — 2022-05-21
- 5.21.2-alpha.0 (cspell5-next) — 2022-05-20
- 10.3.2 — 2026-09-15
- 10.3.1 — 2026-09-13
- 10.3.1-alpha.1 — 2026-09-12
- 10.3.1-alpha.0 — 2026-09-12
- 10.3.0 — 2026-09-08
- 10.3.0-alpha.0 — 2026-09-04
- 10.2.2 — 2026-09-04
- 10.2.1 — 2026-09-03
- 10.2.0 — 2026-08-31
- 10.2.0-alpha.7 — 2026-08-30
- 10.2.0-alpha.5 — 2026-08-30
- … 251 more at https://npm.io/package/@cspell/cspell-json-reporter/versions

## README

# `@cspell/cspell-json-reporter`

> CSpell reporter with JSON output

## Installation

Install it as a development package in the repository that will use it.

```sh
npm install -SD @cspell/cspell-json-reporter
```

## Usage

### Using Command Line

```sh
cspell . --reporter @cspell/cspell-json-reporter
```

### Using CSpell Configuration

Add this to `cspell.yaml`:

```yaml
reporters: [['@cspell/cspell-json-reporter', { outFile: 'out.json' }]]
```

or `cspell.json`

```json
{
  "reporters": [["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]
}
```

## Output file format

`@cspell/cspell-json-reporter` emits a JSON file with the following fields:

- `issues` - found spelling issues
- `result` - CSpell linting results
- `error` - CSpell error messages
- `progress` - file linting progress messages if `settings.progress` is enabled
- `info` - CSpell execution logs if `settings.verbose` is enabled
- `debug` - CSpell debug logs if `settings.debug` is enabled

<details>
<summary>JSON Output Definition</summary>

<!--- @@inject: src/CSpellJSONReporterOutput.ts --->

```ts
import type {
  ErrorLike,
  Issue,
  MessageType,
  ProgressFileComplete,
  ProgressItem,
  RunResult
} from '@cspell/cspell-types';

export type CSpellJSONReporterOutput = {
  /**
   * Found spelling issues
   */
  issues: Array<Issue>;
  /**
   * CSpell execution logs
   */
  info?: Array<{ message: string; msgType: MessageType }>;
  /**
   * CSpell debug logs
   */
  debug?: Array<{ message: string }>;
  /**
   * CSpell error logs
   */
  error?: Array<{ message: string; error: ErrorLike }>;
  /**
   * CSpell file progress logs
   */
  progress?: Array<ProgressItem | ProgressFileComplete>;
  /**
   * Execution result
   */
  result: RunResult;
};
```

<!--- @@inject-end: src/CSpellJSONReporterOutput.ts --->

</details>

## Settings

Possible settings:

- `outFile` (default: stdout) - path for JSON file to emit
- `verbose` (default: false) - enable saving of execution logs
- `verboseLevel` - level of verbosity (higher number = more verbose)
- `debug` (default: false) - enable saving of debug logs
- `progress` (default: false) - enable saving of file progress logs

<details>
<summary>Reporter Settings</summary>

<!--- @@inject: src/CSpellJSONReporterSettings.ts --->

```ts
/**
 * CSpell-json-reporter settings type definition
 */
export type CSpellJSONReporterSettings = {
  /**
   * Path to the output file.
   *
   * Relative paths are relative to the current working directory.
   *
   * Special values:
   * - `stdout` - write the JSON to `stdout`.
   * - `stderr` - write the JSON to `stderr`.
   *
   * @default stdout
   */
  outFile?: string;
  /**
   * Add more information about the files being checked and the configuration
   */
  verbose?: boolean;
  /**
   * Level of verbosity (higher number = more verbose).
   */
  verboseLevel?: number;
  /**
   * Add information useful for debugging cspell.json files
   * @default false
   */
  debug?: boolean;
  /**
   * Add progress messages
   * @default false
   */
  progress?: boolean;
};
```

<!--- @@inject-end: src/CSpellJSONReporterSettings.ts --->

</details>

---
_Source: https://npm.io/package/@cspell/cspell-json-reporter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
