pbakaus/impeccable · error

overused-font is value-specific by default. Use

Error message

overused-font is value-specific by default. Use ${IMPECCABLE_COMMAND} hooks ignore-value overused-font <font> for a confirmed font, or ${IMPECCABLE_COMMAND} hooks ignore-rule overused-font --all-values only when the user asked to ignore overused fonts generally.

What it means

A safety interlock on the overused-font rule. Ignoring overused-font as a whole rule would suppress font findings for every font family at once, but the rule is designed to be ignored per confirmed font value. The command therefore refuses the bare form and requires either a value-scoped ignore (the default path) or an explicit --all-values opt-in for project-wide suppression.

Solutions

  1. If one specific font is the problem: `hooks ignore-value overused-font Inter` (the confirmed font family name).
  2. If the user genuinely asked to ignore overused fonts generally: `hooks ignore-rule overused-font --all-values`.
  3. Scope either variant to files with --file if the problem is localized.

Example fix

# before
impeccable hooks ignore-rule overused-font

# after (specific font — preferred)
impeccable hooks ignore-value overused-font Inter

# after (project-wide, only when explicitly intended)
impeccable hooks ignore-rule overused-font --all-values
Defensive patterns

Strategy: validation

Validate before calling

function planOverusedFontIgnore(fontName, opts = {}) {
  if (!fontName) {
    return ['hooks', 'ignore-rule', 'overused-font', ...(opts.allValues ? ['--all-values'] : [])];
  }
  return ['hooks', 'ignore-value', 'overused-font', fontName];
}

Prevention

When it happens

Trigger: `hooks ignore-rule overused-font` with no --all-values; an agent relaying 'ignore that font warning' by suppressing the entire rule instead of the specific family; CI scripts blanket-ignoring rules to get a green build.

Common situations: Teams trying to silence a recurring Inter/Roboto warning by killing the rule; automation copying a generic ignore-rule invocation for every finding type without knowing overused-font is special-cased.

Related errors


AI-assisted analysis of pbakaus/impeccable@f88b2837a7 (2026-08-18). Data as JSON: /api/errors/184db5bb5c93a7e8. Report an issue: GitHub.

Appendix: source

Thrown at skill/scripts/hook-admin.mjs:581

    } else if (arg.startsWith('--')) {
      throw new Error(`Unknown ignore-rule flag: ${arg}`);
    } else {
      positionals.push(arg);
    }
  }

  return {
    rule: normalizeRuleId(positionals[0]),
    allValues,
  };
}

function addIgnoreRule(cwd, args) {
  const parsed = parseIgnoreRuleArgs(args);
  const rule = parsed.rule;
  if (!rule) throw new Error(`Pass a rule id, e.g. ${IMPECCABLE_COMMAND} hooks ignore-rule side-tab`);
  if (rule === 'overused-font' && !parsed.allValues) {
    throw new Error(`overused-font is value-specific by default. Use ${IMPECCABLE_COMMAND} hooks ignore-value overused-font <font> for a confirmed font, or ${IMPECCABLE_COMMAND} hooks ignore-rule overused-font --all-values only when the user asked to ignore overused fonts generally.`);
  }
  const config = mergeDetectorConfig(readRawDetectorConfig(cwd));
  if (!config.ignoreRules.includes(rule)) config.ignoreRules.push(rule);
  writeDetectorConfig(cwd, config);
  return `Added "${rule}" to detector.ignoreRules. Current: ${config.ignoreRules.join(', ')}`;
}

function parseIgnoreFileArgs(args) {
  const positionals = [];
  let shared = false;
  let local = false;

  for (const raw of args) {
    const arg = String(raw || '');
    if (arg === '--shared') {
      shared = true;
    } else if (arg === '--local') {
      local = true;

View on GitHub (pinned to f88b2837a7)