← Back to Pull requests

[lint] adopt `@cloudflare/oxlint-config` base lint config #17079

Closed
unknown closed this pull request without merging on Nov 20, 2026 14:18 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 13:26 UTC
Author

Adopts the shared @cloudflare/oxlint-config preset as a passing baseline, following the preset's migration guide.

  • Replaces .oxlintrc.jsonc with oxlint.config.mts built on the preset. It's .mts because the root package.json isn't type: module.

  • Upgrades oxlint 1.56 → 1.94 (the preset's minimum) and swaps oxlint-tsgolint for tsrs, the type-aware backend the preset expects. tsrs is a beta TS7 port; check:type still uses the repo's TypeScript.

  • Carries forward all existing project rules, ignore patterns, jsPlugins and overrides. no-console stays limited to published packages.

  • The preset turns oxlint's categories off, so the 32 correctness rules we enforced through the category (including the Jest-compatible rules the vitest plugin enabled) are now listed explicitly to keep that coverage. vitest/no-export is Jest-only in oxlint 1.94 and can't be kept.

  • The preset relaxes no-explicit-any and no-non-null-assertion in tests. We enforced both there, so they're re-enabled.

  • Preset rules that fail on existing code (76, ~40k findings, mostly typescript/no-unsafe- and typescript/array-type) are temporarily off in one trailing / override. reportUnusedDisableDirectives is off until they're re-enabled.

  • Already-enforced rules that report new findings under oxlint 1.94 / tsrs (no-deprecated, no-unused-vars, prefer-spread, no-global-assign, unicorn/prefer-set-size and seven vitest/* rules) are disabled only in the affected files.
  • Follow-up: re-enable the temporarily disabled rules one per commit with fixes, or document why each stays off. react/rules-of-hooks is likely to stay off outside React packages: all its findings are Miniflare test helpers like useTmp.

    ---

  • Tests

  • - [ ] Tests included/updated
    - [ ] Automated tests not possible - manual testing has been completed as follows:
    - [x] Additional testing not necessary because: lint configuration only. pnpm check:lint, check:format, check:catalog and check:pinned-deps pass, and probe files confirmed project rules, the workers-sdk plugin, per-package overrides and type-aware rules still report.
  • Public documentation

  • - [ ] Cloudflare docs PR(s): <!--e.g. <https://github.com/cloudflare/cloudflare-docs/pull/>...-->
    - [x] Documentation not necessary because: internal repository tooling only.

    🤖 Generated with Claude Code

    <!-- devin-review-badge-begin -->

    ---

    <a href="https://cloudflare.devinenterprise.com/review/cloudflare/workers-sdk/pull/17079" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
    <!-- devin-review-badge-end -->

    Diff: 359 lines (+269 / -90) across 4 files Reviewer: NuroDev Review duration: 51m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 359 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #17079"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.8% (HIGH) · Higher = larger blast radius
    65.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.0% · Safe to merge
    26.0%