{"name":"@cspell/cspell-json-reporter","version":"9.3.2","author":{"name":"Jason Dent"},"license":"MIT","_id":"@cspell/cspell-json-reporter@9.3.2","maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"homepage":"https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-json-reporter#readme","bugs":{"url":"https://github.com/streetsidesoftware/cspell/labels/cspell-json-reporter"},"dist":{"shasum":"e0cff90dabd56029c7453768f0aeb96713376445","tarball":"http://registry-npm.ywwl.com/@cspell/cspell-json-reporter/download/@cspell/cspell-json-reporter-9.3.2.tgz","fileCount":13,"integrity":"sha512-YRgpeHN9uY8kUlIw9q+8zJ0tRTAJMbfBTGzCq9Puah09NeMWlRMFPUkXVrkdic6NA7etboZ+zEdoZwRO9EmhiA==","signatures":[{"sig":"MEUCIGKbK+wUbvaHeSpUxKEIdrn29xdK0J9suP1szXWSnbLvAiEAsZ1AITFQEKgg8NEGEKGFEYviWVuIuACFfpxL8WhYLHA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cspell%2fcspell-json-reporter@9.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13090,"size":4425,"noattachment":false,"key":"/@cspell/cspell-json-reporter/-/@cspell/cspell-json-reporter-9.3.2.tgz"},"type":"module","types":"dist/esm/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=20"},"exports":{".":{"import":"./dist/esm/index.js"}},"gitHead":"595bde79b4a5abf3256b71129995ec3601454b02","scripts":{"test":"vitest run && pnpm test:run","build":"tsc -b . -f","clean":"shx rm -rf dist temp coverage \"*.tsbuildInfo\"","watch":"tsc -b . -w -f","coverage":"vitest run --coverage","test:run":"node ../../bin.mjs . --config cSpell.example.mjs","build:esm":"tsc -p tsconfig.esm.json","test:watch":"vitest","clean-build":"pnpm run clean && pnpm run build"},"_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"repository":{"url":"git+https://github.com/streetsidesoftware/cspell.git","type":"git","directory":"packages/cspell-json-reporter"},"_npmVersion":"lerna/4.9.2/node@v20.19.5+x64 (linux)","description":"JSON reporter for CSpell","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@cspell/cspell-types":"9.3.2"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cspell-json-reporter_9.3.2_1763225263054_0.7764705536556731","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@cspell/cspell-json-reporter`\n\n> CSpell reporter with JSON output\n\n## Installation\n\nInstall it as a development package in the repository that will use it.\n\n```sh\nnpm install -SD @cspell/cspell-json-reporter\n```\n\n## Usage\n\n### Using Command Line\n\n```sh\ncspell . --reporter @cspell/cspell-json-reporter\n```\n\n### Using CSpell Configuration\n\nAdd this to `cspell.yaml`:\n\n```yaml\nreporters: [['@cspell/cspell-json-reporter', { outFile: 'out.json' }]]\n```\n\nor `cspell.json`\n\n```json\n{\n  \"reporters\": [[\"@cspell/cspell-json-reporter\", { \"outFile\": \"out.json\" }]]\n}\n```\n\n## Output file format\n\n`@cspell/cspell-json-reporter` emits a JSON file with the following fields:\n\n- `issues` - found spelling issues\n- `result` - CSpell linting results\n- `error` - CSpell error messages\n- `progress` - file linting progress messages if `settings.progress` is enabled\n- `info` - CSpell execution logs if `settings.verbose` is enabled\n- `debug` - CSpell debug logs if `settings.debug` is enabled\n\n<details>\n<summary>JSON Output Definition</summary>\n\n<!--- @@inject: src/CSpellJSONReporterOutput.ts --->\n\n```ts\nimport type {\n  ErrorLike,\n  Issue,\n  MessageType,\n  ProgressFileComplete,\n  ProgressItem,\n  RunResult\n} from '@cspell/cspell-types';\n\nexport type CSpellJSONReporterOutput = {\n  /**\n   * Found spelling issues\n   */\n  issues: Array<Issue>;\n  /**\n   * CSpell execution logs\n   */\n  info?: Array<{ message: string; msgType: MessageType }>;\n  /**\n   * CSpell debug logs\n   */\n  debug?: Array<{ message: string }>;\n  /**\n   * CSpell error logs\n   */\n  error?: Array<{ message: string; error: ErrorLike }>;\n  /**\n   * CSpell file progress logs\n   */\n  progress?: Array<ProgressItem | ProgressFileComplete>;\n  /**\n   * Execution result\n   */\n  result: RunResult;\n};\n```\n\n<!--- @@inject-end: src/CSpellJSONReporterOutput.ts --->\n\n</details>\n\n## Settings\n\nPossible settings:\n\n- `outFile` (default: stdout) - path for JSON file to emit\n- `verbose` (default: false) - enable saving of execution logs\n- `verboseLevel` - level of verbosity (higher number = more verbose)\n- `debug` (default: false) - enable saving of debug logs\n- `progress` (default: false) - enable saving of file progress logs\n\n<details>\n<summary>Reporter Settings</summary>\n\n<!--- @@inject: src/CSpellJSONReporterSettings.ts --->\n\n```ts\n/**\n * CSpell-json-reporter settings type definition\n */\nexport type CSpellJSONReporterSettings = {\n  /**\n   * Path to the output file.\n   *\n   * Relative paths are relative to the current working directory.\n   *\n   * Special values:\n   * - `stdout` - write the JSON to `stdout`.\n   * - `stderr` - write the JSON to `stderr`.\n   *\n   * @default stdout\n   */\n  outFile?: string;\n  /**\n   * Add more information about the files being checked and the configuration\n   */\n  verbose?: boolean;\n  /**\n   * Level of verbosity (higher number = more verbose).\n   */\n  verboseLevel?: number;\n  /**\n   * Add information useful for debugging cspell.json files\n   * @default false\n   */\n  debug?: boolean;\n  /**\n   * Add progress messages\n   * @default false\n   */\n  progress?: boolean;\n};\n```\n\n<!--- @@inject-end: src/CSpellJSONReporterSettings.ts --->\n\n</details>\n","publish_time":1763225263258,"_cnpm_publish_time":1763225263258,"dist-tags":{"cspell5":"5.21.2","cspell5-next":"5.21.2-alpha.0","latest":"10.4.0","next":"10.4.0-alpha.1"}}