Update linting

This commit is contained in:
Zaid Humaimidi committed 2023-12-16 19:08:13 -08:00
1 parent 4f2dfb4f48
commit 0c9c027a77
112 files changed
+3781 -4125

No files matched your search

+14 -14
View File
@@ -77,13 +77,13 @@ function upload(
file: File,
headers: Record<string, string>,
abortSignal?: AbortSignal,
progressListener?: (e: ProgressEvent) => void
progressListener?: (e: ProgressEvent) => void,
): Promise<void> {
headers = Object.assign(
{
"Content-Type": "application/octet-stream",
},
headers
headers,
);
return store.xhrRequest({
method: "PUT",
@@ -112,11 +112,11 @@ const getDownloadUrl = memoize((filter) => {
});
export function init(
args: Record<string, unknown>
args: Record<string, unknown>,
): Promise<Record<string, unknown>> {
if (!window.authorizer.hasAccess("files", 2)) {
return Promise.reject(
new Error("You are not authorized to view this page")
new Error("You are not authorized to view this page"),
);
}
@@ -236,7 +236,7 @@ export const component: ClosureComponent = (): Component => {
file,
headers,
abortController.signal,
progressListener
progressListener,
);
store.setTimestamp(Date.now());
notifications.push("success", "File created");
@@ -247,8 +247,8 @@ export const component: ClosureComponent = (): Component => {
progress = -1;
},
},
formData
)
formData,
),
);
cb = () => {
if (progress < 0) return [null, comp];
@@ -257,7 +257,7 @@ export const component: ClosureComponent = (): Component => {
"div.progress",
m("div.progress-bar", {
style: `width: ${Math.trunc(progress * 100)}%`,
})
}),
),
comp,
];
@@ -273,7 +273,7 @@ export const component: ClosureComponent = (): Component => {
});
},
},
"New"
"New",
),
m(
"button.primary",
@@ -290,13 +290,13 @@ export const component: ClosureComponent = (): Component => {
e.target.disabled = true;
Promise.all(
Array.from(selected).map((id) =>
store.deleteResource("files", id)
)
store.deleteResource("files", id),
),
)
.then((res) => {
notifications.push(
"success",
`${res.length} files deleted`
`${res.length} files deleted`,
);
store.setTimestamp(Date.now());
})
@@ -306,7 +306,7 @@ export const component: ClosureComponent = (): Component => {
});
},
},
"Delete"
"Delete",
),
];
};
@@ -324,7 +324,7 @@ export const component: ClosureComponent = (): Component => {
m(
"loading",
{ queries: [files, count] },
m(indexTableComponent, attrs)
m(indexTableComponent, attrs),
),
];
},