Skip to content

Commit ea4b179

Browse files
committed
lint
1 parent e7cad82 commit ea4b179

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

Diff for: src/commands.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,14 @@ export class Commands {
526526
const devContainerName = args[3] as string
527527
const devContainerFolder = args[4] as string
528528

529-
await this.openDevContainerInner(baseUrl, workspaceOwner, workspaceName, workspaceAgent, devContainerName, devContainerFolder)
529+
await this.openDevContainerInner(
530+
baseUrl,
531+
workspaceOwner,
532+
workspaceName,
533+
workspaceAgent,
534+
devContainerName,
535+
devContainerFolder,
536+
)
530537
}
531538

532539
/**
@@ -709,4 +716,3 @@ export class Commands {
709716
)
710717
}
711718
}
712-

Diff for: src/remote.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,9 @@ export class Remote {
529529
)
530530
if (coderConnectAddr) {
531531
// Find the path of the current workspace, which will have the same authority
532-
const folderPath = this.vscodeProposed.workspace.workspaceFolders
533-
?.find(folder => folder.uri.authority === remoteAuthority)
534-
?.uri.path;
532+
const folderPath = this.vscodeProposed.workspace.workspaceFolders?.find(
533+
(folder) => folder.uri.authority === remoteAuthority,
534+
)?.uri.path
535535
let newRemoteAuthority = `ssh-remote+${coderConnectAddr}`
536536
if (parts.containerNameHex) {
537537
newRemoteAuthority = `attached-container+${parts.containerNameHex}@${newRemoteAuthority}`

Diff for: src/util.test.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ it("ignore unrelated authorities", async () => {
99
"vscode://ssh-remote+coder-vscode-test--foo--bar",
1010
"vscode://ssh-remote+coder-vscode-foo--bar",
1111
"vscode://ssh-remote+coder--foo--bar",
12-
"vscode://attached-container+namehash@ssh-remote+dev.foo.admin.coder"
12+
"vscode://attached-container+namehash@ssh-remote+dev.foo.admin.coder",
1313
]
1414
for (const test of tests) {
1515
expect(parseRemoteAuthority(test)).toBe(null)
@@ -69,7 +69,9 @@ it("should parse authority", async () => {
6969
username: "foo",
7070
workspace: "bar",
7171
})
72-
expect(parseRemoteAuthority("vscode://attached-container+namehash@ssh-remote+coder-vscode.dev.coder.com--foo--bar.baz")).toStrictEqual({
72+
expect(
73+
parseRemoteAuthority("vscode://attached-container+namehash@ssh-remote+coder-vscode.dev.coder.com--foo--bar.baz"),
74+
).toStrictEqual({
7375
containerNameHex: "namehash",
7476
agent: "baz",
7577
host: "coder-vscode.dev.coder.com--foo--bar.baz",

Diff for: src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function parseRemoteAuthority(authority: string): AuthorityParts | null {
3333
let sshAuthority
3434
if (authorityParts.length == 1) {
3535
sshAuthority = authorityParts[0]
36-
} else if (authorityParts.length == 2 && authorityParts[0].includes("attached-container+")) {
36+
} else if (authorityParts.length == 2 && authorityParts[0].includes("attached-container+")) {
3737
sshAuthority = authorityParts[1]
3838
containerNameHex = authorityParts[0].split("+")[1]
3939
} else {

0 commit comments

Comments
 (0)