Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Aug 25, 2022
1 parent f3f6679 commit 18d2171
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ class PackWalker extends IgnoreWalker {
return super.emit(ev, data)
}

// we intentionally delay the done event while keeping the function sync here
// eslint-disable-next-line promise/catch-or-return, promise/always-return
this.gatherBundles().then(() => {
super.emit('done', this.result)
})
Expand Down Expand Up @@ -204,6 +206,8 @@ class PackWalker extends IgnoreWalker {
start () {
if (this.isPackage && !this.tree) {
const arborist = new Arborist({ path: this.path })
// loading the tree is async while the start function depends on being sync
// eslint-disable-next-line promise/catch-or-return, promise/always-return
arborist.loadActual().then((tree) => {
this.tree = tree
super.start()
Expand Down

0 comments on commit 18d2171

Please sign in to comment.