lint-new
Create a new ESLint rule named $ARGUMENTS in the eslintPluginScraps plugin.
Step 1: Choose Your Archetype
Read references/rule-archetypes.md and pick the archetype that matches your rule's intent:
| You want to... | Archetype | Reference to load |
|---|---|---|
| Rewrite import paths | Import rewrite | Inline — simple pattern |
| Validate token/value usage per CSS property | Property validation | style-collector-guide.md |
| Restrict JSX elements in specific props | JSX structural | rule-archetypes.md §Archetype 3 |
| Detect patterns in static CSS text | Template text analysis | rule-archetypes.md §Archetype 4 |
Read the relevant reference before writing code. The archetypes document which AST visitors to use, which shared utilities apply, and which patterns are NOT appropriate for each approach.
Step 2: Check Shared Utilities
Before writing AST traversal logic, check static/eslint/eslintPluginScraps/src/ast/ for reusable code:
More from getsentry/sentry
design-system
Guide for using Sentry's layout and text primitives. Use when implementing UI components, layouts, or typography. Enforces use of core components over styled components.
84sentry-security
Sentry-specific security review based on real vulnerability history. Use when reviewing Sentry endpoints, serializers, or views for security issues. Trigger keywords: "sentry security review", "check for IDOR", "access control review", "org scoping", "cross-org", "security audit endpoint".
67generate-migration
Generate Django database migrations for Sentry. Use when creating migrations, adding/removing columns or tables, adding indexes, or resolving migration conflicts.
67sentry-javascript-bugs
Review Sentry React and TypeScript changes for bug patterns drawn from real production issues. Use when reviewing a frontend diff or PR, checking Warden findings, auditing the current branch, reviewing production-error patterns, or looking for common regressions in `static/`.
61generate-frontend-forms
Guide for creating forms using Sentry's new form system. Use when implementing forms, form fields, validation, or auto-save functionality.
61migrate-frontend-forms
Guide for migrating forms from the legacy JsonForm/FormModel system to the new TanStack-based form system.
57