From e5312771755607388c4b0e02e1de923e5713e219 Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Fri, 6 Oct 2023 06:48:41 +0900 Subject: [PATCH] fixup! fix lint issues --- lib/internal/fs/promises.js | 78 ++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 0e93f7b8265afa..89c841f7647a11 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -493,7 +493,7 @@ async function readFileHandle(filehandle, options) { const statFields = await PromisePrototypeThen( binding.fstat(filehandle.fd, false, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); checkAborted(signal); @@ -528,7 +528,7 @@ async function readFileHandle(filehandle, options) { const bytesRead = (await PromisePrototypeThen( binding.read(filehandle.fd, buffer, offset, length, -1, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) ?? 0; totalRead += bytesRead; @@ -580,7 +580,7 @@ async function access(path, mode = F_OK) { return await PromisePrototypeThen( binding.access(pathModule.toNamespacedPath(path), mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -601,7 +601,7 @@ async function copyFile(src, dest, mode) { mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -613,9 +613,9 @@ async function open(path, flags, mode) { mode = parseFileMode(mode, 'mode', 0o666); return new FileHandle(await PromisePrototypeThen( binding.openFileHandle(pathModule.toNamespacedPath(path), - flagsNumber, mode, kUsePromises), + flagsNumber, mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )); } @@ -669,7 +669,7 @@ async function read(handle, bufferOrParams, offset, length, position) { const bytesRead = (await PromisePrototypeThen( binding.read(handle.fd, buffer, offset, length, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesRead, buffer }; @@ -684,7 +684,7 @@ async function readv(handle, buffers, position) { const bytesRead = (await PromisePrototypeThen( binding.readBuffers(handle.fd, buffers, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesRead, buffers }; } @@ -718,7 +718,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { binding.writeBuffer(handle.fd, buffer, offset, length, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesWritten, buffer }; } @@ -728,7 +728,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { const bytesWritten = (await PromisePrototypeThen( binding.writeString(handle.fd, buffer, offset, length, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesWritten, buffer }; } @@ -746,7 +746,7 @@ async function writev(handle, buffers, position) { const bytesWritten = (await PromisePrototypeThen( binding.writeBuffers(handle.fd, buffers, position, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, )) || 0; return { __proto__: null, bytesWritten, buffers }; } @@ -759,7 +759,7 @@ async function rename(oldPath, newPath) { pathModule.toNamespacedPath(newPath), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -774,7 +774,7 @@ async function ftruncate(handle, len = 0) { return await PromisePrototypeThen( binding.ftruncate(handle.fd, len, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -799,7 +799,7 @@ async function rmdir(path, options) { return await PromisePrototypeThen( binding.rmdir(path, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -807,7 +807,7 @@ async function fdatasync(handle) { return await PromisePrototypeThen( binding.fdatasync(handle.fd, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -815,7 +815,7 @@ async function fsync(handle) { return await PromisePrototypeThen( binding.fsync(handle.fd, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -835,7 +835,7 @@ async function mkdir(path, options) { parseFileMode(mode, 'mode', 0o777), recursive, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -852,7 +852,7 @@ async function readdirRecursive(originalPath, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ), ], ]; @@ -876,7 +876,7 @@ async function readdirRecursive(originalPath, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ), ]); } @@ -903,7 +903,7 @@ async function readdirRecursive(originalPath, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ), ]); } @@ -928,7 +928,7 @@ async function readdir(path, options) { kUsePromises, ), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return options.withFileTypes ? getDirectoryEntriesPromise(path, result) : @@ -942,7 +942,7 @@ async function readlink(path, options) { binding.readlink(pathModule.toNamespacedPath(path), options.encoding, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -965,7 +965,7 @@ async function symlink(target, path, type_) { stringToSymlinkType(type), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -973,7 +973,7 @@ async function fstat(handle, options = { bigint: false }) { const result = await PromisePrototypeThen( binding.fstat(handle.fd, options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatsFromBinding(result); } @@ -984,7 +984,7 @@ async function lstat(path, options = { bigint: false }) { binding.lstat(pathModule.toNamespacedPath(path), options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatsFromBinding(result); } @@ -995,7 +995,7 @@ async function stat(path, options = { bigint: false }) { binding.stat(pathModule.toNamespacedPath(path), options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatsFromBinding(result); } @@ -1006,7 +1006,7 @@ async function statfs(path, options = { bigint: false }) { binding.statfs(pathModule.toNamespacedPath(path), options.bigint, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); return getStatFsFromBinding(result); } @@ -1019,7 +1019,7 @@ async function link(existingPath, newPath) { pathModule.toNamespacedPath(newPath), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1028,7 +1028,7 @@ async function unlink(path) { return await PromisePrototypeThen( binding.unlink(pathModule.toNamespacedPath(path), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1037,7 +1037,7 @@ async function fchmod(handle, mode) { return await PromisePrototypeThen( binding.fchmod(handle.fd, mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1047,7 +1047,7 @@ async function chmod(path, mode) { return await PromisePrototypeThen( binding.chmod(pathModule.toNamespacedPath(path), mode, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1066,7 +1066,7 @@ async function lchown(path, uid, gid) { return await PromisePrototypeThen( binding.lchown(pathModule.toNamespacedPath(path), uid, gid, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1076,7 +1076,7 @@ async function fchown(handle, uid, gid) { return await PromisePrototypeThen( binding.fchown(handle.fd, uid, gid, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1087,7 +1087,7 @@ async function chown(path, uid, gid) { return await PromisePrototypeThen( binding.chown(pathModule.toNamespacedPath(path), uid, gid, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1099,7 +1099,7 @@ async function utimes(path, atime, mtime) { toUnixTimestamp(mtime), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1109,7 +1109,7 @@ async function futimes(handle, atime, mtime) { return await PromisePrototypeThen( binding.futimes(handle.fd, atime, mtime, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1121,7 +1121,7 @@ async function lutimes(path, atime, mtime) { toUnixTimestamp(mtime), kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1131,7 +1131,7 @@ async function realpath(path, options) { return await PromisePrototypeThen( binding.realpath(path, options.encoding, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); } @@ -1151,7 +1151,7 @@ async function mkdtemp(prefix, options) { return await PromisePrototypeThen( binding.mkdtemp(path, options.encoding, kUsePromises), undefined, - handleErrorFromBinding + handleErrorFromBinding, ); }