# import/no-empty-named-blocks

> Disallow `import {} from` with nothing between the braces

Empty braces in an import are usually left over after someone deleted the last name. The import still loads and runs the module, but it doesn't say whether that's on purpose.

`--fix` removes the braces if the import also has a default import. An import that has nothing but `{}` isn't fixed, because deleting it would stop the module from being loaded. It comes with two suggestions instead: delete the import, or keep it as `import "./setup"`.

{/* 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-empty-named-blocks" = "error" # or "warn"
```

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

## Examples

Reported:

{/* bad */}
```js
import {} from "./setup";
```

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

{/* bad */}
```ts
import type {} from "./types";
```

Not reported:

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