Move mechanical Bugbot rules to lint and CI checks

未關閉
#26,852 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
eslint, typescript
領域
ci-cd, tooling

研究方向

Start with .cursor/BUGBOT.md and the existing lint rules linked in issues #26860, #26861, #26880, and #26881; then inspect the node, browser, and E2E test helpers and the CI scripts for the checks listed here. The issue describes several independent workstreams, so pick one unchecked item and trace its existing conventions and tests. Done means that check is enforced and the corresponding Bugbot rule is removed where applicable.

由索引模型根據 Issue 內容生成。

描述

Several rules in .cursor/BUGBOT.md are mechanical enough to enforce with Oxlint, test harness checks, or CI scripts instead of AI review. Counts below are rough scans of packages/*/src at cee40e6.

Zero/near-zero baseline (turn on now)

  • getsentry/sentry-javascript#26854
  • getsentry/sentry-javascript#26856

New sdk/* lint rules

  • getsentry/sentry-javascript#26861
  • getsentry/sentry-javascript#26860
  • getsentry/sentry-javascript#26881
  • getsentry/sentry-javascript#26880
  • Hard-coded attribute/op strings that have a @sentry/conventions constant (src and tests).
  • Literal sentry.origin values matching the trace origin spec (0 current violations).

Test harness checks

  • Validate sentry.origin, sentry.op, and mechanism.type on every captured span/event in node, browser, and E2E test helpers. Most startSpan* calls pass attributes through variables, so lint can't see them.

CI scripts

  • dependencies allowlist for core, browser, browser-utils.
  • bundler-tests check that a bare import '@sentry/browser' / core tree-shakes to an empty bundle (both declare sideEffects: false).
  • Export snapshot per package that fails on removals unless changelog/migration docs change.

Stale Bugbot rules to remove

  • getsentry/sentry-javascript#26854

Judgment rules (error swallowing vs double capture, dataCollection and sanitization through helpers, scope/client API necessity, breaking changes, test quality) stay in Bugbot. Once a rule is enforced, remove it from BUGBOT.md.

via @mydea.

--

View Session [Sentry]

主要語言
TypeScript
星號
8.8k
分支
1.9k
平均合併
1 天 8 小時
30 天內合併 PR
744

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getsentry/sentry-javascript 的其他 Issue

查看 getsentry/sentry-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。