# noAstroComponentDefaultExport

Rule `biome/noAstroComponentDefaultExport`. Disallow runtime default exports in Astro component frontmatter.

- Source: biome
- Technologies: Astro
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #488 by reach, #123 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noAstroComponentDefaultExport` | yes | no | group nursery, since 2.6.9 | [docs](https://biomejs.dev/linter/rules/no-astro-component-default-export/) |

## Code examples

### Incorrect: the rule reports this

```astro
---
export default function render() {}
---
```

### Correct: the rule accepts this

```astro
---
export function helper() {}
export default interface Props {}
---
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noAstroComponentDefaultExport": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noAccumulatingSpread](https://lintradar.dev/rules/biome/noAccumulatingSpread.md): Disallow the use of spread (`...`) syntax on accumulators.
- [biome/noAstroConflictingSetDirectives](https://lintradar.dev/rules/biome/noAstroConflictingSetDirectives.md): Disallow conflicting content sources on Astro elements.
- [biome/noAstroSetHtmlDirective](https://lintradar.dev/rules/biome/noAstroSetHtmlDirective.md): Disallow the use of Astro's `set:html` directive.
- [biome/noBiomeFirstException](https://lintradar.dev/rules/biome/noBiomeFirstException.md): Disallow ineffective ordering in `files.includes` patterns.
- [biome/noConstEnum](https://lintradar.dev/rules/biome/noConstEnum.md): Disallow TypeScript `const enum`
- [biome/noConvexDuplicateIndexes](https://lintradar.dev/rules/biome/noConvexDuplicateIndexes.md): Disallow Convex database indexes whose fields are the first fields of another index on the same table.

---

Web page: https://lintradar.dev/rules/biome/noAstroComponentDefaultExport. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
