Skip to content

Commit ef63039

Browse files
committed
Merge branch 'thyeggman/resolve-eslint-rule-violations' of https://github.com/github/vscode-github-actions into thyeggman/resolve-eslint-rule-violations
2 parents aa795d1 + ec8ffed commit ef63039

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

@types/ssh-config.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* SSH Config interface
3+
*
4+
* Note that this interface atypically capitalizes field names. This is for consistency
5+
* with SSH config files.
6+
*/
7+
8+
/**
9+
* ConfigResolvers take a config, resolve some additional data (perhaps using
10+
* a config file), and return a new Config.
11+
*/
12+
declare module 'ssh-config' {
13+
export type ConfigResolver = (config: Config) => Config;
14+
15+
export type Config = Record<string, string>;
16+
17+
export class SSHConfig {
18+
compute: (host: string) => Config;
19+
}
20+
21+
export function parse(config: string): SSHConfig;
22+
}

src/external/ssh.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
1-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
2-
/* eslint-disable @typescript-eslint/no-unsafe-return */
3-
/* eslint-disable @typescript-eslint/no-unsafe-call */
4-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
5-
import {parse as parseConfig} from 'ssh-config';
1+
import {parse as parseConfig, Config, ConfigResolver} from 'ssh-config';
62

73
const SSH_URL_RE = /^(?:([^@:]+)@)?([^:/]+):?(.+)$/;
84
const URL_SCHEME_RE = /^([a-z-]+):\/\//;
95

10-
/**
11-
* SSH Config interface
12-
*
13-
* Note that this interface atypically capitalizes field names. This is for consistency
14-
* with SSH config files.
15-
*/
16-
export interface Config {
17-
Host: string;
18-
[param: string]: string;
19-
}
20-
21-
/**
22-
* ConfigResolvers take a config, resolve some additional data (perhaps using
23-
* a config file), and return a new Config.
24-
*/
25-
export type ConfigResolver = (config: Config) => Config;
26-
276
/**
287
* Parse and resolve an SSH url. Resolves host aliases using the configuration
298
* specified by ~/.ssh/config, if present.

src/typings/ref.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// <reference path='./git.d.ts'/>
22

33
declare module 'tunnel';
4-
declare module 'ssh-config';
54

65
declare module 'atob';
76
declare module 'btoa';

0 commit comments

Comments
 (0)