mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Make no-extra-parens rule stricter
This commit is contained in:
@@ -12,5 +12,5 @@ export interface ResourceIdentifier {
|
||||
* Determines whether the object is a {@link ResourceIdentifier}.
|
||||
*/
|
||||
export function isResourceIdentifier(object: unknown): object is ResourceIdentifier {
|
||||
return Boolean(object) && (typeof (object as ResourceIdentifier).path === 'string');
|
||||
return Boolean(object) && typeof (object as ResourceIdentifier).path === 'string';
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ export class StaticAssetHandler extends HttpHandler {
|
||||
{
|
||||
// eslint-disable-next-line ts/naming-convention
|
||||
'cache-control': `max-age=${this.expires}`,
|
||||
expires: new Date(Date.now() + (this.expires * 1000)).toUTCString(),
|
||||
expires: new Date(Date.now() + this.expires * 1000).toUTCString(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,12 @@ async function findNextSorted<T>(
|
||||
export async function* sortedAsyncMerge<T>(iterators: AsyncIterator<T>[], comparator?: (left: T, right: T) => number):
|
||||
AsyncIterable<T> {
|
||||
if (!comparator) {
|
||||
comparator = (left, right): number => left < right ? -1 : (left > right ? 1 : 0);
|
||||
comparator = (left, right): number => {
|
||||
if (left < right) {
|
||||
return -1;
|
||||
}
|
||||
return left > right ? 1 : 0;
|
||||
};
|
||||
}
|
||||
|
||||
// Initialize the array to the first result of every iterator
|
||||
|
||||
Reference in New Issue
Block a user