{"record":{"id":"476e8e857e3b0d81","repo":"denoland/deno","slug":"invalid-lint-report-type-in-config-file","errorCode":null,"errorMessage":"Invalid lint report type in config file","messagePattern":"Invalid lint report type in config file","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/args/mod.rs","lineNumber":316,"sourceCode":"    lint_config: &WorkspaceLintConfig,\n    lint_flags: &LintFlags,\n  ) -> Result<Self, AnyError> {\n    let mut maybe_reporter_kind = if lint_flags.json {\n      Some(LintReporterKind::Json)\n    } else if lint_flags.compact {\n      Some(LintReporterKind::Compact)\n    } else {\n      None\n    };\n\n    if maybe_reporter_kind.is_none() {\n      // Flag not set, so try to get lint reporter from the config file.\n      maybe_reporter_kind = match lint_config.report.as_deref() {\n        Some(\"json\") => Some(LintReporterKind::Json),\n        Some(\"compact\") => Some(LintReporterKind::Compact),\n        Some(\"pretty\") => Some(LintReporterKind::Pretty),\n        Some(_) => {\n          bail!(\"Invalid lint report type in config file\")\n        }\n        None => None,\n      }\n    }\n    Ok(Self {\n      reporter_kind: maybe_reporter_kind.unwrap_or_default(),\n    })\n  }\n}\n\n#[derive(Clone, Debug)]\npub struct LintOptions {\n  pub rules: LintRulesConfig,\n  pub files: FilePatterns,\n  pub fix: bool,\n  pub plugins: Vec<Url>,\n}\n","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/args/mod.rs#L298-L334","documentation":"deno lint reads the reporter format from the lint.report field of the config file. Only \"pretty\", \"json\", and \"compact\" are recognized; any other string makes CLI argument parsing bail with this message before linting starts. A --report CLI flag overrides the config value entirely.","triggerScenarios":"A deno.json/deno.jsonc with \"lint\": { \"report\": \"<not pretty|json|compact>\" } and running deno lint without --report.","commonSituations":"Copy-pasted configs from other linters (eslint's \"stylish\", \"junit\"); typos like \"compct\"; expecting a reporter format this Deno version does not offer.","solutions":["Set lint.report to \"pretty\", \"json\", or \"compact\" in the config file","Or delete the report key to fall back to the default reporter","Or override from the CLI: deno lint --report=json"],"exampleFix":"// before (deno.json)\n{ \"lint\": { \"report\": \"stylish\" } }\n\n// after\n{ \"lint\": { \"report\": \"pretty\" } }","handlingStrategy":"validation","validationCode":"// Check config before invoking deno lint\nconst config = JSON.parse(await Deno.readTextFile(\"deno.json\"));\nconst report = config?.lint?.report;\nif (report != null && ![\"pretty\", \"json\", \"compact\"].includes(report)) {\n  throw new Error(`invalid lint.report \"${report}\" - expected pretty|json|compact`);\n}","typeGuard":"const isLintReporter = (v: unknown): v is \"pretty\" | \"json\" | \"compact\" =>\n  v === \"pretty\" || v === \"json\" || v === \"compact\";","tryCatchPattern":null,"preventionTips":["Validate deno.json against its schema in CI (e.g. with a JSON-schema check) to catch invalid enum values","Prefer CLI flags (--report) in scripts so config drift cannot break them"],"tags":["deno-lint","config-file","reporter","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}