You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/no-extraneous-dependencies.md
+7-3
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# import/no-extraneous-dependencies: Forbid the use of extraneous packages
2
2
3
3
Forbid the import of external modules that are not declared in the `package.json`'s `dependencies`, `devDependencies`, `optionalDependencies`, `peerDependencies`, or `bundledDependencies`.
4
-
The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behavior can be changed with the rule option `packageDir`. Normally ignores imports of modules marked internal, but this can be changed with the rule option `includeInternal`.
4
+
The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behavior can be changed with the rule option `packageDir`. Normally ignores imports of modules marked internal, but this can be changed with the rule option `includeInternal`. Type imports can be verified by specifying `includeTypes`.
5
5
6
6
Modules have to be installed for this rule to work.
7
7
@@ -31,10 +31,10 @@ You can also use an array of globs instead of literal booleans:
31
31
32
32
When using an array of globs, the setting will be set to `true` (no errors reported) if the name of the file being linted matches a single glob in the array, and `false` otherwise.
33
33
34
-
There is a boolean option called `includeInternal`, which enables the checking of internal modules, which are otherwise ignored by this rule.
34
+
There are 2 boolean options to opt into checking extra imports that are normally ignored: `includeInternal`, which enables the checking of internal modules, and `includeTypes`, which enables checking of type imports in TypeScript.
0 commit comments