Skip to content

fix: resolve all ESLint errors — add node globals, disable base no-unused-vars, fix unused imports, auto-fix import order#12

Closed
digitarald wants to merge 29 commits intomicrosoft:mainfrom
digitarald:primer/vnext
Closed

fix: resolve all ESLint errors — add node globals, disable base no-unused-vars, fix unused imports, auto-fix import order#12
digitarald wants to merge 29 commits intomicrosoft:mainfrom
digitarald:primer/vnext

Conversation

@digitarald
Copy link
Copy Markdown
Collaborator

@digitarald digitarald commented Feb 14, 2026

Summary

  • Lands the full Primer vNext rewrite: CI, tooling, readiness reports, batch processing, Azure DevOps support, visual HTML reports, and ESLint/Prettier/Vitest infrastructure
  • Fixes all ESLint errors (192 errors + 143 warnings → 0) that were blocking CI on the primer/vnext branch

Highlights

CI & Tooling

  • GitHub Actions CI workflow (ci.yml): lint → typecheck → test → build
  • Release automation via release-please
  • ESLint flat config with TypeScript, import ordering, Prettier integration
  • Vitest test suite (85 tests across 7 files)
  • Prettier config (.prettierrc.json)

Features

  • AI Readiness Reports — 9-pillar maturity model (Functional → Autonomous) with visual HTML reports (--visual flag)
  • Batch Readiness — consolidated reports across multiple repositories
  • Azure DevOps — full integration for batch processing alongside GitHub
  • Evaluation Framework — trajectory viewer with modern UI
  • TUI Improvements — submenus, model picker, activity log, animated banner

ESLint Fixes (last commit)

  • Added globals package for Node.js globals (process, console, Buffer, etc.)
  • Disabled base no-unused-vars in favor of @typescript-eslint/no-unused-vars
  • Removed unused imports, prefixed unused vars with _
  • Auto-fixed 131 import ordering warnings
  • Fixed useless escape characters

Repo Hygiene

  • CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, LICENSE, CODEOWNERS
  • Issue/PR templates
  • Code review agents (Opus, Gemini, Codex)
  • Reusable prompts (deslop, review, generate-improvements)
  • Examples folder with sample eval config

Checklist

  • Tests added or updated (85 tests passing)
  • Lint/typecheck pass (0 errors, 0 warnings)
  • Docs updated if needed (README rewritten, CONTRIBUTING/SECURITY added)

pierceboggan and others added 29 commits February 3, 2026 22:05
feat(eval): implement model listing functionality in eval command

feat(copilot): create function to extract and list Copilot models from CLI help

feat(evaluator): enhance trajectory viewer with phase filtering for tool calls

feat(tui): add readiness report feature with detailed output and user interaction
…text

- Added a systemMessage field to primer.eval.json to clarify response context.
- Updated evalScaffold.ts to include instructions for incorporating the system message in generated cases.
- Modified evaluator.ts to use a default system message when none is provided, ensuring responses are relevant to the repository.
…d enhance TUI

- Removed the analyze command from the CLI as it is no longer needed.
- Updated the Primer evaluation workflow to include timestamped output files and improved error handling.
- Enhanced the TUI to manage multiple Copilot models for evaluation and judging, allowing users to cycle through available models.
- Improved user prompts and messages throughout the TUI for better clarity and user experience.
- Adjusted the structure of the evaluation results display and added readiness report functionality.
- Fix TypeScript syntax errors in tui.tsx and github.ts
- Create visual report generator service with beautiful HTML output
- Add --visual flag to readiness command for HTML reports
- Implement batch-readiness command for multi-repo visual reports
- Add BatchReadinessTui for interactive repository selection
- Support both GitHub and Azure DevOps repository sources
- Include summary cards, pillar performance, and level distribution charts
- Update documentation with visual report examples

Co-authored-by: pierceboggan <1091304+pierceboggan@users.noreply.github.com>
- Added support for selecting and running evaluations with a new eval-pick status.
- Implemented batch processing options for GitHub and Azure DevOps.
- Introduced a logging mechanism to track activity and status updates.
- Enhanced user interface with spinner animations and improved status indicators.
- Refactored code to check for eval configuration on mount and display relevant messages.
- Updated command hints for better user guidance during interactions.
- Removed unused readiness report functionality and related types.
…rt generation

- Implement tests for `ensureDir` and `safeWriteFile` in `fs.test.ts`.
- Create comprehensive tests for `runReadinessReport` in `readiness.test.ts`, covering various criteria and pillars.
- Add tests for `generateVisualReport` in `visualReport.test.ts`, ensuring correct HTML output and content.
- Update `generateCopilotInstructions` to use a new preferred model.
- Enhance TUI to support model selection and generation options for copilot instructions and agents.
- Introduce `tsup` configuration for building the project.
…eport

Add visual AI readiness reports with batch processing
- Added support for additional languages (C#, Java, Ruby, PHP) in the analyzeRepo function.
- Updated detectPackageManager to recognize new package managers (Maven, Gradle, Bundler, Composer).
- Improved handling of pnpm workspace files by skipping comment-only lines and supporting inline arrays.

fix: validate Azure DevOps slugs and improve error handling

- Introduced validateAdoSlug function to ensure organization, project, and repo names are valid.
- Updated API calls in Azure DevOps service to use validated slugs.
- Enhanced error handling in checkRepoHasInstructions to throw descriptive errors on request failures.

refactor: streamline Copilot CLI path resolution

- Cached Copilot CLI path to avoid redundant lookups.
- Improved findCopilotCliPath to handle platform-specific paths more effectively.
- Added glob pattern matching for VS Code extension paths.

chore: update evalScaffold and evaluator services

- Refactored generateEvalScaffold to use withCwd for better directory management.
- Simplified runEval by using assertCopilotCliReady for CLI path resolution.
- Removed redundant EvalCase and EvalConfig type definitions from evaluator.

fix: sanitize error messages in git push

- Added error handling in pushBranch to sanitize embedded credentials from error messages.

feat: enhance instruction generation and PR body creation

- Updated generateCopilotInstructions to use withCwd for improved directory handling.
- Created utility functions for building PR bodies for configurations and instructions.
- Updated BatchTui and BatchTuiAzure to use DEFAULT_MODEL for instruction generation.

chore: add utility functions for file system operations

- Introduced validateCachePath to prevent path traversal vulnerabilities.
- Enhanced safeWriteFile to reject symlinks and ensure safe file writing.
…ve workspace detection

- Added support for detecting non-JS monorepos (Cargo, Go, .NET, Gradle, Maven).
- Updated RepoApp and RepoAnalysis types to include ecosystem and manifestPath.
- Improved workspace type detection to accommodate additional ecosystems.
- Refactored app resolution logic to handle non-JS monorepos when JS apps are insufficient.

fix(azureDevops): encode memberId in accounts URL

- Updated accounts URL construction to properly encode memberId.

refactor(copilot): implement caching for CLI path resolution

- Added caching mechanism for Copilot CLI path with a TTL of 5 minutes.
- Improved path resolution logic to handle different platforms.

refactor(evalScaffold): simplify progress callback type

- Updated onProgress callback type to use a more concise parameter.

refactor(evaluator): define CopilotClient and CopilotSession interfaces

- Introduced interfaces for better type safety and clarity in Copilot session management.

refactor(instructions): enhance prompt for generating Copilot instructions

- Updated prompt to clarify analysis requirements and include additional tech stack files.

refactor(readiness): streamline readiness checks with improved status handling

- Refactored readiness criteria checks to return structured status and reason.

fix(ui): handle errors during repo loading and processing

- Added error handling for repo loading and processing in BatchTui and BatchTuiAzure components.

chore(tui): improve error logging for repo analysis failures

- Enhanced error logging to provide clearer feedback on repo analysis issues.

docs(cwd): add warning about process.chdir() side effects

- Updated documentation to clarify the implications of using process.chdir().

refactor(fs): export utility functions for file system operations

- Made fileExists, safeReadDir, and readJson functions public for broader usage.
… tests

refactor(analyzer): normalize package.json and Cargo.toml paths in workspace resolution

refactor(copilot): normalize CLI path when found in Copilot CLI path resolution
…used-vars, fix unused imports, auto-fix import order
TypeScript's compiler handles undeclared variable checks natively.
Disabling ESLint's no-undef prevents false positives for Node.js
globals (process, console, setTimeout, fetch, Buffer) per
typescript-eslint recommendation.
@digitarald
Copy link
Copy Markdown
Collaborator Author

Superseded by #15. Please continue review there.

@digitarald digitarald closed this Feb 22, 2026
digitarald added a commit that referenced this pull request Feb 24, 2026
feat: add VS Code extension wrapping CLI for key workflows
digitarald added a commit that referenced this pull request Feb 24, 2026
feat: consolidate vnext workstream (supersedes #12)
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.

3 participants