pbakaus/impeccable · error · Error
Wildcard value ignores must be scoped with --file
Error message
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}. What it means
Thrown by addIgnoreValue when the value is the bare wildcard `*` and no --file/--files glob scopes it. A `*` value without a file scope would suppress the rule for every value everywhere, which is exactly what ignore-rule does — and ignore-rule already has its own safety interlock (overused-font requires --all-values there). The error routes you to either a scoped wildcard or the proper project-wide command, and for overused-font it pre-computes the --all-values form so you are not handed a second error.
Solutions
- Scope the wildcard: `hooks ignore-value design-system-font-size "*" --file "src/widget.js"`.
- For project-wide suppression use ignore-rule: `hooks ignore-rule <rule>`, or `hooks ignore-rule overused-font --all-values` for the value-specific rule.
- If you only care about one concrete value, pass that value instead of `*`.
Example fix
# before impeccable hooks ignore-value design-system-font-size "*" # after impeccable hooks ignore-value design-system-font-size "*" --file "src/widget.js" impeccable hooks ignore-rule design-system-font-size # if project-wide is truly wanted
Defensive patterns
Strategy: validation
Validate before calling
function planIgnore(rule, value, scope) {
if (value === '*' && !scope) {
if (!rule) throw new Error('rule required');
return ['hooks', 'ignore-rule', rule, ...(rule === 'overused-font' ? ['--all-values'] : [])];
}
return ['hooks', 'ignore-value', rule, value, ...(scope ? ['--file', scope] : [])];
} Prevention
- Treat a bare '*' value as a smell: either scope it with --file or escalate to ignore-rule.
- Remember overused-font additionally needs --all-values on the ignore-rule path.
When it happens
Trigger: `hooks ignore-value design-system-font-size "*"` (no --file); `hooks ignore-value overused-font "*"`; agents translating 'suppress this finding anywhere in the widget' into a wildcard without the file scope the intent implies.
Common situations: Users wanting 'ignore all values of this rule in one area' and not realizing the glob is the scoping mechanism; attempts to bypass the overused-font guard by going through ignore-value with a wildcard.
Related errors
- requires a glob
- requires a glob, got the flag
- requires a non-empty glob
- overused-font is value-specific by default. Use
- Pass a rule id and value, e.g.
AI-assisted analysis of pbakaus/impeccable@f88b2837a7 (2026-08-18).
Data as JSON: /api/errors/af5e3e8dec6d8fd2.
Report an issue: GitHub.
Appendix: source
Thrown at skill/scripts/hook-admin.mjs:713
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}.`);
}
const local = parsed.local;
const config = mergeDetectorConfig(readRawDetectorConfig(cwd, { local }));
// Key on the file scope too: the same rule/value legitimately appears more than
// once with different scopes, and a rule+value-only key overwrote them.
const key = ignoreValueEntryKey({ rule: parsed.rule, value: parsed.value, files: parsed.files });
const existing = config.ignoreValues.find((entry) => ignoreValueEntryKey(entry) === key);
if (existing) {
if (parsed.reason) existing.reason = parsed.reason;
} else {
const entry = {
rule: parsed.rule,
value: parsed.value,
};
if (parsed.files.length) entry.files = parsed.files;
entry.createdAt = new Date().toISOString();View on GitHub (pinned to f88b2837a7)