Skip to content

Commit

Permalink
refactor: re-activate unicorn/no-useless-promise-resolve-reject
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Sep 20, 2023
1 parent dfc863a commit 3b88aa0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ module.exports = {
'unicorn/no-null': 'off',
'unicorn/no-static-only-class': 'off',
'unicorn/no-unreadable-array-destructuring': 'off',
'unicorn/no-useless-promise-resolve-reject': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-spread': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/lambda/LambdaFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default class LambdaFunction {
entries(zip.files).map(async ([filename, jsZipObj]) => {
const fileData = await jsZipObj.async('nodebuffer')
if (filename.endsWith('/')) {
return Promise.resolve()
return undefined
}
await ensureDir(join(this.#codeDir, dirname(filename)))
return writeFile(join(this.#codeDir, filename), fileData, {
Expand Down
2 changes: 1 addition & 1 deletion src/lambda/handler-runner/docker-runner/DockerContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export default class DockerContainer {
entries(zip.files).map(async ([filename, jsZipObj]) => {
const fileData = await jsZipObj.async('nodebuffer')
if (filename.endsWith(sep)) {
return Promise.resolve()
return undefined
}
await ensureDir(join(layerDir, dirname(filename)))
return writeFile(join(layerDir, filename), fileData, {
Expand Down

0 comments on commit 3b88aa0

Please sign in to comment.