src/content/docs/linter/rules/no-redundant-default-export.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.14` - Diagnostic Category: [`lint/nursery/noRedundantDefaultExport`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. - The default severity of this rule is [**warning**](/reference/diagnostics#warning). ## How to configure ```json title="biome.json" { "linter": { "rules": { "nursery": { "noRedundantDefaultExport": "error" } } } }## Description
Checks if a default export exports the same symbol as a named export.
This rule reports when a `default` export references the same identifier as a named export.
Re-exports are out of scope.
## Examples
### Invalid
```js
export const foo = 42;
export default foo;
export const foo = 42;
export default 42;