{"record":{"id":"6649864326812e41","repo":"stablyai/orca","slug":"pluginname-did-not-produce-oxlint-output","errorCode":null,"errorMessage":"${pluginName} did not produce Oxlint output","messagePattern":"(.+?) did not produce Oxlint output","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/oxlint-plugin-test-runner.mjs","lineNumber":52,"sourceCode":"          perf: 'off',\n          style: 'off',\n          restriction: 'off',\n          nursery: 'off'\n        },\n        jsPlugins: [{ name: pluginName, specifier: pluginPath }],\n        rules\n      })\n    )\n    const result = spawnSync(\n      process.execPath,\n      [oxlintPath, '--config', configPath, '--format', 'json', sourcePath],\n      { encoding: 'utf8' }\n    )\n    if (result.error) {\n      throw result.error\n    }\n    if (!result.stdout.trim()) {\n      throw new Error(result.stderr || `${pluginName} did not produce Oxlint output`)\n    }\n    return JSON.parse(result.stdout).diagnostics\n  } finally {\n    rmSync(directory, { recursive: true, force: true })\n  }\n}\n","sourceCodeStart":34,"sourceCodeEnd":59,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/oxlint-plugin-test-runner.mjs#L34-L59","documentation":"runOxlintPluginOnSource spawns the oxlint binary on a temp source file with a generated config and --format json. If the spawn succeeded (no result.error) but stdout is empty, the error is whatever oxlint wrote to stderr, or a generic '${pluginName} did not produce Oxlint output' if stderr is also empty. JSON.parse of empty stdout would throw a confusing SyntaxError, so this guard fails earlier with actionable text.","triggerScenarios":"oxlint exits 0 (or non-zero without result.error set) but emits nothing on stdout. Typical causes: the jsPlugin failed to load (specifier wrong, plugin module errored on import), the oxlint binary is the wrong version and does not support jsPlugins/categories config, or oxlint wrote its report to stderr instead of stdout.","commonSituations":"Bumping oxlint to a version that changed the plugin protocol; a pluginPath that points at a stale build; a plugin module whose top-level import throws (so oxlint silently skips it); config key renamed (categories vs rules) in a newer oxlint.","solutions":["Run oxlint manually with the generated config and source to read the full stderr: node oxlint --config <cfg> --format json <src>","Verify pluginPath resolves to a module that loads without error (node -e 'import(<pluginPath>)')","Check oxlint version compatibility for the jsPlugins config shape against the runner's expectations","Confirm the plugin's specifier actually exports the rules named in the rules config"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import { spawnSync } from 'node:child_process'\nfunction oxlintAvailable(oxlintPath) {\n  const r = spawnSync(process.execPath, [oxlintPath, '--version'], { encoding: 'utf8' })\n  return r.status === 0 && r.stdout.trim().length > 0\n}","typeGuard":null,"tryCatchPattern":"try {\n  const diagnostics = runOxlintPluginOnSource({ pluginName, pluginPath, rules, source })\n} catch (error) {\n  // error.message is either oxlint's stderr or the generic 'did not produce output'\n  throw new Error(`oxlint plugin ${pluginName} failed: ${error.message}`)\n}","preventionTips":["Run the plugin module standalone (node -e 'import(pluginPath)') to confirm it loads","Pin oxlint to a version known to support the jsPlugins config shape","Reproduce the exact spawn command manually to read the full stderr"],"tags":["linting","oxlint","plugin","testing","spawn"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}