{"record":{"id":"acef50b901b283cf","repo":"pbakaus/impeccable","slug":"pass-a-rule-id-and-value-e-g-impeccable-comman","errorCode":null,"errorMessage":"Pass a rule id and value, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value overused-font Inter","messagePattern":"Pass a rule id and value, e\\.g\\. (.+?) hooks ignore-value overused-font Inter","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skill/scripts/hook-admin.mjs","lineNumber":697,"sourceCode":"  }\n\n  const [rule, ...valueParts] = positionals;\n  return {\n    rule: String(rule || '').trim().toLowerCase(),\n    value: normalizeIgnoreValue(valueParts.join(' ')),\n    // Sorted: the dedup key compares the files array, so an unsorted scope made\n    // `--file b.css --file a.css` a different entry from `--file a.css --file b.css`.\n    files: Array.from(new Set(files.filter(Boolean))).sort(),\n    shared,\n    local,\n    reason,\n  };\n}\n\nfunction addIgnoreValue(cwd, args) {\n  const parsed = parseIgnoreValueArgs(args);\n  if (!parsed.rule || !parsed.value) {\n    throw new Error(`Pass a rule id and value, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value overused-font Inter`);\n  }\n\n  if (parsed.shared && parsed.local) {\n    throw new Error('Pass only one scope flag: --shared or --local');\n  }\n\n  // A bare `*` would suppress the rule everywhere, which is ignore-rule's job and\n  // not what a finding in one file justifies. detector.ignoreValues honours a\n  // `files` scope, so require one — matching `impeccable ignores add-value`.\n  if (parsed.value === '*' && parsed.files.length === 0) {\n    // `ignore-rule overused-font` refuses on its own without --all-values, so\n    // naming the bare form here would hand the user a second error.\n    const projectWide = parsed.rule === 'overused-font'\n      ? `${IMPECCABLE_COMMAND} hooks ignore-rule ${parsed.rule} --all-values`\n      : `${IMPECCABLE_COMMAND} hooks ignore-rule ${parsed.rule}`;\n    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}.`);\n  }\n","sourceCodeStart":679,"sourceCodeEnd":715,"githubUrl":"https://github.com/pbakaus/impeccable/blob/f88b2837a7d7c3182e46307bbbb091a1ed547571/skill/scripts/hook-admin.mjs#L679-L715","documentation":"Thrown by addIgnoreValue when either the rule id or the value is missing after parsing `hooks ignore-value` arguments. Positionals are split as [rule, ...valueParts] and the value is the whitespace-joined, normalized remainder, so the command needs at least two positional tokens: a kebab-case rule id and the offending value (font family, color, size). Without both, no meaningful ignore entry can be written.","triggerScenarios":"`hooks ignore-value overused-font` (rule but no value); `hooks ignore-value` bare; `hooks ignore-value Inter` (value given but no rule id, so 'inter' is treated as the rule and the value is empty); all tokens consumed by flags so positionals is empty.","commonSituations":"Users pasting only the rule half of a suggested command; agents relaying a finding but dropping the value; assuming the rule alone is enough because ignore-rule works that way.","solutions":["Pass rule then value: `hooks ignore-value overused-font Inter`.","Copy both halves from the detector finding output (rule id and the exact value it flagged).","If you only want rule-level suppression, use the ignore-rule subcommand instead."],"exampleFix":"# before\nimpeccable hooks ignore-value overused-font\n\n# after\nimpeccable hooks ignore-value overused-font Inter","handlingStrategy":"validation","validationCode":"function parseInvocation(tokens) {\n  const pos = tokens.filter(t => !t.startsWith('--'));\n  if (pos.length < 2) throw new Error('ignore-value needs <rule> and <value> positionals');\n  return { rule: pos[0], value: pos.slice(1).join(' ') };\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy rule id and value together from the detector finding.","Multi-word values (font names with spaces) work as extra positionals but must come after the rule id.","Rule-only suppression belongs to ignore-rule."],"tags":["cli","missing-argument","hook-admin","ignore-value"],"backgroundTag":"missing-required-argument","analyzedSha":"f88b2837a7d7c3182e46307bbbb091a1ed547571","analyzedAt":"2026-08-18T04:58:36.608Z","contentChangedAt":"2026-08-18T04:58:36.608Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}