feat(lint): enforce no-chained-type-assertions (#124119)

This commit is contained in:
Peter Steinberger
2026-08-15 02:13:37 -07:00
committed by GitHub
parent 4a6f99c2fc
commit fe5fa802fa
7 changed files with 206 additions and 3 deletions
@@ -18,6 +18,11 @@ const cases = [
violation: `${FIXTURES}/widen-then-assert-violation.test.ts`,
violations: 3,
},
{
rule: "openclaw-boundaries/no-chained-type-assertions",
violation: `${FIXTURES}/chained-type-assertions-violation.ts`,
violations: 3,
},
];
function runGuard(target: string) {
@@ -254,6 +254,14 @@ describe("run-additional-boundary-checks", () => {
});
});
it("keeps chained-type-assertions lint in CI boundary checks", () => {
expect(BOUNDARY_CHECKS).toContainEqual({
label: "lint:no-chained-type-assertions",
command: "pnpm",
args: ["run", "lint:no-chained-type-assertions"],
});
});
it("keeps the Telegram grammY type import guard in source boundary checks", () => {
expect(BOUNDARY_CHECKS).toContainEqual({
label: "lint:extensions:telegram-grammy-types",