Skip to content

Commit

Permalink
Fix eslint configuration
Browse files Browse the repository at this point in the history
* Fix eslint configuration
  • Loading branch information
alexr00 authored Dec 18, 2023
1 parent e04e5fe commit 78ffad8
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion build/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ module.exports.copyrightFilter = [
'!**/*.yml',
'!**/*.md',
'!package.nls.json',
'!**/*.svg'
'!**/*.svg',
'!src/integrations/gitlens/gitlens.d.ts'
];

module.exports.tsFormattingFilter = [
Expand Down
2 changes: 1 addition & 1 deletion src/github/folderRepositoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/github/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export interface GetReviewRequestsResponse {
};
};
} | null;
};
}

export interface PullRequestState {
repository: {
Expand Down
4 changes: 2 additions & 2 deletions src/github/loggingOctokit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class RateLogger {
}

export class LoggingApolloClient {
constructor(private readonly _graphql: ApolloClient<NormalizedCacheObject>, private _rateLogger: RateLogger) { };
constructor(private readonly _graphql: ApolloClient<NormalizedCacheObject>, private _rateLogger: RateLogger) { }

query<T = any, TVariables = OperationVariables>(options: QueryOptions<TVariables>): Promise<ApolloQueryResult<T>> {
const logInfo = (options.query.definitions[0] as { name: { value: string } | undefined }).name?.value;
Expand All @@ -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<T, U>(api: (T) => Promise<U>, args: T): Promise<U> {
const logInfo = (api as unknown as { endpoint: { DEFAULTS: { url: string } | undefined } | undefined }).endpoint?.DEFAULTS?.url;
Expand Down
2 changes: 1 addition & 1 deletion src/github/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class NotificationProvider implements vscode.Disposable {
this.refreshOrLaunchPolling();
})
);
};
}

this.disposables.push(
gitHubPrsTree.onDidChangeTreeData((node) => {
Expand Down
2 changes: 1 addition & 1 deletion src/github/prComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/github/quickPicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function getItems<T extends IAccount | ITeam | ISuggestedReviewer>(context
});
}
return alreadyAssignedItems;
};
}

export async function getAssigneesQuickPickItems(folderRepositoryManager: FolderRepositoryManager, remoteName: string, alreadyAssigned: IAccount[], item?: PullRequestModel):
Promise<(vscode.QuickPickItem & { user?: IAccount })[]> {
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/gitlens/gitlens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface CreatePullRequestActionContext {
readonly name: string;
readonly provider?: RemoteProvider;
readonly url?: string;
}
}
| undefined;
}

Expand Down
6 changes: 3 additions & 3 deletions src/issues/issueFeatureRegistrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down
2 changes: 1 addition & 1 deletion src/issues/issueFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<vscode.FileChangeEvent[]> = this._onDidChangeFile.event;
watch(_uri: vscode.Uri, _options: { recursive: boolean; excludes: string[] }): vscode.Disposable {
const disposable = this.onDidChangeFile(e => {
Expand Down
2 changes: 1 addition & 1 deletion src/issues/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/view/prsTreeDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TreeNode>, BaseTreeNode, vscode.Disposable {
private _onDidChangeTreeData = new vscode.EventEmitter<TreeNode | void>();
Expand Down
2 changes: 1 addition & 1 deletion src/view/treeNodes/fileChangeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export class InMemFileChangeNode extends FileChangeNode implements vscode.TreeIt

async resolve(): Promise<void> {
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,
Expand Down

0 comments on commit 78ffad8

Please sign in to comment.