diff --git a/.eslintrc.base.json b/.eslintrc.base.json index a7050ca37b..cc0dacb53d 100644 --- a/.eslintrc.base.json +++ b/.eslintrc.base.json @@ -8,7 +8,7 @@ "plugin:@typescript-eslint/recommended-requiring-type-checking", "plugin:import/errors", "plugin:import/warnings", - "plugin:import/typescript", + "plugin:import/typescript" ], "parser": "@typescript-eslint/parser", "parserOptions": { diff --git a/build/filters.js b/build/filters.js index 310fd2536d..f716c2bcc7 100644 --- a/build/filters.js +++ b/build/filters.js @@ -60,7 +60,8 @@ module.exports.copyrightFilter = [ '!**/*.yml', '!**/*.md', '!package.nls.json', - '!**/*.svg' + '!**/*.svg', + '!src/integrations/gitlens/gitlens.d.ts' ]; module.exports.tsFormattingFilter = [ diff --git a/src/github/folderRepositoryManager.ts b/src/github/folderRepositoryManager.ts index b91e94c060..04ff68402e 100644 --- a/src/github/folderRepositoryManager.ts +++ b/src/github/folderRepositoryManager.ts @@ -1316,7 +1316,7 @@ export class FolderRepositoryManager implements vscode.Disposable { } } count++; - } while (message === '' && commit && count < 5) + } while (message === '' && commit && count < 5); Logger.debug(`Git tip message for branch ${branch} - done`, this.id); diff --git a/src/github/graphql.ts b/src/github/graphql.ts index 85514d3f50..9a142b745d 100644 --- a/src/github/graphql.ts +++ b/src/github/graphql.ts @@ -279,7 +279,7 @@ export interface GetReviewRequestsResponse { }; }; } | null; -}; +} export interface PullRequestState { repository: { diff --git a/src/github/loggingOctokit.ts b/src/github/loggingOctokit.ts index e0126f64fb..56a98e33d5 100644 --- a/src/github/loggingOctokit.ts +++ b/src/github/loggingOctokit.ts @@ -103,7 +103,7 @@ export class RateLogger { } export class LoggingApolloClient { - constructor(private readonly _graphql: ApolloClient, private _rateLogger: RateLogger) { }; + constructor(private readonly _graphql: ApolloClient, private _rateLogger: RateLogger) { } query(options: QueryOptions): Promise> { const logInfo = (options.query.definitions[0] as { name: { value: string } | undefined }).name?.value; @@ -127,7 +127,7 @@ export class LoggingApolloClient { } export class LoggingOctokit { - constructor(public readonly api: Octokit, private _rateLogger: RateLogger) { }; + constructor(public readonly api: Octokit, private _rateLogger: RateLogger) { } async call(api: (T) => Promise, args: T): Promise { const logInfo = (api as unknown as { endpoint: { DEFAULTS: { url: string } | undefined } | undefined }).endpoint?.DEFAULTS?.url; diff --git a/src/github/notifications.ts b/src/github/notifications.ts index e7594983e2..6d4122c0c4 100644 --- a/src/github/notifications.ts +++ b/src/github/notifications.ts @@ -80,7 +80,7 @@ export class NotificationProvider implements vscode.Disposable { this.refreshOrLaunchPolling(); }) ); - }; + } this.disposables.push( gitHubPrsTree.onDidChangeTreeData((node) => { diff --git a/src/github/prComment.ts b/src/github/prComment.ts index f63a16033e..a57a5b742f 100644 --- a/src/github/prComment.ts +++ b/src/github/prComment.ts @@ -325,7 +325,7 @@ ${args[2] ?? ''} return body; } - const expression = new RegExp(`https://github.com/${this.githubRepository.remote.owner}/${this.githubRepository.remote.repositoryName}/blob/([0-9a-f]{40})/(.*)#L([0-9]+)(-L([0-9]+))?`, 'g'); + const expression = new RegExp(`https://github.com/${githubRepository.remote.owner}/${githubRepository.remote.repositoryName}/blob/([0-9a-f]{40})/(.*)#L([0-9]+)(-L([0-9]+))?`, 'g'); return stringReplaceAsync(body, expression, async (match: string, sha: string, file: string, start: string, _endGroup?: string, end?: string, index?: number) => { if (index && (index > 0) && (body.charAt(index - 1) === '(')) { return match; diff --git a/src/github/quickPicks.ts b/src/github/quickPicks.ts index 0fb02e8eb1..056532b228 100644 --- a/src/github/quickPicks.ts +++ b/src/github/quickPicks.ts @@ -52,7 +52,7 @@ async function getItems(context }); } return alreadyAssignedItems; -}; +} export async function getAssigneesQuickPickItems(folderRepositoryManager: FolderRepositoryManager, remoteName: string, alreadyAssigned: IAccount[], item?: PullRequestModel): Promise<(vscode.QuickPickItem & { user?: IAccount })[]> { diff --git a/src/integrations/gitlens/gitlens.d.ts b/src/integrations/gitlens/gitlens.d.ts index f927e13712..531a68d1c0 100644 --- a/src/integrations/gitlens/gitlens.d.ts +++ b/src/integrations/gitlens/gitlens.d.ts @@ -23,7 +23,7 @@ export interface CreatePullRequestActionContext { readonly name: string; readonly provider?: RemoteProvider; readonly url?: string; - } + } | undefined; } diff --git a/src/issues/issueFeatureRegistrar.ts b/src/issues/issueFeatureRegistrar.ts index 05ae5ddda4..2c728264ee 100644 --- a/src/issues/issueFeatureRegistrar.ts +++ b/src/issues/issueFeatureRegistrar.ts @@ -1134,9 +1134,9 @@ ${body ?? ''}\n } private getDataFromTemplate(template: string): IssueTemplate { - const title = template.match(/title:\s*(.*)/)?.[1]?.replace(/^["']|["']$/g, '');; - const name = template.match(/name:\s*(.*)/)?.[1]?.replace(/^["']|["']$/g, '');; - const about = template.match(/about:\s*(.*)/)?.[1]?.replace(/^["']|["']$/g, '');; + const title = template.match(/title:\s*(.*)/)?.[1]?.replace(/^["']|["']$/g, ''); + const name = template.match(/name:\s*(.*)/)?.[1]?.replace(/^["']|["']$/g, ''); + const about = template.match(/about:\s*(.*)/)?.[1]?.replace(/^["']|["']$/g, ''); const body = template.match(/---([\s\S]*)---([\s\S]*)/)?.[2]; return { title, name, about, body }; } diff --git a/src/issues/issueFile.ts b/src/issues/issueFile.ts index 1fb4252d66..4003aed743 100644 --- a/src/issues/issueFile.ts +++ b/src/issues/issueFile.ts @@ -30,7 +30,7 @@ export class IssueFileSystemProvider implements vscode.FileSystemProvider { vscode.FileChangeEvent[] >(); - constructor(private readonly cache: NewIssueCache) { }; + constructor(private readonly cache: NewIssueCache) { } onDidChangeFile: vscode.Event = this._onDidChangeFile.event; watch(_uri: vscode.Uri, _options: { recursive: boolean; excludes: string[] }): vscode.Disposable { const disposable = this.onDidChangeFile(e => { diff --git a/src/issues/util.ts b/src/issues/util.ts index cc88c4d4ef..0a77f9e23f 100644 --- a/src/issues/util.ts +++ b/src/issues/util.ts @@ -9,7 +9,7 @@ import * as marked from 'marked'; import 'url-search-params-polyfill'; import * as vscode from 'vscode'; import { gitHubLabelColor } from '../../src/common/utils'; -import { Commit, Ref, Remote, Repository, UpstreamRef } from '../api/api'; +import { Ref, Remote, Repository, UpstreamRef } from '../api/api'; import { GitApiImpl } from '../api/api1'; import Logger from '../common/logger'; import { Protocol } from '../common/protocol'; diff --git a/src/view/prsTreeDataProvider.ts b/src/view/prsTreeDataProvider.ts index b98bc764a3..6255bfebba 100644 --- a/src/view/prsTreeDataProvider.ts +++ b/src/view/prsTreeDataProvider.ts @@ -23,8 +23,8 @@ import { DecorationProvider } from './treeDecorationProvider'; import { CategoryTreeNode, PRCategoryActionNode, PRCategoryActionType } from './treeNodes/categoryNode'; import { InMemFileChangeNode } from './treeNodes/fileChangeNode'; import { BaseTreeNode, EXPANDED_QUERIES_STATE, TreeNode } from './treeNodes/treeNode'; -import { WorkspaceFolderNode } from './treeNodes/workspaceFolderNode'; import { TreeUtils } from './treeNodes/treeUtils'; +import { WorkspaceFolderNode } from './treeNodes/workspaceFolderNode'; export class PullRequestsTreeDataProvider implements vscode.TreeDataProvider, BaseTreeNode, vscode.Disposable { private _onDidChangeTreeData = new vscode.EventEmitter(); diff --git a/src/view/treeNodes/fileChangeNode.ts b/src/view/treeNodes/fileChangeNode.ts index 29ec9bb098..1b2b8ab4c3 100644 --- a/src/view/treeNodes/fileChangeNode.ts +++ b/src/view/treeNodes/fileChangeNode.ts @@ -285,7 +285,7 @@ export class InMemFileChangeNode extends FileChangeNode implements vscode.TreeIt async resolve(): Promise { if (this.status === GitChangeType.ADD) { - this.command = await openFileCommand(this.changeModel.filePath); + this.command = openFileCommand(this.changeModel.filePath); } else { this.command = await openDiffCommand( this.folderRepositoryManager,