Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ExportMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ ExportMap.parse = function (path, content, context) {
const getter = thunkFor(p, context)
m.imports.set(p, {
getter,
importKind: declaration.importKind,
source: { // capturing actual node reference holds full AST in memory!
value: declaration.source.value,
loc: declaration.source.loc,
Expand Down
3 changes: 2 additions & 1 deletion src/rules/no-cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ module.exports = {
if (traversed.has(m.path)) return
traversed.add(m.path)

for (let [path, { getter, source }] of m.imports) {
for (let [path, { getter, importKind, source }] of m.imports) {
if (importKind === 'type') continue
if (path === myPath) return true
if (traversed.has(path)) continue
if (route.length + 1 < maxDepth) {
Expand Down