mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
enable @typescript-eslint/member-delimiter-style, https://github.com/microsoft/vscode/issues/140391
This commit is contained in:
@@ -858,7 +858,7 @@ export class Repository {
|
||||
return result.stdout.trim();
|
||||
}
|
||||
|
||||
async getConfigs(scope: string): Promise<{ key: string; value: string; }[]> {
|
||||
async getConfigs(scope: string): Promise<{ key: string; value: string }[]> {
|
||||
const args = ['config'];
|
||||
|
||||
if (scope) {
|
||||
@@ -960,7 +960,7 @@ export class Repository {
|
||||
return stdout;
|
||||
}
|
||||
|
||||
async getObjectDetails(treeish: string, path: string): Promise<{ mode: string, object: string, size: number }> {
|
||||
async getObjectDetails(treeish: string, path: string): Promise<{ mode: string; object: string; size: number }> {
|
||||
if (!treeish) { // index
|
||||
const elements = await this.lsfiles(path);
|
||||
|
||||
@@ -998,7 +998,7 @@ export class Repository {
|
||||
async getGitRelativePath(ref: string, relativePath: string): Promise<string> {
|
||||
const relativePathLowercase = relativePath.toLowerCase();
|
||||
const dirname = path.posix.dirname(relativePath) + '/';
|
||||
const elements: { file: string; }[] = ref ? await this.lstree(ref, dirname) : await this.lsfiles(dirname);
|
||||
const elements: { file: string }[] = ref ? await this.lstree(ref, dirname) : await this.lsfiles(dirname);
|
||||
const element = elements.filter(file => file.file.toLowerCase() === relativePathLowercase)[0];
|
||||
|
||||
if (!element) {
|
||||
@@ -1008,7 +1008,7 @@ export class Repository {
|
||||
return element.file;
|
||||
}
|
||||
|
||||
async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> {
|
||||
async detectObjectType(object: string): Promise<{ mimetype: string; encoding?: string }> {
|
||||
const child = await this.stream(['show', '--textconv', object]);
|
||||
const buffer = await readBytes(child.stdout!, 4100);
|
||||
|
||||
@@ -1308,7 +1308,7 @@ export class Repository {
|
||||
await this.exec(['update-index', add, '--cacheinfo', mode, hash, path]);
|
||||
}
|
||||
|
||||
async checkout(treeish: string, paths: string[], opts: { track?: boolean, detached?: boolean } = Object.create(null)): Promise<void> {
|
||||
async checkout(treeish: string, paths: string[], opts: { track?: boolean; detached?: boolean } = Object.create(null)): Promise<void> {
|
||||
const args = ['checkout', '-q'];
|
||||
|
||||
if (opts.track) {
|
||||
@@ -1570,7 +1570,7 @@ export class Repository {
|
||||
await this.exec(args);
|
||||
}
|
||||
|
||||
async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number, silent?: boolean, readonly cancellationToken?: CancellationToken } = {}): Promise<void> {
|
||||
async fetch(options: { remote?: string; ref?: string; all?: boolean; prune?: boolean; depth?: number; silent?: boolean; readonly cancellationToken?: CancellationToken } = {}): Promise<void> {
|
||||
const args = ['fetch'];
|
||||
const spawnOptions: SpawnOptions = {
|
||||
cancellationToken: options.cancellationToken,
|
||||
@@ -1813,8 +1813,8 @@ export class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
getStatus(opts?: { limit?: number, ignoreSubmodules?: boolean }): Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean; }> {
|
||||
return new Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean; }>((c, e) => {
|
||||
getStatus(opts?: { limit?: number; ignoreSubmodules?: boolean }): Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean }> {
|
||||
return new Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean }>((c, e) => {
|
||||
const parser = new GitStatusParser();
|
||||
const env = { GIT_OPTIONAL_LOCKS: '0' };
|
||||
const args = ['status', '-z', '-u'];
|
||||
@@ -1894,7 +1894,7 @@ export class Repository {
|
||||
.map(([ref]) => ({ name: ref, type: RefType.Head } as Branch));
|
||||
}
|
||||
|
||||
async getRefs(opts?: { sort?: 'alphabetically' | 'committerdate', contains?: string, pattern?: string, count?: number }): Promise<Ref[]> {
|
||||
async getRefs(opts?: { sort?: 'alphabetically' | 'committerdate'; contains?: string; pattern?: string; count?: number }): Promise<Ref[]> {
|
||||
const args = ['for-each-ref'];
|
||||
|
||||
if (opts?.count) {
|
||||
|
||||
Reference in New Issue
Block a user