Conversation
❌ Deploy Preview for monarch-app failed.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #890 +/- ##
=======================================
Coverage 72.62% 72.62%
=======================================
Files 93 93
Lines 3306 3306
=======================================
Hits 2401 2401
Misses 905 905 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@vincerubinetti Hope you're doing well, long time no see! But do you have any idea why |
|
The issue seems to be with this line: type Test = Parameters<typeof test>[1];I assume I wrote it like this originally because Playwright did not conveniently export a (e.g.) My guess is that in upgrading the version of which made I've found that this works (for now), where these types are just imported from playwright, and this union is defined under-the-hood in /** test func args */
type TestArgs = PlaywrightTestArgs &
PlaywrightTestOptions &
PlaywrightWorkerArgs &
PlaywrightWorkerOptions;
// it'd be nice if they had a type for this union and exported it for us so we could just use it forever
/** generic page axe test */
const checkPage =
(path: string, selector?: string) =>
async ({ page, browserName }: TestArgs) => {Or a better long term solution is to refactor it into this: const checkPage = (title: string, path: string, selector?: string) =>
test(title, async ({ page, browserName }) => {})
checkPage("Accessibility check " + path, path); |
|
Nice, that last refactor seems to have done it! Thanks so much for taking a look, I'm not sure I'd have ever figured that out haha |
|
@kevinschaper sorry for the ping - thoughts on this? |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the project to use ESLint’s new flat config, addresses various linting/formatting/typing issues, and brings dependency and usage updates (including UAParser and analytics) in line with newer versions.
- Updated ESLint configuration and removal of deprecated config files
- Dependency updates and adjustments to UAParser usage and analytics initialization
- Minor accessibility and code style improvements in Vue components
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/pages/aboutV2/PageContact.vue | Updated UAParser import and usage; ensure consistency across components |
| frontend/src/pages/about/PageCite.vue | Added ESLint inline disable comments for long lines |
| frontend/src/pages/PageTestbed.vue | Added accessibility label and ESLint disable/enable comments |
| frontend/src/main.ts | Revised GA initialization with createGtag |
| frontend/src/data/downloads.ts | Added ESLint inline disable for max-len |
| frontend/src/composables/use-param.ts | Removed ts-expect-error comments in favor of clearer type handling |
| frontend/src/components/TheFeedbackForm.vue | Updated UAParser usage to use instantiation with getResult() |
| frontend/src/components/AppTextbox.vue | Added “for” attribute to improve accessibility |
| … | … |
Comments suppressed due to low confidence (1)
frontend/src/composables/use-param.ts:73
- The removal of the @ts-expect-error comments suggests that type issues have been addressed; please verify that the updated type checks and guards ensure proper type safety for accessing url.value.
if (typeof url.value[key] === "string") newValue = url.value[key];
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Code Review: PR #890 - ESLint Flat Config MigrationOverall Assessment: 7.5/10 ⭐This PR successfully migrates from ESLint's legacy 🟢 Strengths1. ESLint Configuration Quality
2. Type Safety ImprovementsAppLink.vue (frontend/src/components/AppLink.vue:9) // Better typing with specific VNode[] instead of unknown
type Slots = {
default: () => VNode[];
};AppNodeText.vue (frontend/src/components/AppNodeText.vue:89,93) // Correct use of primitive boolean instead of Boolean object wrapper
createSurroundingEl(isSvg: boolean) { ... }use-param.ts (frontend/src/composables/use-param.ts:42-46)
3. Accessibility Improvements
4. Modernization
🟡 Issues & Concerns1. 🚨 ESLint Configuration Error (frontend/eslint.config.js:18)Critical Issue: languageOptions: {
parserOptions: {
ecmaVersion: "latest",
sourceType: "script", // ← INCORRECT
},
},Problem: Setting Fix: languageOptions: {
parserOptions: {
ecmaVersion: "latest",
sourceType: "module", // or just omit this line
},
},2. Missing Accessibility Configuration (frontend/eslint.config.js:46-52)The old config had a // Old config had:
"vuejs-accessibility/label-has-for": [
"error",
{
"controlComponents": ["AppInput"], // ← Missing in new config
...
},
]Impact: This could miss accessibility issues with the custom 3. Disabled Linting Rules (frontend/eslint.config.js:56-63)Several strict rules are disabled: "prefer-const": "off",
"@typescript-eslint/no-unused-vars": ["off"],
"@typescript-eslint/no-unused-expressions": ["off"],Recommendation: Consider using 4. 🚨 gtag Router Tracking (frontend/src/main.ts:60-62)Before: app.use(VueGtag, { config: { id: "G-TWM5ED4QJB" } }, router);After: const gtag = createGtag({ tagId: "G-TWM5ED4QJB" });
app.use(gtag);
// Router is no longer passed! ⚠️Concern: The router parameter was removed. This might affect automatic page view tracking. Please verify that route changes are still being tracked in Google Analytics.
|
Code Review: PR #890 - Update to eslint.config.jsSummaryThis PR successfully migrates from the legacy ✅ Positive Aspects
|
Pull Request Review: Update to eslint.config.jsSummaryThis PR successfully migrates from ESLint's legacy ✅ Positive Aspects1. Configuration Migration
2. Dependency UpdatesThe dependency updates are well-structured and address important areas:
3. Code Quality Improvements
4. Package Manager Cleanup
5. Modern JavaScript Standards
6. Build Configuration Updates
|
Pull Request Review: Update to eslint.config.jsThis is a comprehensive ESLint migration PR that updates from the deprecated ✅ Strengths1. Configuration Migration
2. Dependency UpdatesMajor version bumps are substantial and well-coordinated:
3. Code Quality Improvements
4. Test Improvements
|
eslint has migrated from the
.eslintrc.jsonto the new "flat config",eslint.config.jsstyle.This PR: