#Biome Linter not recognizing Astro Import Patternc

3 messages · Page 1 of 1 (latest)

marsh moon
#

bun check causes

import "../styles/global.css";
import Button from "../components/Button.astro";

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>Astro + TailwindCSS</title>
</head>

<body>
    <div class="grid place-items-center h-screen content-center">
        <Button>Tailwind Button in Astro!</Button>
        <a href="/markdown-page" class="p-4 underline">Markdown is also supported...</a>
    </div>
</body>

</html>

to throw a "No Unused Imports" is there a way around this w/o disabling?

tidal raptorBOT
#

Hi @marsh moon. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the knowledge sources do not contain any information about Biome Linter or its interaction with Astro's import patterns, nor do they mention how to resolve "No Unused Imports" errors specifically with Biome or bun check. The documentation does confirm that importing CSS and components at the top of Astro frontmatter is the correct pattern, and that these imports are necessary for styles and components to be included in your page, even if they are not referenced as variables in the script section — this is standard Astro usageAdd site-wide styling.

However, there is no mention of linter configuration or workarounds for this specific linter warning in the provided sources. You may need to consult Biome's documentation or community for a solution that doesn't involve disabling the rule.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: