# no-empty-named-blocks

Rule `import/no-empty-named-blocks`. Forbid empty named import blocks.

- Source: import
- Technologies: Imports
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 2.5M weekly downloads of presets that enable it
- Trend: +97.4% last quarter
- Rank: #1484 by reach, #269 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `import/no-empty-named-blocks` | no | safe | package `eslint-plugin-import` | [docs](https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-empty-named-blocks.md) |
| Oxlint | `import/no-empty-named-blocks` | no | safe | plugin `import`, category suspicious | [docs](https://oxc.rs/docs/guide/usage/linter/rules/import/no-empty-named-blocks.html) |

## Code examples

### Incorrect: the rule reports this

```js
import {} from 'mod'
import Default, {} from 'mod'
```

```js
import type Default, {} from 'mod'
import type {} from 'mod'
```

```js
import typeof {} from 'mod'
import typeof Default, {} from 'mod'
```

### Correct: the rule accepts this

```js
import { mod } from 'mod'
import Default, { mod } from 'mod'
```

```js
import type { mod } from 'mod'
```

```js
import typeof { mod } from 'mod'
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import importPlugin from "eslint-plugin-import";

export default [
  {
    plugins: { import: importPlugin },
    rules: {
      "import/no-empty-named-blocks": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "import"
  ],
  "rules": {
    "import/no-empty-named-blocks": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [import/consistent-type-specifier-style](https://lintradar.dev/rules/import/consistent-type-specifier-style.md): Enforce or ban the use of inline type-only markers for named imports.
- [import/no-unassigned-import](https://lintradar.dev/rules/import/no-unassigned-import.md): Forbid unassigned imports
- [import/exports-last](https://lintradar.dev/rules/import/exports-last.md): Ensure all exports appear after other statements.
- [import/no-commonjs](https://lintradar.dev/rules/import/no-commonjs.md): Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
- [import/no-default-export](https://lintradar.dev/rules/import/no-default-export.md): Forbid default exports.
- [import/no-nodejs-modules](https://lintradar.dev/rules/import/no-nodejs-modules.md): Forbid Node.js builtin modules.

---

Web page: https://lintradar.dev/rules/import/no-empty-named-blocks. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
