Skip to content

Commit

Permalink
fixup! fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Oct 5, 2023
1 parent b8b3a5c commit e531277
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions lib/internal/fs/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ async function readFileHandle(filehandle, options) {
const statFields = await PromisePrototypeThen(
binding.fstat(filehandle.fd, false, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);

checkAborted(signal);
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -580,7 +580,7 @@ async function access(path, mode = F_OK) {
return await PromisePrototypeThen(
binding.access(pathModule.toNamespacedPath(path), mode, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -601,7 +601,7 @@ async function copyFile(src, dest, mode) {
mode,
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -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,
));
}

Expand Down Expand Up @@ -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 };
Expand All @@ -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 };
}
Expand Down Expand Up @@ -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 };
}
Expand All @@ -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 };
}
Expand All @@ -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 };
}
Expand All @@ -759,7 +759,7 @@ async function rename(oldPath, newPath) {
pathModule.toNamespacedPath(newPath),
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -774,7 +774,7 @@ async function ftruncate(handle, len = 0) {
return await PromisePrototypeThen(
binding.ftruncate(handle.fd, len, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -799,23 +799,23 @@ async function rmdir(path, options) {
return await PromisePrototypeThen(
binding.rmdir(path, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

async function fdatasync(handle) {
return await PromisePrototypeThen(
binding.fdatasync(handle.fd, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

async function fsync(handle) {
return await PromisePrototypeThen(

Check failure on line 815 in lib/internal/fs/promises.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Redundant use of `await` on a return value
binding.fsync(handle.fd, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -835,7 +835,7 @@ async function mkdir(path, options) {
parseFileMode(mode, 'mode', 0o777), recursive,
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -852,7 +852,7 @@ async function readdirRecursive(originalPath, options) {
kUsePromises,
),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
),
],
];
Expand All @@ -876,7 +876,7 @@ async function readdirRecursive(originalPath, options) {
kUsePromises,
),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
),
]);
}
Expand All @@ -903,7 +903,7 @@ async function readdirRecursive(originalPath, options) {
kUsePromises,
),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
),
]);
}
Expand All @@ -928,7 +928,7 @@ async function readdir(path, options) {
kUsePromises,
),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
return options.withFileTypes ?
getDirectoryEntriesPromise(path, result) :
Expand All @@ -942,7 +942,7 @@ async function readlink(path, options) {
binding.readlink(pathModule.toNamespacedPath(path),
options.encoding, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -965,15 +965,15 @@ async function symlink(target, path, type_) {
stringToSymlinkType(type),
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

async function fstat(handle, options = { bigint: false }) {
const result = await PromisePrototypeThen(
binding.fstat(handle.fd, options.bigint, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
return getStatsFromBinding(result);

Check failure on line 978 in lib/internal/fs/promises.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Redundant use of `await` on a return value
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -1019,7 +1019,7 @@ async function link(existingPath, newPath) {
pathModule.toNamespacedPath(newPath),
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1028,7 +1028,7 @@ async function unlink(path) {
return await PromisePrototypeThen(
binding.unlink(pathModule.toNamespacedPath(path), kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1037,7 +1037,7 @@ async function fchmod(handle, mode) {
return await PromisePrototypeThen(
binding.fchmod(handle.fd, mode, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1047,7 +1047,7 @@ async function chmod(path, mode) {
return await PromisePrototypeThen(
binding.chmod(pathModule.toNamespacedPath(path), mode, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1066,7 +1066,7 @@ async function lchown(path, uid, gid) {
return await PromisePrototypeThen(
binding.lchown(pathModule.toNamespacedPath(path), uid, gid, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1076,7 +1076,7 @@ async function fchown(handle, uid, gid) {
return await PromisePrototypeThen(
binding.fchown(handle.fd, uid, gid, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1087,7 +1087,7 @@ async function chown(path, uid, gid) {
return await PromisePrototypeThen(
binding.chown(pathModule.toNamespacedPath(path), uid, gid, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1099,7 +1099,7 @@ async function utimes(path, atime, mtime) {
toUnixTimestamp(mtime),
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1109,7 +1109,7 @@ async function futimes(handle, atime, mtime) {
return await PromisePrototypeThen(
binding.futimes(handle.fd, atime, mtime, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1121,7 +1121,7 @@ async function lutimes(path, atime, mtime) {
toUnixTimestamp(mtime),
kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1131,7 +1131,7 @@ async function realpath(path, options) {
return await PromisePrototypeThen(
binding.realpath(path, options.encoding, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand All @@ -1151,7 +1151,7 @@ async function mkdtemp(prefix, options) {
return await PromisePrototypeThen(
binding.mkdtemp(path, options.encoding, kUsePromises),
undefined,
handleErrorFromBinding
handleErrorFromBinding,
);
}

Expand Down

0 comments on commit e531277

Please sign in to comment.