Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions packages/i18n/test/display-only.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,7 @@ describe("errorMessage() stays display-only", () => {
offenders.push(`${dir}/${file}:${line} ${name}`);
}
}
}
// Alias tracking: `const x = errorMessage(...)` later string-matched.
const glob2 = new Bun.Glob("**/*.{ts,tsx}");
for await (const file of glob2.scan({ cwd: join(REPO_ROOT, dir) })) {
if (file.includes(".test.") || file.includes(".stories.")) continue;
const source = await Bun.file(join(REPO_ROOT, dir, file)).text();
if (!source.includes("errorMessage(")) continue;
// Also catch string matching on a variable assigned from errorMessage().
const aliases = [
...source.matchAll(
/(?:const|let)\s+(\w+)\s*=\s*\n?\s*errorMessage\(/g,
Expand Down
Loading