Skip to content

Fix linting warnings and test configuration issues#44

Merged
clavery merged 3 commits intomainfrom
bugfix/linting-test-issues
Jan 14, 2026
Merged

Fix linting warnings and test configuration issues#44
clavery merged 3 commits intomainfrom
bugfix/linting-test-issues

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented Jan 13, 2026

Summary

  • Fix ESLint parsing error with marked-terminal by adding explicit node_modules ignore
  • Fix TypeScript test configuration errors (TS6059 rootDir issues)
  • Align MCP test config to use development exports like CLI
  • Reduce cyclomatic complexity in three files to meet max-20 threshold

Changes

  • ESLint config: Add **/node_modules/** ignore pattern to prevent parsing monorepo root node_modules
  • Test tsconfigs: Set rootDir: ".." and include both test and src directories
  • MCP test config: Extend parent tsconfig to inherit customConditions: ["development"]
  • job/run.ts: Extract handleExecutionError(), handleWaitError(), waitForJobCompletion() methods
  • ods/info.ts: Extract renderUserInfo(), renderSystemInfo(), renderField(), renderArrayField() methods
  • slas/client/update.ts: Extract normalization and merge helper methods

Test plan

  • pnpm run lint passes without errors (only informational message about marked-terminal parsing)
  • pnpm run test passes for all packages
  • No complexity warnings in lint output

- Add explicit node_modules ignore to ESLint config to prevent parsing
  errors with marked-terminal in monorepo root
- Fix TypeScript test configs to properly handle rootDir inheritance
  by setting rootDir to ".." and including both test and src files
- Update MCP test tsconfig to extend parent for development exports
- Add cliui type declaration to MCP package
- Refactor job/run.ts to reduce complexity from 23 to ≤20 by extracting
  handleExecutionError, handleWaitError, and waitForJobCompletion methods
- Refactor ods/info.ts to reduce complexity from 31 to ≤20 by extracting
  renderUserInfo, renderSystemInfo, renderField, and renderArrayField methods
- Refactor slas/client/update.ts to reduce complexity from 31 to ≤20 by
  extracting normalization and merge helper methods
Update normalizeUriArray to handle pipe-delimited strings from API
@clavery clavery linked an issue Jan 13, 2026 that may be closed by this pull request
@clavery clavery requested a review from yhsieh1 January 13, 2026 22:06
Comment thread packages/b2c-dx-mcp/src/types/cliui.d.ts Outdated
@clavery clavery marked this pull request as ready for review January 13, 2026 22:59
@clavery clavery requested a review from yhsieh1 January 14, 2026 01:52
@clavery clavery merged commit 89600c1 into main Jan 14, 2026
2 checks passed
@clavery clavery deleted the bugfix/linting-test-issues branch January 27, 2026 01:22
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.

Fix Lint Warnings (cyclomatic complexity)

2 participants