Skip to content

Commit d654424

Browse files
committed
style: update 13 files
1 parent 9d03fa8 commit d654424

File tree

13 files changed

+225
-225
lines changed

13 files changed

+225
-225
lines changed

src/api/git.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ export interface Repository {
197197

198198
getObjectDetails(
199199
treeish: string,
200-
path: string
200+
path: string,
201201
): Promise<{ mode: string; object: string; size: number }>;
202202
detectObjectType(
203-
object: string
203+
object: string,
204204
): Promise<{ mimetype: string; encoding?: string }>;
205205
buffer(ref: string, path: string): Promise<Buffer>;
206206
show(ref: string, path: string): Promise<string>;
@@ -231,13 +231,13 @@ export interface Repository {
231231
getBranch(name: string): Promise<Branch>;
232232
getBranches(
233233
query: BranchQuery,
234-
cancellationToken?: CancellationToken
234+
cancellationToken?: CancellationToken,
235235
): Promise<Ref[]>;
236236
setBranchUpstream(name: string, upstream: string): Promise<void>;
237237

238238
getRefs(
239239
query: RefQuery,
240-
cancellationToken?: CancellationToken
240+
cancellationToken?: CancellationToken,
241241
): Promise<Ref[]>;
242242

243243
getMergeBase(ref1: string, ref2: string): Promise<string>;
@@ -259,7 +259,7 @@ export interface Repository {
259259
remoteName?: string,
260260
branchName?: string,
261261
setUpstream?: boolean,
262-
force?: ForcePushMode
262+
force?: ForcePushMode,
263263
): Promise<void>;
264264

265265
blame(path: string): Promise<string>;
@@ -307,7 +307,7 @@ export interface PushErrorHandler {
307307
repository: Repository,
308308
remote: Remote,
309309
refspec: string,
310-
error: Error & { gitErrorCode: GitErrorCodes }
310+
error: Error & { gitErrorCode: GitErrorCodes },
311311
): Promise<boolean>;
312312
}
313313

@@ -336,7 +336,7 @@ export interface API {
336336
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable;
337337
registerCredentialsProvider(provider: CredentialsProvider): Disposable;
338338
registerPostCommitCommandsProvider(
339-
provider: PostCommitCommandsProvider
339+
provider: PostCommitCommandsProvider,
340340
): Disposable;
341341
registerPushErrorHandler(handler: PushErrorHandler): Disposable;
342342
}

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function _validateFoundRepos(git: API) {
3131
*/
3232
async function _handleRepos(
3333
git: API,
34-
sourceControl: vscode.SourceControl
34+
sourceControl: vscode.SourceControl,
3535
): Promise<Repository | false> {
3636
const selectedRepo = git.repositories.find(repository => {
3737
const uri = sourceControl.rootUri;
@@ -85,7 +85,7 @@ async function _chooseRepoForAutofill(sourceControl?: vscode.SourceControl) {
8585
export function activate(context: vscode.ExtensionContext) {
8686
const disposable = vscode.commands.registerCommand(
8787
"commitMsg.autofill",
88-
_chooseRepoForAutofill
88+
_chooseRepoForAutofill,
8989
);
9090

9191
context.subscriptions.push(disposable);

src/generate/convCommit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class ConventionalCommit {
171171
*/
172172
export function getConventionType(
173173
action: ACTION,
174-
filePath: string
174+
filePath: string,
175175
): CONVENTIONAL_TYPE {
176176
if (action === ACTION.R || action === ACTION.D) {
177177
return CONVENTIONAL_TYPE.CHORE;

src/git/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function _execute(cwd: string, subcommand: string, options: string[] = []) {
3434
*/
3535
async function _diffIndex(
3636
repository: Repository,
37-
options: string[] = []
37+
options: string[] = [],
3838
): Promise<Array<string>> {
3939
const cwd = repository.rootUri.fsPath;
4040
const cmd = "diff-index";
@@ -77,7 +77,7 @@ export async function getChanges(repository: Repository) {
7777
}
7878

7979
console.debug(
80-
"Staging area is empty. Using unstaged files (tracked files only still)."
80+
"Staging area is empty. Using unstaged files (tracked files only still).",
8181
);
8282

8383
const allChanges = await _diffIndex(repository);

src/git/parseOutput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const GIT_STATUS_SPLIT = " -> ";
1919
export function parseStatus(line: string): FileChange {
2020
if (line.length <= 4) {
2121
throw new Error(
22-
`Input string must be at least 4 characters. Got: '${line}'`
22+
`Input string must be at least 4 characters. Got: '${line}'`,
2323
);
2424
}
2525
const x = line[0];
@@ -56,7 +56,7 @@ export function parseStatus(line: string): FileChange {
5656
export function parseDiffIndex(line: string): FileChange {
5757
if (line.length <= 4) {
5858
throw new Error(
59-
`Invalid input. Input string must be at least 4 characters. Got: '${line}'`
59+
`Invalid input. Input string must be at least 4 characters. Got: '${line}'`,
6060
);
6161
}
6262
const x = line[0];

src/lib/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function humanList(paths: string[]) {
117117
*/
118118
export function moveOrRenameFromPaths(
119119
oldP: SplitPathResult,
120-
newP: SplitPathResult
120+
newP: SplitPathResult,
121121
) {
122122
let result: MoveOrRename;
123123

src/prepareCommitMsg.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export function _newMsg(lines: string[]) {
193193
*/
194194
export function _joinOldAndNew(
195195
autoMsgPieces: ConvCommitMsg,
196-
oldMsgPieces: MsgPieces
196+
oldMsgPieces: MsgPieces,
197197
): string {
198198
let typePrefix = "";
199199

@@ -205,7 +205,7 @@ export function _joinOldAndNew(
205205

206206
const descResult = _joinWithSpace(
207207
autoMsgPieces.description,
208-
oldMsgPieces.description
208+
oldMsgPieces.description,
209209
);
210210

211211
if (!typePrefix) {
@@ -239,7 +239,7 @@ export function _joinOldAndNew(
239239
export function _combineOldAndNew(
240240
autoType: CONVENTIONAL_TYPE,
241241
autoDesc: string,
242-
oldMsg: string
242+
oldMsg: string,
243243
): string {
244244
if (!oldMsg) {
245245
const autoCommitMsg: ConvCommitMsg = {
@@ -273,7 +273,7 @@ export function _combineOldAndNew(
273273
export function _generateMsgWithOld(lines: string[], oldMsg: string) {
274274
if (oldMsg === "") {
275275
throw new Error(
276-
"`oldMsg` must be non-empty here, or use `generateNewMsg` instead."
276+
"`oldMsg` must be non-empty here, or use `generateNewMsg` instead.",
277277
);
278278
}
279279
const { typePrefix, description } = _msgFromChanges(lines);

src/test/generate/action.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,63 +37,63 @@ describe("Desribe a file using two paths", function () {
3737
it("can describe a renamed file", function () {
3838
assert.strictEqual(
3939
moveOrRenameMsg("foo.txt", "bar.txt"),
40-
"rename foo.txt to bar.txt"
40+
"rename foo.txt to bar.txt",
4141
);
4242

4343
assert.strictEqual(
4444
moveOrRenameMsg("buzz/foo.txt", "buzz/bar.txt"),
45-
"rename foo.txt to bar.txt"
45+
"rename foo.txt to bar.txt",
4646
);
4747

4848
assert.strictEqual(
4949
moveOrRenameMsg("fizz buzz/foo.txt", "fizz buzz/bar.txt"),
50-
"rename foo.txt to bar.txt"
50+
"rename foo.txt to bar.txt",
5151
);
5252
});
5353

5454
it("can describe a moved file", function () {
5555
assert.strictEqual(
5656
moveOrRenameMsg("buzz/foo.txt", "fizz/foo.txt"),
57-
"move foo.txt to fizz"
57+
"move foo.txt to fizz",
5858
);
5959

6060
assert.strictEqual(
6161
moveOrRenameMsg("buzz/foo bar.txt", "fizz/foo bar.txt"),
62-
"move 'foo bar.txt' to fizz"
62+
"move 'foo bar.txt' to fizz",
6363
);
6464

6565
assert.strictEqual(
6666
moveOrRenameMsg("buzz/foo.txt", "foo.txt"),
67-
"move foo.txt to repo root"
67+
"move foo.txt to repo root",
6868
);
6969

7070
assert.strictEqual(
7171
moveOrRenameMsg("buzz/foo bar.txt", "foo bar.txt"),
72-
"move 'foo bar.txt' to repo root"
72+
"move 'foo bar.txt' to repo root",
7373
);
7474
});
7575

7676
it("can describe a remamed and moved file", function () {
7777
assert.strictEqual(
7878
moveOrRenameMsg("foo.txt", "fizz/bar.txt"),
79-
"move and rename foo.txt to fizz/bar.txt"
79+
"move and rename foo.txt to fizz/bar.txt",
8080
);
8181

8282
// This is a rare case, so don't bother trying to handle it smarter around
8383
// paths.
8484
assert.strictEqual(
8585
moveOrRenameMsg("fuzz/foo.txt", "fizz/bar.txt"),
86-
"move and rename foo.txt to fizz/bar.txt"
86+
"move and rename foo.txt to fizz/bar.txt",
8787
);
8888

8989
assert.strictEqual(
9090
moveOrRenameMsg("fuzz/foo.txt", "fizz/bar bazz.txt"),
91-
"move and rename foo.txt to 'fizz/bar bazz.txt'"
91+
"move and rename foo.txt to 'fizz/bar bazz.txt'",
9292
);
9393

9494
assert.strictEqual(
9595
moveOrRenameMsg("fizz/foo.txt", "bar.txt"),
96-
"move and rename foo.txt to bar.txt at repo root"
96+
"move and rename foo.txt to bar.txt at repo root",
9797
);
9898
});
9999
});

0 commit comments

Comments
 (0)