Skip to content

Commit e04961a

Browse files
committed
Updates formatting for latest prettier
1 parent 512ee1b commit e04961a

File tree

179 files changed

+628
-654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+628
-654
lines changed

CHANGELOG.md

Lines changed: 0 additions & 31 deletions
Large diffs are not rendered by default.

docs/links.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ _{prefix}/r/{repoId}/b/{branchName}?{baseQuery}(&action={action})_
8585
- _{branchName}_ is the name of the branch. Note that the remote name should not be included. Instead, _{remoteUrl}_ is used to determine the remote for the branch. So if the branch _test_ is located on _origin_, for example, _{branchName}_ should just be _test_ and the remote url of _origin_ should be used for the _{remoteUrl}_ parameter. You should not set _{branchName}_ to _origin/test_ in this example.
8686

8787
- _{action}_ is an optional query parameter that represents the action to take on the branch target. By default, the action on all repository item deep links, including branch deep links, is to open the commit graph and select the row pertaining to the item. This parameter allows the link to complete other actions instead:
88-
8988
- _switch_: Switch to the branch (with options to checkout, create a new local branch if desired, or create/open a worktree).
9089

9190
- _switch-to-pr_: Does everything that the _switch_ action does, but also opens the inspect overview, which contains details about pull requests related to the branch.
@@ -203,7 +202,6 @@ _{prefix}/drafts/{draftId}(?patch={patchId})(&type=suggested_pr_change&prEntityI
203202
- _{patchId}_ is an optional query parameter used to access a specific revision/patch within the cloud patch. If not set, the most recent is used.
204203

205204
- _type=suggested_pr_change&prEntityId={prEntityId}_ should be included in the query for deep links to code suggestions. These parameters should not be included for standard cloud patch links.
206-
207205
- _{prEntityId}_ refers to the GK entity identifier for the Pull Request related to the code suggestion.
208206

209207
#### Example Usage
@@ -247,7 +245,6 @@ _vscode://eamodio.gitlens/login?code={code}(&state={state})(&context={context})_
247245
- _{state}_ is an optional parameter representing the state used to retrieve the code, if applicable. If a state was used to retrieve the code, it must be included in the link or the login will fail.
248246

249247
- _{context}_ is an optional parameter representing the context of the login. Currently supported values include:
250-
251248
- _start_trial_ - Log in to start a Pro trial.
252249

253250
#### Example Usage
@@ -269,7 +266,6 @@ _{prefix}/command/{command}_
269266
#### References
270267

271268
- _{command}_ is the name of the command to run. Currently supported values include:
272-
273269
- _cloud-patches_ - Runs the `GitLens: Show Cloud Patches View` command.
274270

275271
- _graph_ - Runs the `GitLens: Show Graph` command.

src/@types/global.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ export declare global {
5353
(first: any, ...args: infer A1): infer R1;
5454
(first: any, ...args: infer A2): infer R2;
5555
(first: any, ...args: infer A3): infer R3;
56-
}
57-
? ((...args: A1) => R1) & ((...args: A2) => R2) & ((...args: A3) => R3)
58-
: F extends {
56+
}
57+
? ((...args: A1) => R1) & ((...args: A2) => R2) & ((...args: A3) => R3)
58+
: F extends {
5959
(first: any, ...args: infer A1): infer R1;
6060
(first: any, ...args: infer A2): infer R2;
61-
}
62-
? ((...args: A1) => R1) & ((...args: A2) => R2)
63-
: F extends {
61+
}
62+
? ((...args: A1) => R1) & ((...args: A2) => R2)
63+
: F extends {
6464
(first: any, ...args: infer A1): infer R1;
65-
}
66-
? (...args: A1) => R1
67-
: never;
65+
}
66+
? (...args: A1) => R1
67+
: never;
6868
}

src/annotations/annotations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function addOrUpdateGutterHeatmapDecoration(
126126
`data:image/svg+xml,${encodeURIComponent(
127127
`<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><rect fill='rgb(${r},${g},${b})' fill-opacity='${a}' x='8' y='0' width='3' height='18'/></svg>`,
128128
)}`,
129-
)
129+
)
130130
: undefined,
131131
gutterIconSize: gutter ? 'contain' : undefined,
132132
overviewRulerLane: scrollbar ? OverviewRulerLane.Center : undefined,

src/annotations/blameAnnotationProvider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
111111
Array.isArray(lookupTable)
112112
? lookupTable
113113
: unified
114-
? lookupTable.hot.concat(lookupTable.cold)
115-
: date.getTime() < coldThresholdTimestamp
116-
? lookupTable.cold
117-
: lookupTable.hot;
114+
? lookupTable.hot.concat(lookupTable.cold)
115+
: date.getTime() < coldThresholdTimestamp
116+
? lookupTable.cold
117+
: lookupTable.hot;
118118

119119
const computeRelativeAge = (date: Date, lookup: number[]) => {
120120
const time = date.getTime();
@@ -184,7 +184,7 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
184184
await GitUri.fromUri(document.uri),
185185
position.line,
186186
document,
187-
)
187+
)
188188
: undefined,
189189
])
190190
).filter(<T>(m?: T): m is T => Boolean(m));

src/annotations/fileAnnotationController.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export class FileAnnotationController implements Disposable {
788788
',',
789789
)})' x='13' y='0' width='3' height='18'/></svg>`,
790790
)}`,
791-
)
791+
)
792792
: undefined,
793793
gutterIconSize: 'contain',
794794
overviewRulerLane: OverviewRulerLane.Left,
@@ -807,7 +807,7 @@ export class FileAnnotationController implements Disposable {
807807
',',
808808
)})' x='13' y='0' width='3' height='18'/></svg>`,
809809
)}`,
810-
)
810+
)
811811
: undefined,
812812
gutterIconSize: 'contain',
813813
overviewRulerLane: OverviewRulerLane.Left,
@@ -824,7 +824,7 @@ export class FileAnnotationController implements Disposable {
824824
',',
825825
)})' points='13,10 13,18 17,14'/></svg>`,
826826
)}`,
827-
)
827+
)
828828
: undefined,
829829
gutterIconSize: 'contain',
830830
overviewRulerLane: OverviewRulerLane.Left,
@@ -849,7 +849,7 @@ export class FileAnnotationController implements Disposable {
849849
`data:image/svg+xml,${encodeURIComponent(
850850
`<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><rect fill='${gutterHighlightColor}' fill-opacity='0.6' x='7' y='0' width='3' height='18'/></svg>`,
851851
)}`,
852-
)
852+
)
853853
: undefined;
854854

855855
Decorations.gutterBlameHighlight = window.createTextEditorDecorationType({

src/annotations/gutterBlameAnnotationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
235235
const highlightDecorationRanges = filterMap(blame.lines, l =>
236236
l.sha === sha
237237
? // editor lines are 0-based
238-
this.editor.document.validateRange(new Range(l.line - 1, 0, l.line - 1, maxSmallIntegerV8))
238+
this.editor.document.validateRange(new Range(l.line - 1, 0, l.line - 1, maxSmallIntegerV8))
239239
: undefined,
240240
);
241241

src/annotations/gutterChangesAnnotationProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class GutterChangesAnnotationProvider extends AnnotationProviderBase<Chan
162162
this.editor.document.getText(),
163163
),
164164
this.container.git.getDiffForFile(this.trackedDocument.uri, rev1, rev2),
165-
]
165+
]
166166
: [this.container.git.getDiffForFile(this.trackedDocument.uri, rev1, rev2)],
167167
)
168168
)
@@ -224,8 +224,8 @@ export class GutterChangesAnnotationProvider extends AnnotationProviderBase<Chan
224224
decorationType: (hunkLine.state === 'added'
225225
? Decorations.changesLineAddedAnnotation
226226
: hunkLine.state === 'removed'
227-
? Decorations.changesLineDeletedAnnotation
228-
: Decorations.changesLineChangedAnnotation)!,
227+
? Decorations.changesLineDeletedAnnotation
228+
: Decorations.changesLineChangedAnnotation)!,
229229
rangesOrOptions: [{ range: range }],
230230
};
231231
decorationsMap.set(hunkLine.state, decoration);

src/annotations/lineAnnotationController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export class LineAnnotationController implements Disposable {
319319
commit,
320320
// await GitUri.fromUri(editor.document.uri),
321321
// l,
322-
commit.isUncommitted ? cfg.uncommittedChangesFormat ?? cfg.format : cfg.format,
322+
commit.isUncommitted ? (cfg.uncommittedChangesFormat ?? cfg.format) : cfg.format,
323323
{
324324
dateFormat: cfg.dateFormat === null ? configuration.get('defaultDateFormat') : cfg.dateFormat,
325325
getBranchAndTagTips: getBranchAndTagTips,
@@ -383,7 +383,7 @@ export class LineAnnotationController implements Disposable {
383383

384384
void updateDecorations(this.container, editor, getBranchAndTagTips, prs);
385385
},
386-
)
386+
)
387387
: undefined;
388388

389389
const [getBranchAndTagTipsResult] = await Promise.allSettled([

src/autolinks/autolinksProvider.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ export class AutolinksProvider implements Disposable {
225225
link.provider instanceof IntegrationBase
226226
? link.provider.id
227227
: // TODO: Tighten the typing on ProviderReference to be specific to a remote provider, and then have a separate "integration" property (on autolinks and elsewhere)
228-
// that is of a new type IntegrationReference specific to integrations. Otherwise, make remote provider ids line up directly with integration ids.
229-
// Either way, this converting/casting hackery needs to go away.
230-
convertRemoteProviderIdToIntegrationId(link.provider.id as RemoteProviderId);
228+
// that is of a new type IntegrationReference specific to integrations. Otherwise, make remote provider ids line up directly with integration ids.
229+
// Either way, this converting/casting hackery needs to go away.
230+
convertRemoteProviderIdToIntegrationId(link.provider.id as RemoteProviderId);
231231
if (integrationId == null) {
232232
// Fall back to the old logic assuming that integration id might be saved as provider id.
233233
// TODO: it should be removed when we put providers and integrations in order. Conversation: https://github.com/gitkraken/vscode-gitlens/pull/3996#discussion_r1936422826
@@ -255,12 +255,12 @@ export class AutolinksProvider implements Disposable {
255255
link.descriptor ?? remote.provider.repoDesc,
256256
this.getAutolinkEnrichableId(link),
257257
{ type: link.type },
258-
)
258+
)
259259
: link.descriptor != null
260-
? linkIntegration?.getIssueOrPullRequest(link.descriptor, this.getAutolinkEnrichableId(link), {
260+
? linkIntegration?.getIssueOrPullRequest(link.descriptor, this.getAutolinkEnrichableId(link), {
261261
type: link.type,
262-
})
263-
: undefined;
262+
})
263+
: undefined;
264264
enrichedAutolinks.set(id, [issueOrPullRequestPromise, link]);
265265
}
266266

@@ -529,9 +529,9 @@ export class AutolinksProvider implements Disposable {
529529
? 'Loading...'
530530
: `${issueResult.value.title} ${GlyphChars.Dot} ${capitalize(
531531
issueResult.value.state,
532-
)}, ${fromNow(
532+
)}, ${fromNow(
533533
issueResult.value.closedDate ?? issueResult.value.createdDate,
534-
)}`
534+
)}`
535535
}`,
536536
);
537537
}

0 commit comments

Comments
 (0)