Skip to content

Upgrade vendored Herb linter to 0.11.1 - #57

Open
andyw8 wants to merge 1 commit into
defmethodinc:mainfrom
andyw8:upgrade-herb-0.11.1
Open

andyw8 wants to merge 1 commit into
defmethodinc:mainfrom
andyw8:upgrade-herb-0.11.1

Conversation

@andyw8

@andyw8 andyw8 commented Oct 20, 2026

Copy link
Copy Markdown

What does this PR do?

Upgrades the vendored linter from @herb-tools/linter 0.10.3 to 0.11.1
(and the herb gem dependency to ~> 0.11.1). The rule set grows from 100
to 170 rules.

Notable changes:

  • Rebuild the bundle from the new dist/index.js entry point.
  • Implement the new HerbBackend#defaultERBOpenings callback.
  • Forward the new parser options: herb_directives, iteration_nodes, erb_openers.
  • Read .herb.yml's top-level framework and thread it through Runner/Bridge,
    so Action View rules run under framework: actionview.
  • Make explicit rule selection (--only / rules:) bypass framework,
    environment, and path filters, matching upstream Linter.from({ only }).
  • Add build-time stubs for postcss's Node-only paths, since CSS/scoped-style
    rules now pull postcss into the bundle.
  • Add a conformance fixture for every registered rule (170 total).

Two conformance cases are pending because upstream needs a project-wide partial
index the standalone harness doesn't build. Two more are asserted bridge-only
because upstream 0.11.1 computes parser options before merging config
framework, so the reference CLI cannot trigger them.

Does this change affect the no-Node guarantee?

No. Node remains build-time only. The new postcss dependency's Node-only
source-map/terminal-color paths are replaced at build time with filesystem-free
stubs (stubs/fs.mjs, stubs/path.mjs, etc.), and the bundle build's existing
Node-builtin check still passes. Runtime code paths are unchanged in this
respect; bundle exec rake (including spec/no_node_spec.rb) passes.

Test coverage

  • Added/updated conformance fixtures for all 170 registered rules.
  • Added specs for framework config parsing, framework threading through the
    bridge/runner, rule framework metadata, and the new forwardable parser options.
  • bundle exec rake passes: RuboCop clean, RSpec 281 examples / 0 failures
    (2 pending), bundler-audit clean.
  • bundle exec rake build produces pkg/herb-embedded-0.11.1.0.gem.

CHANGELOG

Added an entry under ## unreleased in CHANGELOG.md.

Vendors @herb-tools/linter 0.11.1 (170 rules, up from 100) and bumps the herb gem dependency to ~> 0.11.1.

- Rebuild the bundle from dist/index.js, adding build-time stubs for the Node-only paths in postcss (path/fs/url/util/picocolors).
- Implement HerbBackend#defaultERBOpenings and forward the new parser options (herb_directives, iteration_nodes, erb_openers).
- Read .herb.yml's top-level framework and thread it through Runner/Bridge; Action View rules now run only under framework: actionview.
- Make explicit rule selection (--only / rules:) bypass framework, environment, and path filters, matching upstream Linter.from({ only }).
- Add conformance fixtures for all 170 registered rules; document two pending partial-index rules and two rules upstream 0.11.1 cannot trigger from the CLI.
- Bump gem version to 0.11.1.0 and update docs/changelog.
@andyw8
andyw8 marked this pull request as ready for review October 20, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant