Skip to content

chore(lint): require target resolution helpers - #1641

Merged
betegon merged 1 commit into
mainfrom
lint/no-direct-project-target-lookup
Sep 28, 2026
Merged

betegon merged 1 commit into
mainfrom
lint/no-direct-project-target-lookup

Conversation

@betegon

@betegon betegon commented Sep 28, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #1622. CLI commands should resolve project/org targets through the capability helpers in resolve-target.ts; calling findProjectsBySlug() or the old miss classifier directly lets command-specific precedence drift.

This adds a Biome Grit rule for src/commands/** that rejects direct low-level target lookup, including namespace-style calls. commands/issue/utils.ts is explicitly excluded because its project lookup is part of issue-ID resolution, not CLI target parsing.

The command-layer boundary is also documented in AGENTS.md so the diagnostic points contributors to the intended architecture.

Test plan

  • pnpm run lint
  • pnpm exec tsc --noEmit
  • Temporary command fixture calling findProjectsBySlug() produces the new plugin diagnostic
  • Existing intentional lookup in commands/issue/utils.ts remains accepted

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 28, 2026 11:40am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Sep 28, 2026 11:40am UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – sentry-local September 28, 2026 11:39 Inactive
@betegon
betegon marked this pull request as ready for review September 28, 2026 15:59
@github-actions github-actions Bot added the risk: low PR risk score: low label Sep 28, 2026
@betegon
betegon merged commit ccb39ec into main Sep 28, 2026
31 checks passed
@betegon
betegon deleted the lint/no-direct-project-target-lookup branch September 28, 2026 16:04

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 1b647ac8 Deployed Sep 28, 2026 by vercel[bot]
Preview – sentry-local — 1b647ac8 Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant