{"record":{"id":"184db5bb5c93a7e8","repo":"pbakaus/impeccable","slug":"overused-font-is-value-specific-by-default-use-184db5","errorCode":null,"errorMessage":"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.","messagePattern":"overused-font is value-specific by default\\. Use (.+?) hooks ignore-value overused-font <font> for a confirmed font, or (.+?) hooks ignore-rule overused-font --all-values only when the user asked to ignore overused fonts generally\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skill/scripts/hook-admin.mjs","lineNumber":581,"sourceCode":"    } else if (arg.startsWith('--')) {\n      throw new Error(`Unknown ignore-rule flag: ${arg}`);\n    } else {\n      positionals.push(arg);\n    }\n  }\n\n  return {\n    rule: normalizeRuleId(positionals[0]),\n    allValues,\n  };\n}\n\nfunction addIgnoreRule(cwd, args) {\n  const parsed = parseIgnoreRuleArgs(args);\n  const rule = parsed.rule;\n  if (!rule) throw new Error(`Pass a rule id, e.g. ${IMPECCABLE_COMMAND} hooks ignore-rule side-tab`);\n  if (rule === 'overused-font' && !parsed.allValues) {\n    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.`);\n  }\n  const config = mergeDetectorConfig(readRawDetectorConfig(cwd));\n  if (!config.ignoreRules.includes(rule)) config.ignoreRules.push(rule);\n  writeDetectorConfig(cwd, config);\n  return `Added \"${rule}\" to detector.ignoreRules. Current: ${config.ignoreRules.join(', ')}`;\n}\n\nfunction parseIgnoreFileArgs(args) {\n  const positionals = [];\n  let shared = false;\n  let local = false;\n\n  for (const raw of args) {\n    const arg = String(raw || '');\n    if (arg === '--shared') {\n      shared = true;\n    } else if (arg === '--local') {\n      local = true;","sourceCodeStart":563,"sourceCodeEnd":599,"githubUrl":"https://github.com/pbakaus/impeccable/blob/d14711ae3d1a1dd62dee61a358d27f107c51ccd0/skill/scripts/hook-admin.mjs#L563-L599","documentation":"Thrown by addIgnoreRule as a safety guard when the user tries to ignore the `overused-font` rule without --all-values. overused-font is value-specific by default: the intent is to ignore a *confirmed specific font*, not to disable the whole rule. The error points to the correct command for each intent. This prevents the common footgun of silencing all overused-font findings when only one font was meant to be excepted.","triggerScenarios":"Running `impeccable hooks ignore-rule overused-font` (no --all-values); a user who actually wanted to allow one font but reached for the rule-level command.","commonSituations":"A user seeing repeated overused-font findings for a single font and trying to mute the rule wholesale; copy-pasting a generic ignore-rule invocation.","solutions":["If you want to allow a specific confirmed font: `impeccable hooks ignore-value overused-font <font-name>`.","Only if you explicitly want to disable overused-font detection entirely: `impeccable hooks ignore-rule overused-font --all-values`.","Confirm the font name before ignoring (use the exact family name the detector reported)."],"exampleFix":"# before (too broad — disables the whole rule)\nimpeccable hooks ignore-rule overused-font\n\n# after (allow one specific font)\nimpeccable hooks ignore-value overused-font Inter\n# or, only if you really mean all fonts:\nimpeccable hooks ignore-rule overused-font --all-values","handlingStrategy":"validation","validationCode":"// Route overused-font to the value-specific command unless --all-values is explicit.\nfunction routeOverusedFont({ rule, allValues, value }) {\n  if (rule !== 'overused-font') return null;\n  if (allValues) return ['ignore-rule', rule, '--all-values'];\n  if (value) return ['ignore-value', rule, value];\n  throw new Error('overused-font needs a value (ignore-value) or --all-values (ignore-rule)');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default to ignore-value overused-font <font> for a specific font.","Reserve ignore-rule overused-font --all-values for the rare case of disabling the rule entirely.","Confirm the exact font family name before ignoring."],"tags":["cli","hooks","validation","config","safety","footgun"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}