# import/no-named-default

> Disallow `import { default as name }` in favor of `import name`

`import { default as React } from "react"` and `import React from "react"` do the same thing. The second is shorter, and it's the form readers expect.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"import/no-named-default" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad */}
```js
import { default as React, useState } from "react";
```

{/* bad */}
```ts
import type { default as User } from "./user";
```

Not reported:

{/* good */}
```js
import React, { useState } from "react";
```

{/* good */}
```ts
import type User from "./user";
```

A name marked with `type` inside the braces isn't reported either:

{/* good */}
```ts
import { type default as User, loadUser } from "./user";
```
