Skip to content

Commit ee591e8

Browse files
committed
Fix lint violations
1 parent 7df8905 commit ee591e8

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

extensions/ql-vscode/src/bqrs-cli-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const PAGE_SIZE = 1000;
66
* of a result column. This namespace is intentionally not an enum, see
77
* the "for the sake of extensibility" comment in messages.ts.
88
*/
9+
// eslint-disable-next-line @typescript-eslint/no-namespace
910
export namespace ColumnKindCode {
1011
export const FLOAT = "f";
1112
export const INTEGER = "i";

extensions/ql-vscode/src/definitions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class TemplateQueryDefinitionProvider implements vscode.DefinitionProvide
7474

7575
async provideDefinition(document: vscode.TextDocument, position: vscode.Position, _token: vscode.CancellationToken): Promise<vscode.LocationLink[]> {
7676
const fileLinks = await this.cache.get(document.uri.toString());
77-
let locLinks: vscode.LocationLink[] = [];
77+
const locLinks: vscode.LocationLink[] = [];
7878
for (const link of fileLinks) {
7979
if (link.originSelectionRange!.contains(position)) {
8080
locLinks.push(link);
@@ -101,7 +101,7 @@ export class TemplateQueryReferenceProvider implements vscode.ReferenceProvider
101101

102102
async provideReferences(document: vscode.TextDocument, position: vscode.Position, _context: vscode.ReferenceContext, _token: vscode.CancellationToken): Promise<vscode.Location[]> {
103103
const fileLinks = await this.cache.get(document.uri.toString());
104-
let locLinks: vscode.Location[] = [];
104+
const locLinks: vscode.Location[] = [];
105105
for (const link of fileLinks) {
106106
if (link.targetRange!.contains(position)) {
107107
locLinks.push({ range: link.originSelectionRange!, uri: link.originUri });
@@ -112,8 +112,8 @@ export class TemplateQueryReferenceProvider implements vscode.ReferenceProvider
112112
}
113113

114114
interface FileRange {
115-
file: vscode.Uri,
116-
range: vscode.Range
115+
file: vscode.Uri;
116+
range: vscode.Range;
117117
}
118118

119119
async function getLinksFromResults(results: QueryWithResults, cli: CodeQLCliServer, db: DatabaseItem, filter: (srcFile: string, destFile: string) => boolean): Promise<FullLocationLink[]> {

extensions/ql-vscode/src/discovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ export abstract class Discovery<T> extends DisposableObject {
8484
* @param results The discovery results returned by the `discover` function.
8585
*/
8686
protected abstract update(results: T): void;
87-
}
87+
}

extensions/ql-vscode/src/logging.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class OutputChannelLogger extends DisposableObject implements Logger {
6060
* function if you don't need to guarantee that the log writing is complete before
6161
* continuing.
6262
*/
63-
async log(message: string, options = { } as LogOptions): Promise<void> {
63+
async log(message: string, options = {} as LogOptions): Promise<void> {
6464
if (options.trailingNewline === undefined) {
6565
options.trailingNewline = true;
6666
}
@@ -116,7 +116,7 @@ class AdditionalLogLocation extends Disposable {
116116
super(() => { /**/ });
117117
}
118118

119-
async log(message: string, options = { } as LogOptions): Promise<void> {
119+
async log(message: string, options = {} as LogOptions): Promise<void> {
120120
if (options.trailingNewline === undefined) {
121121
options.trailingNewline = true;
122122
}

0 commit comments

Comments
 (0)