enable @typescript-eslint/member-delimiter-style, https://github.com/microsoft/vscode/issues/140391

This commit is contained in:
Johannes Rieken
2022-02-02 14:34:41 +01:00
parent 5abc4e0071
commit 4a130c40ed
954 changed files with 3017 additions and 3016 deletions

View File

@@ -49,7 +49,7 @@ const passthrough = (value: any, resolve: (value?: any) => void) => resolve(valu
*/
export function promiseFromEvent<T, U>(
event: Event<T>,
adapter: PromiseAdapter<T, U> = passthrough): { promise: Promise<U>, cancel: EventEmitter<void> } {
adapter: PromiseAdapter<T, U> = passthrough): { promise: Promise<U>; cancel: EventEmitter<void> } {
let subscription: Disposable;
let cancel = new EventEmitter<void>();
return {

View File

@@ -18,7 +18,7 @@ interface SessionData {
label?: string;
displayName?: string;
id: string;
}
};
scopes: string[];
accessToken: string;
}
@@ -39,7 +39,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
private _disposable: vscode.Disposable;
constructor(private readonly context: vscode.ExtensionContext, private readonly type: AuthProviderType) {
const { name, version, aiKey } = context.extension.packageJSON as { name: string, version: string, aiKey: string };
const { name, version, aiKey } = context.extension.packageJSON as { name: string; version: string; aiKey: string };
this._telemetryReporter = new ExperimentationTelemetry(context, new TelemetryReporter(name, version, aiKey));
if (this.type === AuthProviderType.github) {
@@ -149,7 +149,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
if (scopesSeen.has(scopesStr)) {
return undefined;
}
let userInfo: { id: string, accountName: string } | undefined;
let userInfo: { id: string; accountName: string } | undefined;
if (!session.account) {
try {
userInfo = await this._githubServer.getUserInfo(session.accessToken);

View File

@@ -41,7 +41,7 @@ function parseQuery(uri: vscode.Uri) {
export interface IGitHubServer extends vscode.Disposable {
login(scopes: string): Promise<string>;
getUserInfo(token: string): Promise<{ id: string, accountName: string }>;
getUserInfo(token: string): Promise<{ id: string; accountName: string }>;
sendAdditionalTelemetryInfo(token: string): Promise<void>;
friendlyName: string;
type: AuthProviderType;
@@ -77,7 +77,7 @@ async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Pro
}
}
async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): Promise<{ id: string, accountName: string }> {
async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): Promise<{ id: string; accountName: string }> {
let result: Response;
try {
logger.info('Getting user info...');
@@ -119,7 +119,7 @@ export class GitHubServer implements IGitHubServer {
private _onDidManuallyProvideToken = new vscode.EventEmitter<string | undefined>();
private _pendingStates = new Map<string, string[]>();
private _codeExchangePromises = new Map<string, { promise: Promise<string>, cancel: vscode.EventEmitter<void> }>();
private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
private _statusBarCommandId = `${this.type}.provide-manually`;
private _disposable: vscode.Disposable;
private _uriHandler = new UriEventHandler(this._logger);
@@ -382,7 +382,7 @@ export class GitHubServer implements IGitHubServer {
this._uriHandler.handleUri(vscode.Uri.parse(uri.trim()));
}
public getUserInfo(token: string): Promise<{ id: string, accountName: string }> {
public getUserInfo(token: string): Promise<{ id: string; accountName: string }> {
return getUserInfo(token, this.getServerUri('/user'), this._logger);
}
@@ -406,7 +406,7 @@ export class GitHubServer implements IGitHubServer {
});
if (result.ok) {
const json: { student: boolean, faculty: boolean } = await result.json();
const json: { student: boolean; faculty: boolean } = await result.json();
/* __GDPR__
"session" : {
@@ -440,7 +440,7 @@ export class GitHubServer implements IGitHubServer {
return;
}
const json: { verifiable_password_authentication: boolean, installed_version: string } = await result.json();
const json: { verifiable_password_authentication: boolean; installed_version: string } = await result.json();
/* __GDPR__
"ghe-session" : {
@@ -504,7 +504,7 @@ export class GitHubEnterpriseServer implements IGitHubServer {
return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}/api/v3${path}`);
}
public async getUserInfo(token: string): Promise<{ id: string, accountName: string }> {
public async getUserInfo(token: string): Promise<{ id: string; accountName: string }> {
return getUserInfo(token, this.getServerUri('/user'), this._logger);
}
@@ -522,7 +522,7 @@ export class GitHubEnterpriseServer implements IGitHubServer {
return;
}
const json: { verifiable_password_authentication: boolean, installed_version: string } = await result.json();
const json: { verifiable_password_authentication: boolean; installed_version: string } = await result.json();
/* __GDPR__
"ghe-session" : {