pbakaus/impeccable · error · Error
Unknown ignore-value flag: ${arg}
Error message
Unknown ignore-value flag: ${arg} What it means
Thrown by parseIgnoreValueArgs() when it encounters an argument starting with `--` that is not one of the recognized ignore-value flags (--shared, --local, --reason, --reason=, --file, --files, --file=, --files=). Impeccable rejects unknown flags rather than folding them into the rule/value text, which previously stored a value like "inter --shard" that matched no finding and reported success.
Source
Thrown at skill/scripts/hook-admin.mjs:675
const chunks = [];
while (i + 1 < args.length && !String(args[i + 1]).startsWith('--')) {
chunks.push(args[++i]);
}
reason = chunks.join(' ').trim();
} else if (arg.startsWith('--reason=')) {
reason = arg.slice('--reason='.length).trim();
} else if (arg === '--file' || arg === '--files') {
if (i + 1 >= args.length) throw new Error(`${arg} requires a glob`);
files.push(requireGlob(args[++i], arg));
} else if (arg.startsWith('--file=')) {
files.push(requireGlob(arg.slice('--file='.length), '--file'));
} else if (arg.startsWith('--files=')) {
files.push(requireGlob(arg.slice('--files='.length), '--files'));
} else if (arg.startsWith('--')) {
// Otherwise a typo folds into the value: `ignore-value overused-font Inter
// --shard` stored the value "inter --shard", which matches no finding, and
// reported success. Matches `impeccable ignores add-value`.
throw new Error(`Unknown ignore-value flag: ${arg}`);
} else {
positionals.push(arg);
}
}
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,
};
}
View on GitHub (pinned to d14711ae3d)
Solutions
- Remove the unknown flag or correct the typo (check against: --shared, --local, --reason, --file/--files).
- If you intended project-wide suppression, use `impeccable hooks ignore-rule <rule>` instead, which accepts different flags.
- Run `impeccable hooks ignore-value --help` (or read hook-admin.mjs parseIgnoreValueArgs) to confirm the supported flag set.
Example fix
// before impeccable hooks ignore-value overused-font Inter --shard // after impeccable hooks ignore-value overused-font Inter --file "src/widget.css"
Defensive patterns
Strategy: validation
Validate before calling
const KNOWN = new Set(['--shared', '--local', '--reason', '--file', '--files']);
for (const a of args) {
if (a.startsWith('--') && !a.startsWith('--reason=') && !a.startsWith('--file=') && !a.startsWith('--files=') && !KNOWN.has(a.split('=')[0])) {
throw new Error('Unknown ignore-value flag: ' + a);
}
} Type guard
function isKnownIgnoreValueFlag(a) {
const head = a.split('=')[0];
return ['--shared', '--local', '--reason', '--file', '--files'].includes(head);
} Prevention
- Keep the supported-flag list beside your command builder.
- Run the CLI with --help to re-confirm flags after upgrades.
When it happens
Trigger: Typing `--shard`, `--glob`, `--global`, `--scope`, or any unsupported long flag on an `impeccable hooks ignore-value` invocation; mistyping a supported flag (e.g. `--fil` instead of `--file`).
Common situations: Confusing ignore-value flags with ignore-rule flags or with the top-level `impeccable ignores add-value` surface; tab-completion inserting a wrong flag; stale docs.
Related errors
- ${flag} requires a non-empty glob
- ${flag} requires a glob, got the flag ${glob}
- ${arg} requires a glob
- Pass a rule id and value, e.g. ${IMPECCABLE_COMMAND} hooks i
- Wildcard value ignores must be scoped with --file <glob>, e.
AI-assisted analysis of pbakaus/impeccable@d14711ae3d (2026-08-13).
Data as JSON: /api/errors/541faa7e4db5509a.
Report an issue: GitHub.