diff --git a/CLAUDE.md b/CLAUDE.md index a6a282d5c..f3ac1e1c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -153,6 +153,8 @@ bundle exec bundle-audit check --update - Controller naming: `[name]_controller.js` - Keep controllers focused and small - Use Tailwind CSS v4 utility classes +- **Use Stimulus targets and data attributes** to reference DOM elements — avoid `this.element.querySelector` and direct DOM queries. Declare `static targets = [...]` and use `data-[controller]-target` attributes in views. +- **Use Stimulus shorthand action descriptors and shorthand pairs** — omit the event when it's the default for that element (e.g., `input` for ``/`