From b8a44e49c92ea03b3a3769725e1f9ab951e581c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Thu, 16 Jul 2026 10:43:17 -0400 Subject: [PATCH] fix(lint): ignore !important in font families (#2538) --- packages/lint/src/rules/fonts.test.ts | 8 ++++++++ packages/lint/src/rules/fonts.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/packages/lint/src/rules/fonts.test.ts b/packages/lint/src/rules/fonts.test.ts index fc5c3ddb2..eb90f7ba8 100644 --- a/packages/lint/src/rules/fonts.test.ts +++ b/packages/lint/src/rules/fonts.test.ts @@ -178,6 +178,14 @@ describe("font rules", () => { expect(findings).toHaveLength(0); }); + it("does not treat !important as part of a generic font family", async () => { + const html = `
+ +
`; + const findings = await findByCode(html, "font_family_without_font_face"); + expect(findings).toHaveLength(0); + }); + it("reports multiple missing families in one finding", async () => { const html = `