Skip to content

Eslint update 2 (split part 1)#2673

Merged
pylipp merged 8 commits into
masterfrom
eslint-update-2-1
Apr 20, 2026
Merged

Eslint update 2 (split part 1)#2673
pylipp merged 8 commits into
masterfrom
eslint-update-2-1

Conversation

@MomoRazor
Copy link
Copy Markdown
Contributor

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 :)

@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.70%. Comparing base (554e66d) to head (06a2d2a).

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     
Flag Coverage Δ
backend 99.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pylipp
Copy link
Copy Markdown
Contributor

pylipp commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-ignore with @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.

Comment thread front/src/views/Distributions/dataTransformers.ts
pylipp and others added 3 commits April 20, 2026 10:01
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 pylipp merged commit ad2322c into master Apr 20, 2026
12 of 14 checks passed
@pylipp pylipp deleted the eslint-update-2-1 branch April 20, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants