Move mechanical Bugbot rules to lint and CI checks

Ouverte
#26,852 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
eslint, typescript
Domaine
ci-cd, tooling

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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]

Langage dominant
TypeScript
Étoiles
8.8k
Forks
1.9k
Merge moyen
1 j 8 h
PR mergées (30 j)
744

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de getsentry/sentry-javascript

Toutes les issues de getsentry/sentry-javascript

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.