{"record":{"id":"e5efa1ec8a28d566","repo":"swc-project/swc","slug":"lint-command-is-not-yet-implemented","errorCode":null,"errorMessage":"Lint command is not yet implemented","messagePattern":"Lint command is not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_cli_impl/src/commands/lint.rs","lineNumber":8,"sourceCode":"use clap::Parser;\n\n#[derive(Parser)]\npub struct LintOptions {}\n\nimpl super::CommandRunner for LintOptions {\n    fn execute(&self) -> anyhow::Result<()> {\n        unimplemented!(\"Lint command is not yet implemented\")\n    }\n}\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/swc-project/swc/blob/d7d74346665e36e692aa07e13d4ee3ee692ee35c/crates/swc_cli_impl/src/commands/lint.rs#L1-L11","documentation":"The `swc` CLI (swc_cli_impl) declares a `lint` subcommand in its clap Command enum, but LintOptions::execute is a stub calling unimplemented!() at lint.rs:8. Any `swc lint ...` invocation panics with 'not implemented: Lint command is not yet implemented' and exits 101. SWC has no linting pipeline exposed through this CLI.","triggerScenarios":"Running `swc lint src/` with the native swc binary; clap accepts the subcommand, lib.rs dispatches Command::Lint(options) => options.execute(), which panics.","commonSituations":"Users migrating from `eslint`/`tsc` assuming `swc lint` exists because it appears in `swc --help`; CI lint stages wired to the wrong binary; confusion because the subcommand is listed despite being unimplemented.","solutions":["Use a dedicated linter for the job: eslint, oxlint, or biome.","If you only need syntax checking, `swc compile` will surface parse errors.","If you maintain a fork, make execute return an anyhow::bail! error instead of panicking, or wire in a real lint runner.","Upvote/track the upstream CLI roadmap for lint support."],"exampleFix":"# before\nswc lint ./src\n\n# after\nswc compile ./src --out-dir /tmp/swc-check   # parse errors only\nnpx oxlint ./src                             # real linting","handlingStrategy":"try-catch","validationCode":"# Probe cheaply before wiring a lint stage to the native CLI\nprintf 'let x = 1;' > /tmp/probe.js\nswc lint /tmp/probe.js >/dev/null 2>/tmp/swc_lint.err\nif grep -q 'Lint command is not yet implemented' /tmp/swc_lint.err; then\n  echo 'swc lint is a stub — use eslint/oxlint/biome instead'\nfi","typeGuard":null,"tryCatchPattern":"set +e\nswc lint ./src 2>/tmp/lint.err\nstatus=$?\nset -e\nif [ \"$status\" -eq 101 ] && grep -q 'Lint command is not yet implemented' /tmp/lint.err; then\n  echo 'falling back to oxlint' >&2\n  exec npx oxlint ./src\nfi\nexit \"$status\"","preventionTips":["Don't assume a subcommand works just because clap lists it; the stubs are registered but unimplemented.","Use purpose-built linters (eslint, oxlint, biome) — SWC's CLI has no linting pipeline.","Guard CI steps with a capability probe or pin to tools you have verified.","Watch the swc-cli repo for when lint lands."],"tags":["swc","cli","lint","unimplemented","panic","exit-101"],"backgroundTag":null,"analyzedSha":"d7d74346665e36e692aa07e13d4ee3ee692ee35c","analyzedAt":"2026-08-16T12:41:13.160Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}