{"name":"@cspell/cspell-json-reporter","version":"7.0.0","author":{"name":"Jason Dent"},"license":"MIT","_id":"@cspell/cspell-json-reporter@7.0.0","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":"7d04d10b4c7df678847ac94bacf4bcc8740ad719","tarball":"http://registry-npm.ywwl.com/@cspell/cspell-json-reporter/download/@cspell/cspell-json-reporter-7.0.0.tgz","fileCount":23,"integrity":"sha512-8OheTVzwwfOQqPZe3Enbe1F7Y0djjGunk5K7aC5MyXc3BuIV7Cx13xWo2gfAjiHBRuO5lqg9qidEfp6NE33amg==","signatures":[{"sig":"MEUCIAsp3oEjQbK/jncDcjgxzHiIJHBbP7xpQYXQkXvXMwcxAiEA1Y1sP4s0X45w/gzVxGFtMIIDRcQclZAtY12OCmOGKms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20541,"size":5108,"noattachment":false,"key":"/@cspell/cspell-json-reporter/-/@cspell/cspell-json-reporter-7.0.0.tgz"},"main":"dist/cjs/index.js","type":"commonjs","types":"dist/cjs/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=16"},"exports":{".":{"import":"./dist/esm/index.mjs","require":"./dist/cjs/index.js"}},"gitHead":"52960d5ed75655978f9b633f44fd106937a63cd7","scripts":{"test":"vitest run","build":"tsc -b . && ts2mjs dist/esm","clean":"shx rm -rf dist temp coverage \"*.tsbuildInfo\"","watch":"tsc -b . -w","coverage":"pnpm coverage:vitest && pnpm coverage:fix","build:esm":"tsc -p tsconfig.esm.json","test:watch":"vitest","clean-build":"pnpm run clean && pnpm run build","coverage:fix":"nyc report --temp-dir \"$(pwd)/coverage\" --reporter lcov --report-dir \"$(pwd)/coverage\" --cwd ../..","coverage:vitest":"vitest run --coverage"},"_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"repository":{"url":"git+https://github.com/streetsidesoftware/cspell.git","type":"git"},"_npmVersion":"lerna/2.5.0/node@v18.17.0+x64 (linux)","description":"JSON reporter for CSpell","directories":{},"_nodeVersion":"18.17.0","dependencies":{"@cspell/cspell-types":"7.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cspell-json-reporter_7.0.0_1691662282070_0.20960678282216172","host":"s3://npm-registry-packages"},"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` - CSell 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- `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   * @default false\n   */\n  verbose?: boolean;\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":1691662282235,"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"_cnpm_publish_time":1691662282235,"dist-tags":{"cspell5":"5.21.2","cspell5-next":"5.21.2-alpha.0","latest":"10.4.0","next":"10.4.0-alpha.1"}}