-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to eslint.config.js #890
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for monarch-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #890 +/- ##
==========================================
+ Coverage 71.26% 71.29% +0.03%
==========================================
Files 91 91
Lines 3149 3149
==========================================
+ Hits 2244 2245 +1
+ Misses 905 904 -1 ☔ View full report in Codecov by Sentry. |
@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 |
eslint has migrated from the
.eslintrc.json
to the new "flat config",eslint.config.js
style.This PR:
Manually included action changes to fix #935 from #937