Skip to content

Commit a15a2f2

Browse files
committed
docs: Add ignoreTypeImport docs
1 parent f25888e commit a15a2f2

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docs/rules/no-missing-import.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,26 @@ Please see the shared settings documentation for more information.
6262
This can be configured in the rule options or as a shared setting [`settings.typescriptExtensionMap`](../shared-settings.md#typescriptextensionmap).
6363
Please see the shared settings documentation for more information.
6464

65+
### ignoreTypeImport
66+
67+
If using typescript, you may want to ignore type imports.
68+
69+
```json
70+
{
71+
"rules": {
72+
"n/no-missing-import": ["error", {
73+
"ignoreTypeImport": true
74+
}]
75+
}
76+
}
77+
```
78+
79+
In this way, the following code will not be reported:
80+
81+
```ts
82+
import type { TypeOnly } from "@types/only-types";
83+
```
84+
6585
## 🔎 Implementation
6686

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

0 commit comments

Comments
 (0)