Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 4427b6f

Browse files
authored
Merge pull request #2065 from skaut/stricter-tsconfig
Ordered and stricter tsconfig
2 parents bc9c3e9 + d6b16d9 commit 4427b6f

25 files changed

+62
-60
lines changed

playwright.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig, devices } from "@playwright/test";
22

33
export default defineConfig({
4-
forbidOnly: process.env.CI !== undefined,
4+
forbidOnly: process.env["CI"] !== undefined,
55
fullyParallel: true,
66
projects: [
77
{
@@ -17,18 +17,18 @@ export default defineConfig({
1717
use: { ...devices["Desktop Safari"] },
1818
},
1919
],
20-
reporter: process.env.CI !== undefined ? "html" : "list",
21-
retries: process.env.CI !== undefined ? 2 : 0,
20+
reporter: process.env["CI"] !== undefined ? "html" : "list",
21+
retries: process.env["CI"] !== undefined ? 2 : 0,
2222
testDir: "./tests/frontend",
2323
use: {
2424
baseURL: "http://127.0.0.1:5173",
2525
trace: "on-first-retry",
2626
},
2727
webServer: {
2828
command: "npm run start -- --host",
29-
reuseExistingServer: process.env.CI === undefined,
29+
reuseExistingServer: process.env["CI"] === undefined,
3030
url: "http://127.0.0.1:5173",
3131
},
3232
// Opt out of parallel tests on CI.
33-
//workers: process.env.CI !== undefined ? 1 : undefined,
33+
//workers: process.env["CI"] !== undefined ? 1 : undefined,
3434
});

src/backend/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { move } from "./move";
77

88
declare const globalThis: google.script.PublicEndpoints;
99

10-
globalThis.doGet = doGet;
11-
globalThis.listFolders = listFolders;
12-
globalThis.listSharedDrives = listSharedDrives;
13-
globalThis.move = move;
10+
globalThis["doGet"] = doGet;
11+
globalThis["listFolders"] = listFolders;
12+
globalThis["listSharedDrives"] = listSharedDrives;
13+
globalThis["move"] = move;

src/frontend/App.svelte

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,9 @@
124124
google.script.run
125125
.withSuccessHandler(moveSuccessHandler)
126126
.withFailureHandler(moveErrorHandler)
127-
.move(
128-
source.id,
129-
destination.id,
130-
copyComments,
131-
mergeFolders,
132-
forceNonEmpty,
133-
);
127+
[
128+
"move"
129+
](source.id, destination.id, copyComments, mergeFolders, forceNonEmpty);
134130
}
135131
</script>
136132

src/frontend/FolderSelection.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
google.script.run
6868
.withSuccessHandler(handleSharedDriveResponse)
6969
.withFailureHandler(handleError)
70-
.listSharedDrives();
70+
["listSharedDrives"]();
7171
} else {
7272
google.script.run
7373
.withSuccessHandler(handleFolderResponse)
7474
.withFailureHandler(handleError)
75-
.listFolders(path[path.length - 1].id);
75+
["listFolders"](path[path.length - 1].id);
7676
}
7777
}
7878

tests/frontend/basic.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("works with basic configuration", async ({ page }) => {
77
const getCalls = await setup(page);
88

99
await page.evaluate(() => {
10-
window._endpointStubs.listSharedDrives = [
10+
window._endpointStubs["listSharedDrives"] = [
1111
{
1212
status: "success",
1313
value: { response: [], status: "success" },
@@ -17,7 +17,7 @@ test("works with basic configuration", async ({ page }) => {
1717
value: { response: [], status: "success" },
1818
},
1919
];
20-
window._endpointStubs.move = [
20+
window._endpointStubs["move"] = [
2121
{
2222
status: "success",
2323
value: { response: { errors: [] }, status: "success" },

tests/frontend/configuration.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("works with copy configuration", async ({ page }) => {
77
const getCalls = await setup(page);
88

99
await page.evaluate(() => {
10-
window._endpointStubs.listSharedDrives = [
10+
window._endpointStubs["listSharedDrives"] = [
1111
{
1212
status: "success",
1313
value: { response: [], status: "success" },
@@ -17,7 +17,7 @@ test("works with copy configuration", async ({ page }) => {
1717
value: { response: [], status: "success" },
1818
},
1919
];
20-
window._endpointStubs.move = [
20+
window._endpointStubs["move"] = [
2121
{
2222
status: "success",
2323
value: { response: { errors: [] }, status: "success" },
@@ -53,7 +53,7 @@ test("works with merge configuration", async ({ page }) => {
5353
const getCalls = await setup(page);
5454

5555
await page.evaluate(() => {
56-
window._endpointStubs.listSharedDrives = [
56+
window._endpointStubs["listSharedDrives"] = [
5757
{
5858
status: "success",
5959
value: { response: [], status: "success" },
@@ -63,7 +63,7 @@ test("works with merge configuration", async ({ page }) => {
6363
value: { response: [], status: "success" },
6464
},
6565
];
66-
window._endpointStubs.move = [
66+
window._endpointStubs["move"] = [
6767
{
6868
status: "success",
6969
value: { response: { errors: [] }, status: "success" },

tests/frontend/destination-selection-api-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "success",
1515
value: { status: "error", type: "DriveAPIError" },
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

tests/frontend/destination-selection-invalid-parameter-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "success",
1515
value: { status: "error", type: "invalidParameter" },
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

tests/frontend/destination-selection-unhandled-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "failure",
1515
value: new Error("ERROR MESSAGE"),
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

tests/frontend/destination-selection-unknown-error.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ test("handles raw errors in source folder selection gracefully", async ({
99
await setup(page);
1010

1111
await page.evaluate(() => {
12-
window._endpointStubs.listFolders = [
12+
window._endpointStubs["listFolders"] = [
1313
{
1414
status: "success",
1515
value: { status: "error", type: "unknown" },
1616
},
1717
];
18-
window._endpointStubs.listSharedDrives = [
18+
window._endpointStubs["listSharedDrives"] = [
1919
{
2020
status: "success",
2121
value: {

0 commit comments

Comments
 (0)