Eslint update 2 (split part 1)#2673
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2673 +/- ##
==========================================
- Coverage 76.71% 76.70% -0.02%
==========================================
Files 299 299
Lines 22140 22146 +6
Branches 2224 2229 +5
==========================================
+ Hits 16985 16987 +2
- Misses 5106 5107 +1
- Partials 49 52 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
Cherry-picks low-risk code changes to prepare for ESLint v9 migration, primarily by replacing discouraged TypeScript/JS patterns (non-null assertions, Boolean/String boxed types, @ts-ignore, etc.) with more explicit/ESLint-friendly alternatives.
Changes:
- Replace
@ts-ignorewith@ts-expect-error(with rationale) in several places. - Reduce non-null assertions and boxed primitive types (
Boolean/String) across FE + statviz. - Minor conditional/optional-chaining adjustments to satisfy newer lint rules.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| shared-components/statviz/components/visualizations/stock/StockOverviewPie.tsx | Switch to @ts-expect-error for tidy filter spread typing gap. |
| shared-components/statviz/components/visualizations/movedBoxes/MovedBoxesFilterContainer.tsx | Optional-chaining + catch cleanup + @ts-expect-error comment update. |
| shared-components/statviz/components/visualizations/demographic/DemographicFilterContainer.tsx | Optional-chaining and length-check refactor. |
| shared-components/statviz/components/visualizations/createdBoxes/CreatedBoxesFilterContainer.tsx | Catch cleanup + @ts-expect-error comment update for tidy spread. |
| shared-components/statviz/components/nivo/Sunburst.tsx | Replace @ts-ignore with @ts-expect-error. |
| shared-components/statviz/components/nivo/SankeyChart.tsx | Replace @ts-ignore with @ts-expect-error for Nivo layer typing gaps. |
| front/src/views/Transfers/TransferAgreementOverview/TransferAgreementOverviewView.tsx | Reduce non-null assertions in Apollo cache write. |
| front/src/views/Transfers/ShipmentView/components/ShipmentTabs.tsx | Change boxed Boolean prop type to boolean. |
| front/src/views/Transfers/ShipmentView/components/ShipmentContent.tsx | Change boxed Boolean prop type to boolean. |
| front/src/views/Transfers/ShipmentView/components/ShipmentCard.tsx | Change boxed Boolean prop types to boolean. |
| front/src/views/Transfers/ShipmentView/ShipmentView.tsx | Remove non-null assertions and add guards around rendering. |
| front/src/views/Transfers/CreateTransferAgreement/CreateTransferAgreementView.tsx | Safer Apollo cache update guard for accepted agreements query. |
| front/src/views/EditCustomProduct/EditCustomProductView.tsx | Replace non-null assertions in parseInt inputs with nullish fallback. |
| front/src/views/Distributions/dataTransformers.ts | Replace non-null assertions with default values for nullable product fields. |
| front/src/views/Distributions/DistrosDashboardView/DistrosDashboardView.tsx | Remove non-null assertion when syncing tab index. |
| front/src/views/Distributions/DistroEventView/components/State2Packing/components/PackingAddBoxOrItemsForPackingListEntryOverlay/PackingScanBoxOrFindByLabelOverlayContent.tsx | Replace @ts-ignore with @ts-expect-error for Apollo typing gap. |
| front/src/views/Distributions/DistroEventView/components/State2Packing/components/PackedContentListOverlay.tsx | Guard rendering to avoid forcing non-null sizeId. |
| front/src/views/Box/components/BoxCard.tsx | Avoid non-null assertion by guarding defaultBoxState. |
| front/src/providers/ApolloAuth0Provider.tsx | Change boxed String state type to string. |
| front/src/mocks/functions.ts | Change boxed Boolean param type to boolean. |
| front/src/components/Table/Filter.tsx | Change boxed Object param type to object. |
| front/src/components/QrReader/QrReaderContainer.tsx | Remove non-null assertion in box-add check. |
| front/src/components/BoxReconciliationOverlay/BoxReconciliationOverlay.test.tsx | Remove @ts-ignore before window.scrollTo mock. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Philipp Metzner <10617122+pylipp@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Philipp Metzner <10617122+pylipp@users.noreply.github.com>
pylipp
approved these changes
Apr 20, 2026
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.
This is a PR cherry picking the simplest changes from this PR in an effort to help decrease the review load needed for Eslint 9 here. This PR include changes which I believe need minimum review effort, as mostly remove syntactic sugar which is no longer recommended by Eslint, with actual conditionals.
If any of the new logic here has any effect, then it is an affect that the system was already suffering from in all likelyhood.
@pylipp let me know if this helps or if I should attempt to split it up further! This is planned to be part 1 of 3 :)