Skip to content

fix(lint): add suppressions for oxlint 1.86.0 diagnostics - #2045

Merged
stipsan merged 2 commits into
renovate/lock-file-maintenancefrom
copilot/fix-lint-action-failure
Sep 29, 2026
Merged

stipsan merged 2 commits into
renovate/lock-file-maintenancefrom
copilot/fix-lint-action-failure

Conversation

Copilot AI commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Following the oxlint 1.86.0 update, the CI lint job failed due to newly introduced react/purity diagnostics and a change in diagnostic span anchoring for multiline no-unsafe-type-assertion expressions. Per task instructions, targeted oxlint-disable-next-line suppressions have been added and realigned, deferring architectural refactors to follow-up PRs.

Summary of Changes

  • react/purity suppressions: Added oxlint-disable-next-line react/purity directives across render-phase new Date() and Date.now() calls in @sanity/assist and sanity-plugin-media.
  • Span realignment for no-unsafe-type-assertion: In oxlint 1.86.0, multiline type assertions report diagnostics on the line containing } as <Type> rather than the opening line of the statement. Realigned directives directly above the assertion line across @sanity/assist, sanity-plugin-hotspot-array, @sanity/document-internationalization, sanity-plugin-internationalized-array, @sanity/block-insert-picker, sanity-translations-tab, and @sanity/presets.

Example

// Before (oxlint < 1.86.0 anchored at statement start; 1.86.0 flagged the assertion line as unsuppressed):
// oxlint-disable-next-line typescript/no-unsafe-type-assertion
const config = {
  ...defaults,
  enabled: true,
} as PluginConfig

// After (anchored directly above the assertion line):
const config = {
  ...defaults,
  enabled: true,
  // oxlint-disable-next-line typescript/no-unsafe-type-assertion
} as PluginConfig

Note

Low Risk
Comment-only lint directive moves and new suppressions; no application logic, data handling, or API changes.

Overview
Restores CI lint after oxlint 1.86.0 by updating inline suppressions only—no runtime or type behavior changes.

react/purity: Adds oxlint-disable-next-line react/purity where components call new Date() / relative time formatting during render (Assist presence/history, TimeAgo, media asset rows).

no-unsafe-type-assertion span anchoring: Multiline as Type assertions now report on the closing assertion line, so oxlint-disable-next-line comments were moved from the statement start to immediately above the } as … line across Assist, block-insert-picker, document-internationalization, internationalized-array, presets, hotspot-array, and sanity-translations-tab. A few rule names were normalized to oxlint’s no-unsafe-type-assertion (including a block disable/enable in ImageHotspotArray).

Test files received the same realignment for mock as any / stub return values.

Reviewed by Cursor Bugbot for commit 7fe29fa. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
plugins-studio Ready Ready Preview Sep 28, 2026 8:23pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
plugins-e2e-test-studio Ignored Ignored Sep 28, 2026 8:23pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7fe29fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@stipsan
stipsan marked this pull request as ready for review September 28, 2026 20:08
@stipsan
stipsan requested a review from a team as a code owner September 28, 2026 20:08
@stipsan
stipsan requested review from bjoerge and removed request for a team September 28, 2026 20:08
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ E2E Tests

🟢 43 passed • 🟡 1 flaky • view full report • view run

Studio: https://plugins-e2e-test-studio-r78jpydpp.sanity.dev

Datasets: pr-2045-chromium-36478706185, pr-2045-firefox-36478706185

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 33.32% 5811 / 17435
🔵 Statements 33.1% 6144 / 18558
🔵 Functions 29.4% 1537 / 5227
🔵 Branches 24.55% 3018 / 12290
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
plugins/@sanity/assist/src/_lib/fixedListenQuery.ts 13.04% 0% 0% 13.04% 24-29, 38-53, 63-101
plugins/@sanity/assist/src/assistDocument/AssistDocumentInput.tsx 0% 0% 0% 0% 15-62
plugins/@sanity/assist/src/assistDocument/components/AssistDocumentForm.tsx 0.98% 0% 0% 1.05% 43-289
plugins/@sanity/assist/src/assistInspector/InstructionTaskHistoryButton.tsx 7.27% 0% 0% 8.51% 78-167, 183-259
plugins/@sanity/assist/src/assistInspector/index.ts 33.33% 100% 0% 33.33% 11-26
plugins/@sanity/assist/src/components/TimeAgo.tsx 0% 0% 0% 0% 5-18
plugins/@sanity/assist/src/presence/AssistAvatar.tsx 36.36% 0% 0% 36.36% 61-96
plugins/@sanity/assist/src/presence/AssistDocumentPresence.tsx 0% 0% 0% 0% 10-50
plugins/@sanity/assist/src/presence/useAssistPresence.ts 3.84% 0% 0% 4% 11-63
plugins/@sanity/block-insert-picker/src/blockInsertPicker.tsx 95.02% 85.98% 97.67% 97.51% 120, 142, 244-245, 264, 274, 346, 358, 371, 456-457
plugins/@sanity/document-internationalization/src/components/LanguageOption.tsx 93.75% 89.13% 100% 93.61% 76, 80, 84
plugins/@sanity/document-internationalization/src/test/helpers.ts 100% 100% 100% 100%
plugins/@sanity/presets/src/registry.tsx 95.34% 89.65% 100% 95.23% 92, 160
plugins/sanity-plugin-hotspot-array/src/ImageHotspotArray.tsx 4.25% 0% 0% 4.34% 42-179
plugins/sanity-plugin-internationalized-array/src/utils/getDocumentsToTranslate.ts 92.3% 88.23% 100% 96% 35, 42
plugins/sanity-plugin-media/src/components/TableRowAsset/index.tsx 6.57% 0% 0% 7.35% 60-73, 85-89, 96-99, 103-411
plugins/sanity-translations-tab/src/configuration/baseFieldLevelConfig.ts 9.52% 0% 0% 9.52% 25-38, 45-94
plugins/sanity-translations-tab/src/configuration/baseI18nArrayConfig.ts 7.69% 0% 0% 7.69% 24-52, 59-99
plugins/sanity-translations-tab/src/configuration/baseDocumentLevelConfig/documentLevelPatch.ts 4% 0% 0% 4.16% 30-111
plugins/sanity-translations-tab/src/configuration/baseDocumentLevelConfig/index.ts 8.69% 0% 0% 8.69% 27-87, 97-115
plugins/sanity-translations-tab/src/configuration/baseDocumentLevelConfig/legacyDocumentLevelPatch.ts 5.26% 0% 0% 5.26% 12-61
Generated in workflow #10169 for commit 7fe29fa by the Vitest Coverage Report Action

Copilot AI requested a review from stipsan September 28, 2026 20:22
@stipsan
stipsan merged commit 736db11 into renovate/lock-file-maintenance Sep 29, 2026
25 checks passed
@stipsan
stipsan deleted the copilot/fix-lint-action-failure branch September 29, 2026 00:44
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Resolves the conflicts with the lock file maintenance in #2039, which also
brought #2045's suppression changes to main:

- pnpm-lock.yaml: took main's lockfile and ran `pnpm install` to re-apply
  this branch's catalog change. main already resolves oxlint 1.86.0 and
  oxlint-tsgolint 7.0.2003, so no resolved version changes; the diff is
  the catalog specifiers plus pnpm recomputing sanity@next peer-variant
  suffixes. A clean main with only this branch's pnpm-workspace.yaml
  change produces the identical lockfile.
- plugins/@sanity/assist/src/_lib/fixedListenQuery.ts: took main's version
  (#2045's), which already fixes the suppression.
cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
…2039

@sanity/presets and sanity-plugin-hotspot-array only had #2045's suppression moves, which reached main with the lock file maintenance in #2039, so this PR no longer changes them.

This branch was successfully deployed

1 active deployment
Preview – plugins-studio — 7fe29fa0 Deployed Sep 28, 2026 by vercel[bot]
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.

2 participants