{"record":{"id":"af5e3e8dec6d8fd2","repo":"pbakaus/impeccable","slug":"wildcard-value-ignores-must-be-scoped-with-file-af5e3e","errorCode":null,"errorMessage":"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}.","messagePattern":"Wildcard value ignores must be scoped with --file <glob>, e\\.g\\. (.+?) hooks ignore-value design-system-font-size \"\\*\" --file \"src/widget\\.js\"\\. To suppress the rule project-wide use (.+?)\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skill/scripts/hook-admin.mjs","lineNumber":713,"sourceCode":"  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\n  const local = parsed.local;\n  const config = mergeDetectorConfig(readRawDetectorConfig(cwd, { local }));\n  // Key on the file scope too: the same rule/value legitimately appears more than\n  // once with different scopes, and a rule+value-only key overwrote them.\n  const key = ignoreValueEntryKey({ rule: parsed.rule, value: parsed.value, files: parsed.files });\n  const existing = config.ignoreValues.find((entry) => ignoreValueEntryKey(entry) === key);\n\n  if (existing) {\n    if (parsed.reason) existing.reason = parsed.reason;\n  } else {\n    const entry = {\n      rule: parsed.rule,\n      value: parsed.value,\n    };\n    if (parsed.files.length) entry.files = parsed.files;\n    entry.createdAt = new Date().toISOString();","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/pbakaus/impeccable/blob/d14711ae3d1a1dd62dee61a358d27f107c51ccd0/skill/scripts/hook-admin.mjs#L695-L731","documentation":"Thrown by addIgnoreValue() when the value is exactly `*` (wildcard) but no --file glob was supplied. A bare `*` would suppress the rule for every value everywhere, which is the job of ignore-rule, not ignore-value. detector.ignoreValues honors a `files` scope, so Impeccable requires one and points you to ignore-rule for genuine project-wide suppression (with the --all-values variant for overused-font).","triggerScenarios":"`impeccable hooks ignore-value overused-font \"*\"` or `... design-system-font-size \"*\"` with no `--file`. The error message dynamically suggests the right ignore-rule command, including `--all-values` only for the overused-font rule.","commonSituations":"Wanting to suppress a value across a file set but quoting `*` as the value instead of as a --file glob, or genuinely wanting project-wide suppression and reaching for the wrong subcommand.","solutions":["Scope the wildcard to a file glob: `impeccable hooks ignore-value design-system-font-size \"*\" --file \"src/widget.js\"`.","For project-wide suppression switch subcommands: `impeccable hooks ignore-rule <rule>` (or `--all-values` for overused-font).","Re-read the suggested command in the error text — it is generated for your specific rule."],"exampleFix":"// before\nimpeccable hooks ignore-value design-system-font-size \"*\"\n// after\nimpeccable hooks ignore-value design-system-font-size \"*\" --file \"src/widget.js\"","handlingStrategy":"validation","validationCode":"if (parsed.value === '*' && parsed.files.length === 0) {\n  throw new Error('Wildcard value needs --file <glob>, or use ignore-rule for project-wide');\n}","typeGuard":"function wildcardIsScoped(parsed) {\n  return parsed.value !== '*' || parsed.files.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Reach for ignore-rule (not ignore-value) when suppressing a whole rule.","Always pair a \"*\" value with a --file glob."],"tags":["cli","validation","ignore-config","impeccable-hooks"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}