Skip to content

Linter: shareable custom rules and a way to test them #1792

Description

@aki77

The .herb/rules/*.mjs custom rule mechanism works well per-project, but we'd love two
things for using it across an organization with many repos:

  1. Shareable rules — loading custom rules from an npm package (or module path),
    not just the local .herb/rules/ directory, so we can publish a rule set once and
    reuse it everywhere (similar to ESLint plugins). Copying .mjs files into each repo
    is hard to version and keep in sync.
  2. Testing — a documented/official way to unit-test a custom rule (something like
    ESLint's RuleTester), or even just docs on the recommended pattern using the
    existing API.

Are these on the radar, or is there already a recommended approach I've missed?
(Possibly related: #1756, where local custom rules hit a dependency-resolution issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions