Repository navigation
Lint templates with Herb and move to the latest RuboCop - #187
Merged
Merged
Conversation
- RuboCop 1.82.1 to 1.92.0; the codebase stays clean. - Herb 0.11 (`@herb-tools/linter`, pinned) replaces erb_lint and better_html. It reads HTML and ERB as one document, so it also checks HTML validity and accessibility. CI sets up Node 22 and runs `npm run lint:erb`; bin/ci runs it as "Style: ERB". - .herb.yml lints app/ for the Action View framework and fails on errors. Five rules are off, each with its reason in the file: two false positives, the href="#" links Stimulus fills in, `tag.attributes` and `checked` toggles, and the collection-render style rule. - The first run's real errors are fixed: the radius options toggle `selected` through control flow, the cookie banner's <style> moved from the body to the stylesheet, a place photo has alt text and the video frame a title, and two unused form builders are gone. - The brain records the switch (decision herb-lints-erb) and the operator's answers of 2026-10-14; AGENTS.md and the architecture pages name Herb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run lint:erbwith GitHub annotations;bin/ciruns it too..herb.ymllintsapp/for Action View and fails on errors. Five rules are off, each with its reason written in the file:render layout:, and a nested link behindlinked:.href="#"links that Stimulus fills in.tag.attributesandcheckedtoggles.<option>s toggleselectedthrough control flow.<style>moved from<body>to the stylesheet.wiki/decisions/herb-lints-erb.md, and the operator's answers of 2026-10-14 undersources/conversations/.AGENTS.md, conventions, the architecture overview and how-we-work now name Herb.Test plan
npm run lint:erb: 0 failing offenses; 34 warnings, info and hints are printed and do not fail the build.bundle exec rubocop --parallel: 306 files, no offenses.bin/rails test: 2459 runs, 5881 assertions, 0 failures, 0 errors, 1 skip.bin/rails test:system: 69 runs, 378 assertions, 0 failures.tabula validate: 53 pages valid.🤖 Generated with Claude Code
https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT