Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 21a4d8d

Browse files
authored
chore: enable promise/prefer-await-to-callbacks ESLint rule (#255)
1 parent ede907a commit 21a4d8d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = {
88
'max-statements': 0,
99
'fp/no-let': 0,
1010
'fp/no-mutation': 0,
11-
'promise/prefer-await-to-callbacks': 0,
1211
},
1312
overrides: [...overrides],
1413
}

src/deploy/hasher_segments.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const map = require('through2-map').obj
77
const { normalizePath } = require('./util')
88

99
// a parallel transform stream segment ctor that hashes fileObj's created by folder-walker
10+
// TODO: use promises instead of callbacks
11+
/* eslint-disable promise/prefer-await-to-callbacks */
1012
const hasherCtor = ({ concurrentHash, hashAlgorithm }) => {
1113
const hashaOpts = { algorithm: hashAlgorithm }
1214
if (!concurrentHash) throw new Error('Missing required opts')
@@ -50,6 +52,7 @@ const manifestCollectorCtor = (filesObj, shaMap, { statusCb, assetType }) => {
5052
cb(null)
5153
})
5254
}
55+
/* eslint-enable promise/prefer-await-to-callbacks */
5356

5457
// transform stream ctor that filters folder-walker results for only files
5558
const fileFilterCtor = objFilterCtor((fileObj) => fileObj.type === 'file')

0 commit comments

Comments
 (0)