-
Notifications
You must be signed in to change notification settings - Fork 610
chore(deps): update eslint and related deps to v9 #6126
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
Conversation
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
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.
Pull Request Overview
This PR upgrades the repository to ESLint v9 by migrating to the new flat config format, updating related dependencies, and adjusting code to satisfy new lint rules and plugin changes.
- Migrated from legacy
.eslintrc.js
toeslint.config.mjs
with flat config and updated plugin rules - Bumped ESLint/core plugins to v9+ in
package.json
- Replaced deprecated event handlers (onClick → onSelect) and added temporary disables for unused maps
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/Overlay/Overlay.tsx | Disabled unused widthMap for new lint setup |
packages/react/src/NavList/NavList.tsx | Swapped onClick → onSelect on navigation items |
packages/react/src/Dialog/Dialog.tsx | Disabled unused heightMap /widthMap for lint |
packages/react/src/BranchName/tests/BranchName.types.test.tsx | Removed redundant ESLint disables in type tests |
packages/react/src/BranchName/BranchName.tsx | Updated ESLint disable from ban-types to new rule |
packages/react/src/ActionMenu/ActionMenu.examples.stories.tsx | Replaced onClick → onSelect in example stories |
packages/react/src/ActionList/Item.tsx | Updated ESLint disable to no-unsafe-function-type |
packages/react/src/ActionList/ActionListContainerContext.tsx | Updated ESLint disable to no-unsafe-function-type |
packages/react/src/ActionList/ActionList.features.stories.tsx | Swapped onClick → onSelect in feature stories |
packages/react/src/ActionList/ActionList.dev.stories.tsx | Swapped onClick → onSelect in dev stories |
packages/react/src/ActionBar/ActionBar.tsx | Swapped onClick → onSelect in ActionBar items |
packages/react/src/ActionBar/ActionBar.examples.stories.tsx | Swapped onClick → onSelect in examples |
packages/react/.storybook/theme.js | Added ESLint disable for import/named in Storybook |
packages/react/.storybook/src/accessibility-tool.tsx | Added disables and deps for SSR-friendly lint rules |
packages/postcss-preset-primer/src/index.js | Switched @ts-ignore to @ts-expect-error |
package.json | Bumped ESLint and related packages to v9+ |
eslint.config.mjs | Introduced new flat ESLint configuration |
e2e/components/ActionList.test.ts | Commented-out legacy tests removed for clarity |
.eslintrc.js | Removed legacy ESLint config |
.eslintignore | Removed redundant ignore file |
Comments suppressed due to low confidence (3)
e2e/components/ActionList.test.ts:206
- Instead of commenting out tests, use
test.skip
or update the feature-flag logic so the test remains active and coverage is preserved.
// removing this temporarily as there is a slight diff betqeen default and enabled CSS feature flag that feels like a non-issue
packages/react/src/Overlay/Overlay.tsx:40
- Consider removing the unused
widthMap
constant entirely, or exporting it if it will be used soon, to avoid disabling the unused-vars rule.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
packages/react/src/Dialog/Dialog.tsx:171
- The
heightMap
andwidthMap
objects are not referenced. Remove them or integrate their usage to clean up the code.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
size-limit report 📦
|
@copilot can you fix the broken CI here? |
Closes https://github.com/github/primer/issues/4155
This is take 2 for updating the project to use ESLint v9. The previous attempt ended up having a larger than expected diff so I updated some plugins and then opened this up again so that it was easier to merge.
Changelog
New
Changed
Removed