Skip to content

Commit

Permalink
Align batch warning for UNUSED_EXTERNAL_IMPORT to individual warning
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jul 28, 2021
1 parent e88c5c8 commit edbb2c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cli/run/batchWarnings.ts
Expand Up @@ -237,7 +237,13 @@ const deferredHandlers: {
UNUSED_EXTERNAL_IMPORT(warnings) {
title('Unused external imports');
for (const warning of warnings) {
stderr(`${warning.names} imported from external module '${warning.source}' but never used`);
stderr(
`${warning.names} imported from external module '${warning.source}' but never used${
warning.sources
? ' in ' + printQuotedStringList(warning.sources.map(id => relativeId(id)))
: ''
}`
);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/cli/samples/warn-import-export/_config.js
Expand Up @@ -16,7 +16,7 @@ module.exports = {
assertIncludes(
stderr,
'(!) Unused external imports\n' +
"default imported from external module 'external' but never used\n"
"default imported from external module 'external' but never used"
);
assertIncludes(
stderr,
Expand Down

0 comments on commit edbb2c8

Please sign in to comment.