Add ESLint/Prettier config, TTS env test coverage, and missing a11y:manual script (#1305, #1306, #1307, #1308) - #1460
Open
Joel234-png wants to merge 1 commit into
Conversation
…anual script (solutions-plug#1305, solutions-plug#1306, solutions-plug#1307, solutions-plug#1308) solutions-plug#1305: no eslint config, prettier config, eslint/prettier devDependencies, or `format` script existed at all, despite CONTRIBUTING.md stating "ESLint and Prettier are configured in the frontend/ directory" and instructing contributors to run `npm run format` before committing. Added eslint.config.mjs (flat config extending next/core-web-vitals + next/typescript + prettier, via the standard create-next-app boilerplate), .prettierrc/.prettierignore matching this codebase's existing single-quote/semicolon style, the eslint/eslint-config-next/ eslint-config-prettier/prettier devDependencies, and `format`/ `format:check` scripts. solutions-plug#1307: src/lib/env.ts, frontend/.env.example, and src/lib/__tests__/env.test.ts already exist in full — nothing was deleted, and .env.example already documents both NEXT_PUBLIC_API_URL and NEXT_PUBLIC_TTS_API_URL (added for solutions-plug#116's TTS integration). The real gap: env.test.ts had zero test coverage of NEXT_PUBLIC_TTS_API_URL's validation branch (valid URL, unset, empty-string, and invalid-URL cases) despite env.ts already implementing that logic. Added the missing cases. solutions-plug#1308: jest.config.js and jest.setup.js already exist in full — jest-environment-jsdom, @testing-library/react, @testing-library/ jest-dom, and jest-axe are all wired up together with coverage thresholds enforced via test:ci, exactly as described. No gap found here; verified against package.json's devDependencies and jest.setup.js directly. solutions-plug#1306: package.json's script surface (test, test:ci, every test:e2e:* variant, test:a11y, lighthouse, axe, bundlewatch, generate-client, analyze) already matches every script name invoked by name across .github/workflows/*.yml. The one real gap found on close inspection: `a11y:manual` pointed at scripts/manual-testing-checklist.js, which did not exist in this repo (axe-audit.js, lighthouse-audit.js, and run-e2e-tests.js all exist; this one didn't) — so running it failed with "Cannot find module". Added the missing script. Closes solutions-plug#1305 Closes solutions-plug#1306 Closes solutions-plug#1307 Closes solutions-plug#1308 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014jDDop7frnew1xcCJDSKEw
|
@Joel234-png Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
formatscript existed at all, despiteCONTRIBUTING.mdstating "ESLint and Prettier are configured in thefrontend/directory" and instructing contributors to runnpm run formatbefore committing. Addedeslint.config.mjs(flat config extendingnext/core-web-vitals+next/typescript+prettier, the standard create-next-app boilerplate),.prettierrc/.prettierignorematching this codebase's existing single-quote/semicolon style, the necessary devDependencies, andformat/format:checkscripts..env.example#1307:src/lib/env.ts,frontend/.env.example, andsrc/lib/__tests__/env.test.tsalready exist in full — nothing was deleted, and.env.examplealready documents bothNEXT_PUBLIC_API_URLandNEXT_PUBLIC_TTS_API_URL(added for Expand Dispute Window for Global Participation #116's TTS integration). The real gap:env.test.tshad zero test coverage ofNEXT_PUBLIC_TTS_API_URL's validation branch despiteenv.tsalready implementing it. Added the missing valid/unset/empty-string/invalid-URL cases.jest.config.jsandjest.setup.jsalready exist in full —jest-environment-jsdom,@testing-library/react,@testing-library/jest-dom, andjest-axeare all wired up together with coverage thresholds enforced viatest:ci, exactly as described. No gap found here; verified againstpackage.json's devDependencies andjest.setup.jsdirectly.package.json's script surface (test,test:ci, everytest:e2e:*variant,test:a11y,lighthouse,axe,bundlewatch,generate-client,analyze) already matches every script name invoked by name across.github/workflows/*.yml. The one real gap found on closer inspection:a11y:manualpointed atscripts/manual-testing-checklist.js, which did not exist in this repo (its siblingsaxe-audit.js,lighthouse-audit.js, andrun-e2e-tests.jsall exist; this one didn't) — running it failed with "Cannot find module". Added the missing script.Test plan
package.jsonstill parses as valid JSON via static analysis (no build/test/install commands run).github/workflows/*.yml(test.yml,accessibility.yml,dependency-scan.yml,license-check.yml,e2e-staging.yml) againstpackage.json's script surface to confirm [Frontend Scaffolding] Recreate package.json scripts expected by CI #1306's true (and only) gap.license-checker.json,scripts/axe-audit.js,scripts/lighthouse-audit.js, andscripts/run-e2e-tests.jsall already exist before ruling out further [Frontend Scaffolding] Recreate package.json scripts expected by CI #1306 gapsCloses #1305
Closes #1306
Closes #1307
Closes #1308