-
Notifications
You must be signed in to change notification settings - Fork 129
Upgrade to ESLint v9 #3125
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
base: main
Are you sure you want to change the base?
Upgrade to ESLint v9 #3125
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| }: EventParameters): string => { | ||
| return `${routeForWorkflow(parameters)}/history/events/${eventId || requestId}`; | ||
| }: EventParameters): ResolvedPathname => { | ||
| return resolve(`${routeForWorkflow(parameters)}/history/events/[id]`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
|
| rules: { | ||
| ...sharedRules, | ||
| 'svelte/require-each-key': 'warn', | ||
| 'svelte/no-navigation-without-resolve': 'warn', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still getting a bunch of theses warnings despite the routing utility functions (in route-for.ts) already returning a ResolvedPathname. Seems that the ESLint rule can't detect this so either we leave as is, disable specific lines or just go ahead and disable it (e.g. add { ignoreGoto: true }).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignoreGoto imo or just warn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just leave as warn for now.
rossedfort
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
| <Dot | ||
| point={[x, y]} | ||
| classification={group.lastEvent.classification} | ||
| icon={'retry'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so glad eslint catches this now 🙌
| confirmType="destructive" | ||
| cancelText={translate('common.cancel')} | ||
| confirmDisabled={!jobIdValid} | ||
| confirmDisabled={!$jobIdValid} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this was likely causing a bug, nice!
c288501 to
997b25f
Compare
Description & motivation 💭
This PR migrates from ESLint v8 legacy config to ESLint v9 with the modern flat config format and fixes various linting issues errors and warnings.
ESLint Migration
Configuration Changes:
.eslintrc.cjstoeslint.config.jswith flat config formattypescript-eslint/eslint-pluginandtypescript-eslint/parserfrom v6 to v8 for ESLint v9 compatibilityeslint-plugin-importwitheslint-plugin-import-x(maintained fork with native flat config support)New Dependencies:
eslint/js- ESLint recommended configtypescript-eslint- Modern TypeScript ESLint packageglobals- Global variable definitionseslint-plugin-import-x- Import ordering and validationStylelint Configuration
declaration-property-value-no-unknownrule to allow Tailwind'stheme()function in CSS propertiesCode Quality Fixes
Portal Component Refactor:
portal.svelteto use @attach directive instead of large $effect blockLinting Error Fixes:
{#each}blockswaitForSelector()Formatting:
Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
All linting commands should pass:
pnpm lintpnpm eslintpnpm stylelintChecklists
Draft Checklist
Merge Checklist
Issue(s) closed
DT-3596Docs
Any docs updates needed?