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-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# 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` or `peerDependencies`.
4
-
The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything.
4
+
The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behaviour can be changed with the rule option `packageDir`.
5
5
6
6
### Options
7
7
@@ -27,6 +27,12 @@ You can also use an array of globs instead of literal booleans:
27
27
28
28
When using an array of globs, the setting will be activated if the name of the file being linted matches a single glob in the array.
29
29
30
+
Also there is one more option called `packageDir`, this option is to specify the path to the folder containing package.json and is relative to the current working directory.
0 commit comments