# default

Rule `import/default`. Ensure a default export is present, given a default import.

- Source: import
- Technologies: Imports
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 110.8M weekly downloads of presets that enable it
- Trend: +48.5% last quarter
- Rank: #143 by reach, #856 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `import/default` | yes | no | package `eslint-plugin-import` | [docs](https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/default.md) |
| Oxlint | `import/default` | no | no | plugin `import`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/import/default.html) |
| Biome | `nursery/noUnresolvedDefaultImport` | yes | no | group nursery, since 2.6.7 | [docs](https://biomejs.dev/linter/rules/no-unresolved-default-import/) |

## Code examples

### Correct: the rule accepts this

```js
import foo from './foo'

// assuming 'node_modules' are ignored (true by default)
import someModule from 'some-module'
```

```js
import bar from './bar' // no default export found in ./bar
import baz from './baz' // no default export found in ./baz
```

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/default": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "import"
  ],
  "rules": {
    "import/default": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noUnresolvedDefaultImport": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [import recommended](https://lintradar.dev/presets/import-recommended.md) | ESLint | `eslint-plugin-import` | 8 | 80.3M | +33.7% |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |

## Related rules

- [import/namespace](https://lintradar.dev/rules/import/namespace.md): Ensure imported namespaces contain dereferenced properties as they are dereferenced.
- [import/export](https://lintradar.dev/rules/import/export.md): Forbid any invalid exports, i.e. re-export of the same name.
- [import/no-duplicates](https://lintradar.dev/rules/import/no-duplicates.md): Forbid repeated import of the same module in multiple places.
- [import/no-named-as-default](https://lintradar.dev/rules/import/no-named-as-default.md): Forbid use of exported name as identifier of default export.
- [import/no-named-as-default-member](https://lintradar.dev/rules/import/no-named-as-default-member.md): Forbid use of exported name as property of default export.
- [import/named](https://lintradar.dev/rules/import/named.md): Ensure named imports correspond to a named export in the remote file.

---

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