Add lint, prettier and coverage for release plan dashboard#15606
Open
praveenkuttappan wants to merge 4 commits into
Open
Add lint, prettier and coverage for release plan dashboard#15606praveenkuttappan wants to merge 4 commits into
praveenkuttappan wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
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.jsto exposecreateApp/validateEnvVarsfor 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
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,
}