# prefer-import-tag

Rule `jsdoc/prefer-import-tag`. Prefer `@import` tags to inline `import()` statements.

- Source: jsdoc
- Technologies: JSDoc
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2101 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jsdoc/prefer-import-tag` | no | safe | package `eslint-plugin-jsdoc` | [docs](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/prefer-import-tag.md#repos-sticky-header) |

## Code examples

### Incorrect: the rule reports this

```ts
/**
 * @type {import('eslint').Rule.Node}
 */
```

### Correct: the rule accepts this

```ts
/** @typedef {import('eslint').Rule.Node} RuleNode  */
/**
 * @type {RuleNode}
 */
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { jsdoc },
    rules: {
      "jsdoc/prefer-import-tag": "error",
    },
  },
];
```

## Related rules

- [jsdoc/normalize-see-links](https://lintradar.dev/rules/jsdoc/normalize-see-links.md): Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
- [jsdoc/require-description-complete-sentence](https://lintradar.dev/rules/jsdoc/require-description-complete-sentence.md): Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.
- [jsdoc/no-unnecessary-type-assertion](https://lintradar.dev/rules/jsdoc/no-unnecessary-type-assertion.md): Reports redundant @type tags that match or broaden the naturally inferred TypeScript type.
- [jsdoc/require-example](https://lintradar.dev/rules/jsdoc/require-example.md): Requires that all functions (and potentially other contexts) have examples.
- [jsdoc/no-restricted-syntax](https://lintradar.dev/rules/jsdoc/no-restricted-syntax.md): Reports when certain comment structures are present.
- [jsdoc/require-file-overview](https://lintradar.dev/rules/jsdoc/require-file-overview.md): Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file.

---

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