Skip to content

Add lint, prettier and coverage for release plan dashboard#15606

Open
praveenkuttappan wants to merge 4 commits into
Azure:mainfrom
praveenkuttappan:dashboard_ci
Open

Add lint, prettier and coverage for release plan dashboard#15606
praveenkuttappan wants to merge 4 commits into
Azure:mainfrom
praveenkuttappan:dashboard_ci

Conversation

@praveenkuttappan
Copy link
Copy Markdown
Member

This PR adds eslint nd prettier check as part of PR pipeline checks. It also has the changes to ensure coverage using followin thresholds.

thresholds: {
branches: 90,
functions: 100,
lines: 100,
statements: 100,
}

@praveenkuttappan praveenkuttappan self-assigned this May 12, 2026
Copilot AI review requested due to automatic review settings May 12, 2026 21:27
@praveenkuttappan praveenkuttappan added the API Spec & SDK release process API Spec & SDK library creation, generation, and publishing processes. label May 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the release plan dashboard tool’s quality gates by adding ESLint + Prettier checks and introducing Vitest coverage reporting with strict thresholds, alongside refactors/tests to drive coverage across server, routes, and library modules.

Changes:

  • Added Vitest coverage configuration (with thresholds) and expanded/added tests to cover server/routes/lib behavior.
  • Added ESLint + Prettier configuration and CI steps to run lint/format checks for this tool.
  • Refactored server.js to expose createApp/validateEnvVars for testing and improved formatting/consistency across the codebase.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/release-plan-dashboard/vitest.config.js Adds Vitest coverage config + thresholds and coverage include set.
tools/release-plan-dashboard/eslint.config.js Introduces flat ESLint config for Node, browser public/**, and tests.
tools/release-plan-dashboard/.prettierrc.json Adds Prettier config file (currently empty/defaults).
tools/release-plan-dashboard/package.json Adds scripts for lint/format/coverage and dev dependencies for eslint/prettier/coverage.
tools/release-plan-dashboard/ci.yml Adds lint + prettier checks to pipeline; currently still runs tests without coverage.
tools/release-plan-dashboard/.gitignore Ignores coverage/.
tools/release-plan-dashboard/server.js Refactors into createApp + validateEnvVars; still starts server as import-time side effect.
tools/release-plan-dashboard/routes/api.js Formatting + enrichment/caching logic exercised more thoroughly by tests.
tools/release-plan-dashboard/lib/rate-limit.js Formatting updates; retains sliding-window limiter with cleanup/unref.
tools/release-plan-dashboard/lib/github-api.js Formatting + exports extended to support deeper unit testing.
tools/release-plan-dashboard/lib/devops-api.js Formatting + additional exported helpers to support tests.
tools/release-plan-dashboard/lib/cache.js Formatting updates.
tools/release-plan-dashboard/lib/auth.js Formatting + testability improvements via mocked Azure SDK imports in tests.
tools/release-plan-dashboard/tests/server.test.js Reworks integration tests to import server.js exports and drive coverage.
tools/release-plan-dashboard/tests/rate-limit.test.js Adds tests for cleanup interval behaviors and reformats helpers.
tools/release-plan-dashboard/tests/package-feed.test.js Formatting + additional logic coverage for feed/version display behavior.
tools/release-plan-dashboard/tests/github-api.test.js Formatting + minor test structure tweaks.
tools/release-plan-dashboard/tests/github-api-mocked.test.js New mocked-Octokit test suite for GitHub API functions and batch helpers.
tools/release-plan-dashboard/tests/github-api-extended.test.js Adds broader unit coverage for internal GitHub helpers (approvers/checks/comments/spec paths).
tools/release-plan-dashboard/tests/devops-api.test.js Expands unit tests for mapping/utility functions (e.g., email stripping, spec PR URL extraction).
tools/release-plan-dashboard/tests/devops-api-mocked.test.js New mocked-fetch/credential test suite for DevOps API behaviors.
tools/release-plan-dashboard/tests/cache.test.js Adds eviction edge-case coverage (entries missing updatedAt).
tools/release-plan-dashboard/tests/auth.test.js Adds mocked Key Vault signing + GitHub token minting test coverage.
tools/release-plan-dashboard/tests/api-routes.test.js Significantly expands mocked route handler tests for caching/enrichment/error paths.
tools/release-plan-dashboard/README.md Formatting improvements to tables/spacing and test documentation.
tools/release-plan-dashboard/AGENTS.md Formatting improvements to conventions/tables/spacing.
tools/release-plan-dashboard/public/index.html Large reformat (Prettier) + fixes malformed script tag structure.
Files not reviewed (1)
  • tools/release-plan-dashboard/package-lock.json: Language not supported

Comment thread tools/release-plan-dashboard/package.json Outdated
Comment thread tools/release-plan-dashboard/package.json Outdated
Comment thread tools/release-plan-dashboard/server.js Outdated
Comment thread tools/release-plan-dashboard/ci.yml Outdated
praveenkuttappan and others added 2 commits May 12, 2026 17:28
- check script and ci.yml now use test:ci to enforce coverage thresholds
- lint script uses 'eslint .' to properly target files
- server.js guards start() to only run when executed as entrypoint

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use void expression for Alpine reactive dependency tracking
- Remove unused nextMonth and wiUrl variables

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Spec & SDK release process API Spec & SDK library creation, generation, and publishing processes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants