Skip to content

Commit 033ba64

Browse files
committedAug 24, 2021
[Fix] named, namespace: properly handle ExportAllDeclarations
Fixes #2199
1 parent 51d3973 commit 033ba64

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
66

77
## [Unreleased]
88

9+
### Fixes
10+
- [`named`], [`namespace`]: properly handle ExportAllDeclarations ([#2199], thanks [@ljharb])
11+
912
## [2.24.1] - 2021-08-19
1013

1114
### Fixed
@@ -1152,6 +1155,7 @@ for info on changes for earlier releases.
11521155
[#164]: https://github.com/import-js/eslint-plugin-import/pull/164
11531156
[#157]: https://github.com/import-js/eslint-plugin-import/pull/157
11541157
[#2201]: https://github.com/import-js/eslint-plugin-import/issues/2201
1158+
[#2199]: https://github.com/import-js/eslint-plugin-import/issues/2199
11551159
[#2161]: https://github.com/import-js/eslint-plugin-import/issues/2161
11561160
[#2118]: https://github.com/import-js/eslint-plugin-import/issues/2118
11571161
[#2067]: https://github.com/import-js/eslint-plugin-import/issues/2067

‎src/ExportMap.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ ExportMap.parse = function (path, content, context) {
421421

422422
switch (s.type) {
423423
case 'ExportDefaultSpecifier':
424-
if (!n.source) return;
424+
if (!nsource) return;
425425
local = 'default';
426426
break;
427427
case 'ExportNamespaceSpecifier':
@@ -430,8 +430,8 @@ ExportMap.parse = function (path, content, context) {
430430
}));
431431
return;
432432
case 'ExportAllDeclaration':
433-
local = s.exported ? s.exported.name : s.local.name;
434-
break;
433+
m.namespace.set(s.exported.name, addNamespace(exportMeta, s.source.value));
434+
return;
435435
case 'ExportSpecifier':
436436
if (!n.source) {
437437
m.namespace.set(s.exported.name, addNamespace(exportMeta, s.local));

0 commit comments

Comments
 (0)