Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 27, 2025

The jsweep workflow now prioritizes removing @ts-nocheck comments from .cjs files to enable TypeScript validation across the codebase (currently 15 files).

Changes

  • File selection: Added two-tier priority system

    • Priority 1: Files with @ts-nocheck comments
    • Priority 2: Oldest uncleaned files (fallback)
  • Instructions: Added explicit guidance for type checking enablement

    • Remove @ts-nocheck, replace with @ts-check
    • Fix type errors with JSDoc annotations
    • Validate with npm run typecheck before PR
  • Constraints: Required typecheck pass for previously unchecked files

  • Tests: Validated priority selection and removal instructions in workflow config

Example transformation

// Before: Type checking disabled
// @ts-nocheck
async function processData(data) {
  return data.items.map(item => item.value);
}

// After: Type checking enabled with annotations
// @ts-check
/**
 * @param {{ items: Array<{ value: string }> }} data
 * @returns {Array<string>}
 */
async function processData(data) {
  return data.items.map(item => item.value);
}
Original prompt

Update jsweep to favor fixing .cjs files with "@ts-nocheck" and make them type checked.

Custom agent used: create-agentic-workflow
Design agentic workflows using GitHub Agentic Workflows (gh-aw) extension with interactive guidance on triggers, tools, and security best practices.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 27, 2025
- Modified file selection to prioritize files with @ts-nocheck comments
- Added detailed instructions on removing @ts-nocheck and fixing type errors
- Updated workflow description to reflect new priority
- Added examples of how to fix type errors and enable type checking
- Updated tests to validate new @ts-nocheck prioritization behavior
- Recompiled jsweep.lock.yml with updated workflow configuration

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update jsweep to fix .cjs files with @ts-nocheck jsweep: Prioritize files with @ts-nocheck for type checking Dec 27, 2025
@pelikhan pelikhan marked this pull request as ready for review December 27, 2025 17:27
Copilot AI requested a review from pelikhan December 27, 2025 17:27
@pelikhan pelikhan merged commit e063e0a into main Dec 27, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/update-jsweep-cjs-fixing branch December 27, 2025 17:27
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.

2 participants