pbakaus/impeccable · error · Error
Pass a rule id and value, e.g.
Error message
Pass a rule id and value, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value overused-font Inter What it means
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.
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.
Example fix
# before impeccable hooks ignore-value overused-font # after impeccable hooks ignore-value overused-font Inter
Defensive patterns
Strategy: validation
Validate before calling
function parseInvocation(tokens) {
const pos = tokens.filter(t => !t.startsWith('--'));
if (pos.length < 2) throw new Error('ignore-value needs <rule> and <value> positionals');
return { rule: pos[0], value: pos.slice(1).join(' ') };
} Prevention
- 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.
When it happens
Trigger: `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.
Common situations: 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.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- requires a glob
- requires a glob, got the flag
- requires a non-empty glob
- Pass a glob, e.g. hooks ignore-file "src/legacy/**
- Pass a rule id, e.g.
AI-assisted analysis of pbakaus/impeccable@f88b2837a7 (2026-08-18).
Data as JSON: /api/errors/acef50b901b283cf.
Report an issue: GitHub.
Appendix: source
Thrown at skill/scripts/hook-admin.mjs:697
}
const [rule, ...valueParts] = positionals;
return {
rule: String(rule || '').trim().toLowerCase(),
value: normalizeIgnoreValue(valueParts.join(' ')),
// Sorted: the dedup key compares the files array, so an unsorted scope made
// `--file b.css --file a.css` a different entry from `--file a.css --file b.css`.
files: Array.from(new Set(files.filter(Boolean))).sort(),
shared,
local,
reason,
};
}
function addIgnoreValue(cwd, args) {
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}.`);
}
View on GitHub (pinned to f88b2837a7)