Skip to content

Commit

Permalink
docs: Add ignoreTypeImport docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scagood committed Oct 9, 2024
1 parent 03951b8 commit c5c6ac2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/rules/no-missing-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,26 @@ Please see the shared settings documentation for more information.
This can be configured in the rule options or as a shared setting [`settings.typescriptExtensionMap`](../shared-settings.md#typescriptextensionmap).
Please see the shared settings documentation for more information.

### ignoreTypeImport

If using typescript, you may want to ignore type imports.

```json
{
"rules": {
"n/no-missing-import": ["error", {
"ignoreTypeImport": true
}]
}
}
```

In this way, the following code will not be reported:

```ts
import type { TypeOnly } from "@types/only-types";
```

## 🔎 Implementation

- [Rule source](../../lib/rules/no-missing-import.js)
Expand Down

0 comments on commit c5c6ac2

Please sign in to comment.