struct

Ignorelint::EslintignoreStyleLinter

Inherits Ignorelint::FormatLinter < Struct < Value < Object

The linter adapter for eslintignore files.

Combines:

  1. CommonGlob.check — shared glob-validity rules
  2. GitignoreSemantics.check — gitignore-specific rules (reused because eslintignore shares most gitignore semantics)
  3. EslintignoreSemantics.check — non-recursive matching warning
  4. Conflicts.check — cross-pattern conflict detection

Overrides build_glob because unrooted patterns are non-recursive — no **/ prefix should be used in dead-rule detection.

Constructors

new

Instance methods

build_glob(pat : Pattern, base_dir : String) : String

Override glob building for eslintignore semantics.

In eslintignore, unrooted patterns match same-directory only — they are NOT recursive. For dead-rule detection, this means we should NOT add a **/ prefix (which would search subdirectories). Both rooted and unrooted patterns resolve to the same direct path.

check_pattern(pat : Pattern) : Array(Issue)

Check a single pattern for format-specific issues.

Returns an array of Issue values (empty if the pattern is clean for this format). Called once per active (non-blank, non-comment) pattern.

check_patterns(patterns : Array(Pattern), issues : Array(Issue)) : Nil

Check the full pattern list for cross-pattern issues.

Used for conflict detection (e.g. "build" followed by "!build"). Mutates the issues array in place for efficiency.

initialize