Skip to content

build(oxlint): upgrade oxlint to 1.75 and tsgolint to TS 7#22561

Draft
logaretm wants to merge 6 commits into
developfrom
awad/upgrade-oxlint
Draft

build(oxlint): upgrade oxlint to 1.75 and tsgolint to TS 7#22561
logaretm wants to merge 6 commits into
developfrom
awad/upgrade-oxlint

Conversation

@logaretm

@logaretm logaretm commented Jul 23, 2026

Copy link
Copy Markdown
Member

Upgrades oxlint (1.53 to 1.75) and oxlint-tsgolint (0.16 to 7, now on TS 7), and removes the OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS workaround from every lint script so real type-aware diagnostics run again.

  • Rules dropped: Those were removed upstream (quotes is oxfmt's job now,import/no-unresolved, import/no-extraneous-dependencies, jsdoc/require-jsdoc, react/prop-types).
  • Rules renamed or moved to a different group: no-return-await becomes typescript/return-await.

Also ignores some new rules like unicorn that introduced a bunch of warnings, I see some useful stuff in there so I may re-enable them one by one later.

One of the changes surfaced a very flakey test that relies on a microtick timing, i padded it to make it more reliable.

@logaretm logaretm changed the title awad/upgrade oxlint build(deps): upgrade oxlint to 1.75, tsgolint to TS 7, oxfmt to 0.60 Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.78 kB -0.04% -9 B 🔽
@sentry/browser - with treeshaking flags 26.22 kB -0.04% -8 B 🔽
@sentry/browser (incl. Tracing) 46.3 kB -0.03% -11 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 48.05 kB -0.03% -14 B 🔽
@sentry/browser (incl. Tracing, Profiling) 51.1 kB -0.03% -12 B 🔽
@sentry/browser (incl. Tracing, Replay) 85.58 kB -0.01% -5 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.22 kB -0.01% -6 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 90.29 kB -0.01% -5 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 102.96 kB -0.01% -8 B 🔽
@sentry/browser (incl. Feedback) 44.95 kB -0.03% -9 B 🔽
@sentry/browser (incl. sendFeedback) 32.58 kB -0.04% -11 B 🔽
@sentry/browser (incl. FeedbackAsync) 37.63 kB -0.03% -9 B 🔽
@sentry/browser (incl. Metrics) 28.86 kB -0.04% -10 B 🔽
@sentry/browser (incl. Logs) 29.09 kB -0.05% -12 B 🔽
@sentry/browser (incl. Metrics & Logs) 29.79 kB -0.03% -8 B 🔽
@sentry/react 29.59 kB -0.01% -2 B 🔽
@sentry/react (incl. Tracing) 48.6 kB -0.02% -6 B 🔽
@sentry/vue 33.21 kB -0.03% -9 B 🔽
@sentry/vue (incl. Tracing) 48.27 kB -0.04% -15 B 🔽
@sentry/svelte 27.8 kB -0.04% -9 B 🔽
CDN Bundle 30.11 kB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing) 48.14 kB -0.01% -2 B 🔽
CDN Bundle (incl. Logs, Metrics) 31.69 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.47 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.95 kB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay) 85.71 kB -0.01% -3 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87 kB -0.01% -5 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.48 kB -0.01% -5 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.77 kB -0.01% -7 B 🔽
CDN Bundle - uncompressed 89.73 kB -0.05% -38 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 144.8 kB -0.03% -41 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.44 kB -0.05% -38 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.78 kB -0.03% -41 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.2 kB -0.02% -41 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.04 kB -0.02% -41 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268 kB -0.02% -41 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.74 kB -0.02% -41 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.69 kB -0.02% -41 B 🔽
@sentry/nextjs (client) 51.13 kB -0.02% -6 B 🔽
@sentry/sveltekit (client) 46.74 kB -0.03% -13 B 🔽
@sentry/core/server 79.92 kB -0.01% -2 B 🔽
@sentry/core/browser 51.89 kB -0.01% -4 B 🔽
@sentry/node 124.4 kB +0.01% +2 B 🔺
@sentry/node (incl. diagnostics channel injection) 149.83 kB -0.01% -2 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node - without tracing 74.66 kB +0.01% +5 B 🔺
@sentry/aws-serverless 84.13 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 196.56 kB -0.03% -49 B 🔽
@sentry/cloudflare (withSentry) 482.67 kB -0.07% -300 B 🔽

View base workflow run

@logaretm
logaretm force-pushed the awad/upgrade-oxlint branch from 02b93b1 to af518ac Compare July 23, 2026 16:20
@logaretm logaretm changed the title build(deps): upgrade oxlint to 1.75, tsgolint to TS 7, oxfmt to 0.60 build(oxlint): upgrade oxlint to 1.75 and tsgolint to TS 7 Jul 23, 2026
@logaretm
logaretm force-pushed the awad/ts7-tsconfig-fixes branch from 838479d to 07876d0 Compare July 23, 2026 16:49
@logaretm
logaretm force-pushed the awad/upgrade-oxlint branch from af518ac to 977d8d4 Compare July 23, 2026 16:49
Base automatically changed from awad/ts7-tsconfig-fixes to develop July 23, 2026 17:06
@logaretm
logaretm force-pushed the awad/upgrade-oxlint branch from 977d8d4 to d5565e9 Compare July 23, 2026 17:06
// If we have no comparison branch, we just run size limit & store the result as artifact
if (!comparisonBranch) {
return runSizeLimitOnComparisonBranch();
return await runSizeLimitOnComparisonBranch();

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Example of the new return await rule detecting returning promises inside try/catch blocks.

logaretm added 6 commits July 23, 2026 14:28
Renames/drops the rules the new versions flag as unknown: `no-return-await`
becomes `typescript/return-await` (kept on the modern in-try-catch default),
and rules removed upstream are dropped since they no longer exist natively:
`quotes` (now owned by oxfmt), `import/no-unresolved` (was off everywhere),
`import/no-extraneous-dependencies`, `jsdoc/require-jsdoc`, and
`react/prop-types`.

Also removes the `OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS`
workaround from every lint script so tsgolint surfaces real program
diagnostics again.
Clears the type-aware errors that appeared once real program diagnostics
were re-enabled:

- Removes unnecessary type assertions and the now-unused type imports they
  leave behind (oxlint --fix), and drops a dead pino integration interface.
- Consolidates the dedupe stacktrace/fingerprint guards so narrowing works
  without the old assignment-cast idiom.
- Migrates the terser plugin from the deprecated `output` option to `format`.
- Renames stale disable directives to the new rule names
  (`typescript-eslint(...)` -> `typescript/...`) for unbound-method and the
  HTTP_URL no-deprecated suppressions.
- Adds no-deprecated suppressions where we intentionally read our own
  deprecated options for back-compat, and return-await suppressions where an
  await is deliberate (node-cron) or the cast makes the rule misfire.
…ssary

`no-unnecessary-type-assertion` (tsgolint) reports several casts as redundant,
but they are load-bearing: it only checks assignability at the cast site and
misses that the cast changes the expression's resulting type for downstream
use. Removing them type-checks locally but fails the real `tsc` build (verified:
both tsconfig.json and tsconfig.types.json error identically without the cast).

Restores each cast with a targeted suppression: a Cloudflare-only client option,
LCP/INP PerformanceEntry fields, a Vue VNode probe, mysql/postgres vendored
connection shapes, the view-hierarchy identifier, and the internal
`shouldNotThrowOnFailure` on setCommits. eventbuilder instead uses a typed
`Exception` variable so no cast (or suppression) is needed there.
The oxlint 1.75 bump surfaced ~5.9k warnings. This clears them to zero without
churning the codebase:

- Vitest: keep the plugin (and its ~60 other rules) but disable the correctness
  rules the bump newly fired across the existing suite (no-standalone-expect,
  require-mock-type-parameters, no-conditional-expect, expect-expect, valid-title,
  valid-expect, require-to-throw-message, no-disabled-tests, valid-describe-callback).
- Disable rules that over-trigger / false-positive here: no-useless-default-assignment,
  no-useless-fallback-in-spread, no-thenable (we implement thenables), no-new-array
  (used with immediate .fill()), prefer-string-starts-ends-with.
- Keep no-empty-file on (catches accidental empties) but exempt the two intentional
  comment-only files, and silence test-file occurrences of the general rules.
- Fix the few worth fixing: drop redundant `void` operators in the graphql/firebase
  channel callbacks, type the bun test-runner fetch init as RequestInit, and suppress
  the two no-unreachable false positives in rollup dual-build helpers.

Note: vitest/valid-expect flagged 10 pre-existing broken tests (chai-style `.to.`
modifiers); left for a separate fix.
…base

The develop rebase reintroduced the OTel span casts (its span-kind refactor
touched this file); tsgolint flags them as unnecessary again, so drop them
while keeping develop's `attributes ... || {}` change.
waitForReplayEventBuffer hardcoded "one Promise.resolve() per await in the util
functions", so it silently coupled the test to the enrichment chain's exact
await count. That made a behavior-neutral lint fix (dropping a redundant
`return await` in _getResponseText) look like a data-loss regression.

Flush microtasks in a bounded loop instead, so the test no longer depends on
the implementation's await depth. _getResponseText keeps the rule-compliant
`return response.text()`.
@logaretm
logaretm force-pushed the awad/upgrade-oxlint branch from d5565e9 to 5da364a Compare July 23, 2026 18:41
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.

1 participant