Skip to content

fix(ci): resolve lint error and test failures#34

Merged
Shooksie merged 1 commit intomainfrom
fix/ci-lint-test-failures
Apr 6, 2026
Merged

fix(ci): resolve lint error and test failures#34
Shooksie merged 1 commit intomainfrom
fix/ci-lint-test-failures

Conversation

@Shooksie
Copy link
Copy Markdown
Contributor

@Shooksie Shooksie commented Apr 6, 2026

Summary

  • Lint error (_value unused variable): The base ESLint no-unused-vars rule from eslint.configs.recommended was flagging _value parameter names in TypeScript type signatures. Fixed by disabling the base rule for TS files and relying solely on @typescript-eslint/no-unused-vars (which correctly respects the argsIgnorePattern: '^_' option).

  • Test failures in CI (logger, init, integration tests): GitHub Actions sets FORCE_COLOR=1, causing picocolors to add ANSI escape codes even in non-TTY Jest workers. Tests that checked logOutput.includes('[debug] Debug message') failed because the actual string contained ANSI codes. Fixed by adding a setupFiles entry (src/test-setup.ts) that sets process.env.NO_COLOR = '1' before any test runs.

  • CLI integration test failures: The test beforeAll checks for dist/index.js and throws if missing. The test job in CI didn't have a build step, so the dist directory never existed. Fixed by adding pnpm run build before the test step in both the test and coverage CI jobs.

Test plan

  • pnpm lint — 0 errors (97 warnings only, as expected for a CLI tool using console)
  • pnpm build — clean TypeScript compilation
  • pnpm test — 259/259 tests pass
  • FORCE_COLOR=1 pnpm test — 259/259 tests pass (simulating CI environment)

🤖 Generated with Claude Code

- eslint.config.js: disable base no-unused-vars for TS files; the
  @typescript-eslint/no-unused-vars rule (with argsIgnorePattern '^_')
  already handles this correctly. Fixes the _value error in prompts.ts.
- src/test-setup.ts: set NO_COLOR=1 before tests run so picocolors
  strips ANSI codes; GitHub CI sets FORCE_COLOR=1 which caused logger
  tests to fail on exact string matches that include color prefixes.
- jest.config.js: add setupFiles pointing to test-setup.ts.
- .github/workflows/ci.yml: add build step before tests in test and
  coverage jobs; integration tests require dist/index.js to exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Shooksie Shooksie merged commit 99cc8a4 into main Apr 6, 2026
5 of 9 checks passed
@Shooksie Shooksie deleted the fix/ci-lint-test-failures branch April 6, 2026 10:05
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.

1 participant