Skip to content

Commit 17270f8

Browse files
authored
fix: Allow imports of self-referenced package (#74)
You can import a package itself by self-referencing it with the package name, instead of needing to use relative paths.
1 parent 83446a1 commit 17270f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/check-extraneous.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ exports.checkExtraneous = function checkExtraneous(context, filePath, targets) {
2525

2626
const allowed = new Set(getAllowModules(context))
2727
const dependencies = new Set(
28-
[].concat(
28+
[packageInfo.name].concat(
2929
Object.keys(packageInfo.dependencies || {}),
3030
Object.keys(packageInfo.devDependencies || {}),
3131
Object.keys(packageInfo.peerDependencies || {}),

0 commit comments

Comments
 (0)