Point config suggestions at the real linear config command#246
Merged
Conversation
Three user-facing strings advertised a `linear configure` command that does not exist — the interactive setup command is registered as `config`, so `linear configure` failed with "Unknown command". The reporter hit this via `linear team id` with no team configured. Fix all three suggestions to name the canonical `config` command, and add `configure` as an alias so the natural command people (and the CLI's own help text) reach for just works instead of erroring. Keeping `config` canonical in every string and doc while tolerating `configure` is more robust than a bare text swap: the alias matches the exact instinct that produced the bug. Also upgrade the bare `Error` thrown for an integer id with no team to a `ValidationError` so it renders with the standard ✗ + suggestion treatment. The root command moves from src/main.ts into src/cli.ts so it can be imported by tests (to assert the alias resolves) without its complex inferred cliffy type entering the published public API and tripping no-slow-types; main.ts stays the entry point and only runs it under import.meta.main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several user-facing suggestions told users to run
linear configure, which doesn't exist — the interactive setup command is registered asconfig, solinear configurefailed with "Unknown command". The reporter hit this vialinear team idwith no team configured.Changes
src/utils/linear.ts,src/commands/team/team-id.ts,src/commands/team/team-autolinks.ts) to name the canonicallinear config.configureas an alias forconfigso the natural command people (and the CLI's own help text) reach for just works instead of erroring.configstays canonical in every string and doc; the alias is purely additive tolerance — it matches the exact instinct that produced the bug.Errorthrown for an integer id with no team to aValidationError, so it renders with the standard ✗ + suggestion treatment.src/main.tsintosrc/cli.tsso tests can import it (to assert the alias resolves) without its complex inferred cliffy type entering the published public API and trippingno-slow-types.main.tsremains the entry point and runs it underimport.meta.main.Tests
ValidationErrorpointing atlinear config, neverconfigure.team id/ autolinks errors.configureresolves to theconfigcommand.Fixes #245