pbakaus/impeccable · error

Wildcard value ignores must be scoped with --file <glob>, e.

Error message

Wildcard value ignores must be scoped with --file <glob>, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value design-system-font-size "*" --file "src/widget.js". To suppress the rule project-wide use ${projectWide}.

What it means

A bare `*` value would suppress the rule everywhere, which is exactly what ignore-rule does. detector.ignoreValues honors a `files` scope, so addIgnoreValue requires a `--file <glob>` whenever the value is `*` and files is empty. The message points to the scoped ignore-value form, and for overused-font additionally names the ignore-rule --all-values escape hatch (since ignore-rule overused-font refuses on its own without --all-values).

Source

Thrown at plugin/skills/impeccable/scripts/hook-admin.mjs:713

  const parsed = parseIgnoreValueArgs(args);
  if (!parsed.rule || !parsed.value) {
    throw new Error(`Pass a rule id and value, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value overused-font Inter`);
  }

  if (parsed.shared && parsed.local) {
    throw new Error('Pass only one scope flag: --shared or --local');
  }

  // A bare `*` would suppress the rule everywhere, which is ignore-rule's job and
  // not what a finding in one file justifies. detector.ignoreValues honours a
  // `files` scope, so require one — matching `impeccable ignores add-value`.
  if (parsed.value === '*' && parsed.files.length === 0) {
    // `ignore-rule overused-font` refuses on its own without --all-values, so
    // naming the bare form here would hand the user a second error.
    const projectWide = parsed.rule === 'overused-font'
      ? `${IMPECCABLE_COMMAND} hooks ignore-rule ${parsed.rule} --all-values`
      : `${IMPECCABLE_COMMAND} hooks ignore-rule ${parsed.rule}`;
    throw new Error(`Wildcard value ignores must be scoped with --file <glob>, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value design-system-font-size "*" --file "src/widget.js". To suppress the rule project-wide use ${projectWide}.`);
  }

  const local = parsed.local;
  const config = mergeDetectorConfig(readRawDetectorConfig(cwd, { local }));
  // Key on the file scope too: the same rule/value legitimately appears more than
  // once with different scopes, and a rule+value-only key overwrote them.
  const key = ignoreValueEntryKey({ rule: parsed.rule, value: parsed.value, files: parsed.files });
  const existing = config.ignoreValues.find((entry) => ignoreValueEntryKey(entry) === key);

  if (existing) {
    if (parsed.reason) existing.reason = parsed.reason;
  } else {
    const entry = {
      rule: parsed.rule,
      value: parsed.value,
    };
    if (parsed.files.length) entry.files = parsed.files;
    entry.createdAt = new Date().toISOString();

View on GitHub (pinned to d14711ae3d)

Solutions

  1. Scope the wildcard to a file: `hooks ignore-value <rule> "*" --file "src/widget.js"`.
  2. If project-wide suppression is truly intended, use `hooks ignore-rule <rule>` (and for overused-font add `--all-values`).

Example fix

# before
impeccable hooks ignore-value design-system-font-size "*"

# after (scoped)
impeccable hooks ignore-value design-system-font-size "*" --file "src/widget.js"

# after (project-wide)
impeccable hooks ignore-rule design-system-font-size
Defensive patterns

Strategy: validation

Validate before calling

if (parsed.value === '*' && parsed.files.length === 0) {
  throw new Error('Wildcard value ignores must be scoped with --file <glob>, or use ignore-rule for project-wide');
}

Prevention

When it happens

Trigger: Running `hooks ignore-value <rule> "*"` with no --file scope.

Common situations: Trying to wildcard-suppress a rule via the value path instead of ignore-rule; an agent suppressing a finding by copying the finding's wildcard value.

Related errors


AI-assisted analysis of pbakaus/impeccable@d14711ae3d (2026-08-13). Data as JSON: /api/errors/67d1306911075846. Report an issue: GitHub.