src/content/docs/linter/rules/no-exported-imports.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> ## Summary - Rule available since: `v1.9.0` - Diagnostic Category: [`lint/style/noExportedImports`](/reference/diagnostics#diagnostic-category) - This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). ## How to configure ```json title="biome.json" { "linter": { "rules": { "style": { "noExportedImports": "error" } } } }## Description
Disallow exporting an imported variable.
In JavaScript, you can re-export a variable either by using `export from` or
by first importing the variable and then exporting it with a regular `export`.
You may prefer to use the first approach, as it clearly communicates the intention
to re-export an import, and can make static analysis easier.
## Examples
### Invalid
```js
import { A } from "mod";
export { A };
import * as ns from "mod";
export { ns };
import D from "mod";
export { D };
export { A } from "mod";
export * as ns from "mod";
export { default as D } from "mod";