diff --git a/internal/check-universal-props.mjs b/internal/check-universal-props.mjs index 681dfb720..9a19779f1 100644 --- a/internal/check-universal-props.mjs +++ b/internal/check-universal-props.mjs @@ -106,6 +106,15 @@ const RULES = [ && /(?:toLocaleString|NumberFormat|DateTimeFormat)\s*\(\s*`[^`]*\$\{/.test(before) if (!isFallback) out.push(m.index) } + // ★ THE NAMED CONSTANT COUNTS TOO, or folding the literal into one module LOOKS like fixing it. + // library/utils/formatCount.js now holds the fleet's en-US decision and calls + // toLocaleString(COUNT_LOCALE) — no literal — so the pattern above went quiet and 8 of the + // tree's 13 warns vanished with the BEHAVIOUR unchanged. That is the same false-green as a + // precondition that skips the file under test: the audit stopped seeing a decision still in + // force. One site, attributed to every bundle that imports it, is what "held in one place" + // should read as in the matrix — not zero. + const constRe = /COUNT_LOCALE\s*=\s*['"]en(?:-US)?['"]/g + while ((m = constRe.exec(src))) out.push(m.index) return out } }, // A whole-file rule: the fetch and the helper need not be on the same line, only in the same file.