Skip to content

fix: slim CLI package and enforce clean linting - #14

Merged
chtnnh merged 3 commits into
mainfrom
fix/gate-issue-polish
Aug 23, 2026
Merged

fix: slim CLI package and enforce clean linting#14
chtnnh merged 3 commits into
mainfrom
fix/gate-issue-polish

Conversation

@chtnnh

@chtnnh chtnnh commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

This change makes the published @chtnnh/know-code package materially leaner while adding a maintained lint gate for the repository.

  • Excludes compiled test modules, test declaration files, source maps, and test helpers from the CLI npm tarball.
  • Adds a package-contents regression test so runtime artifacts (bin/, hooks, and dist/index.js) remain shipped while test-only output stays out.
  • Introduces Biome configuration and npm scripts, then runs lint in CI before build and test.
  • Resolves the CLI lint findings with explicit validated narrowing, and removes stale imports and unused bindings, including the obsolete Umami proxy import.

Why

npm pack --dry-run showed that the published CLI artifact included compiled test files and test helpers that are never required by global installations. Keeping the package focused on runtime files reduces install/download overhead without changing the public CLI surface.

Validation

  • npm run lint -- --max-diagnostics=100
  • git diff --check

Closes #5

Repair the Umami proxy worker’s request handling while aligning the CLI gate
commands, range flow, and test coverage with the updated behavior.

Clean up Biome findings by replacing unsafe non-null assertions with explicit
validated narrowing and removing stale imports and bindings.

Validation: npm run lint -- --max-diagnostics=100

Know-Code-Verified: 9cfe4be37591656fc9d85d26a540ec901f37f9cbb9a043db6a127a693f7e35f9
@chtnnh chtnnh self-assigned this Aug 23, 2026
Know-Code-Verified: d69b59b1a5efa389338aa2202576ab814cfe6f05014e0e2ff99b5d35a057e090
@chtnnh
chtnnh marked this pull request as ready for review August 23, 2026 15:14
@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Tooling, package-contents, and lint-driven refactors; no change to auth, gating policy, or public CLI behavior.

Overview
Keeps the published @chtnnh/know-code tarball to runtime files only, and adds a Biome lint gate so those hygiene rules stay enforced.

packages/cli now excludes compiled tests, test helpers, and source maps from files. A new pack dry-run test asserts bin/, hooks, and dist/index.js still ship.

Adds biome.json, root lint/lint:fix/format:check scripts, and runs npm run lint in CI before build. CLI lint findings are cleaned up with explicit null checks (especially around grade answersDigest) and unused imports/bindings.

Reviewed by Cursor Bugbot for commit ad7fee9. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8881a23. Configure here.

Comment thread packages/cli/package.json
Know-Code-Verified: ca887796f3dcd7818755f17440456bdd47abf2793d69eae56f290f4a4938b6b0
@chtnnh
chtnnh merged commit a7d68ef into main Aug 23, 2026
5 checks passed
@chtnnh
chtnnh deleted the fix/gate-issue-polish branch August 24, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm tarball ships compiled test files (~half of dist/)

1 participant