Skip to content
TypeScript

fix(scripts): check:changed passes when only lint-ignored code changed (#29596)

Alex Southwellf639c155ad7d
diff --git a/scripts/check-changed.test.ts b/scripts/check-changed.test.ts
index eaba712f4c5..16a624b16f7 100644
--- a/scripts/check-changed.test.ts
+++ b/scripts/check-changed.test.ts
@@ -397,7 +397,7 @@ it("checks changed source paths through the Windows launcher", () => {
expect(result.status, result.stdout + result.stderr).toBe(0);
const calls = project.calls();
expect(calls.find(({ args }) => args[0] === "lint")).toEqual({
- args: ["lint", project.source],
+ args: ["lint", "--no-error-on-unmatched-pattern", project.source],
cwd: project.root,
});
expect(calls.some(({ args }) => args[0] === "fmt" && args.includes(project.source))).toBe(true);
diff --git a/scripts/check-changed.ts b/scripts/check-changed.ts
index 0bf96fb98ca..e06f04024d3 100644
--- a/scripts/check-changed.ts
+++ b/scripts/check-changed.ts
@@ -469,7 +469,9 @@ const checkChanged = Effect.fn("checkChanged")(function* (input: {
...(present.length > 0
? [command("format", ["fmt", "--check", "--no-error-on-unmatched-pattern", ...present])]
: []),
- ...(code.length > 0 ? [command("lint", ["lint", ...code])] : []),
+ ...(code.length > 0
+ ? [command("lint", ["lint", "--no-error-on-unmatched-pattern", ...code])]
+ : []),
...(runKnip
? knipPasses.map((args, index) => command(`knip ${index + 1}/${knipPasses.length}`, args))
: []),