Skip to main content

no-legacy-formats

Disallow legacy font formats (eot, svg, and truetype).

Rule catalog ID: R008

Targeted pattern scopeโ€‹

  • format(...) hints and URL extensions inside @font-face src.

What this rule reportsโ€‹

  • Sources using legacy formats in modern-targeted stylesheets.

Why this rule existsโ€‹

Legacy formats add payload and maintenance complexity without useful modern coverage.

โŒ Incorrectโ€‹

@font-face {
src: url("./inter.ttf") format("truetype"), url("./inter.woff2") format("woff2");
}

โœ… Correctโ€‹

@font-face {
src: url("./inter.woff2") format("woff2"), url("./inter.woff") format("woff");
}

Further readingโ€‹