Skip to content

Commit 78a22ee

Browse files
committed
fixing linter warnings
1 parent 14c7fc5 commit 78a22ee

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

src/Documents/Commands/MultiGet/MultiGetCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class MultiGetCommand extends RavenCommand<GetResponse[]> implements IDis
238238
// (include the IP and port of the old node), because of that the client
239239
// needs to get those docs again from the new node.
240240

241-
for (let command of this._commands) {
241+
for (const command of this._commands) {
242242
delete command.headers[HEADERS.IF_NONE_MATCH];
243243
}
244244
}

src/Documents/Identity/HiloIdGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class HiloIdGenerator {
5151
// local range is not exhausted yet
5252
const range = this._range;
5353

54-
let id = range.increment();
54+
const id = range.increment();
5555
if (id <= range.maxId) {
5656
return id;
5757
}

src/Documents/Session/AbstractDocumentQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ export abstract class AbstractDocumentQuery<T extends object, TSelf extends Abst
23812381
this._revisionsIncludesTokens = [];
23822382
}
23832383

2384-
for (let changeVector of revisionsToIncludeByChangeVector) {
2384+
for (const changeVector of revisionsToIncludeByChangeVector) {
23852385
this._revisionsIncludesTokens.push(RevisionIncludesToken.createForPath(changeVector));
23862386
}
23872387
}

src/Documents/Session/Tokens/WhereToken.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,17 @@ export class WhereToken extends QueryToken {
161161
}
162162

163163
public writeTo(writer): void {
164+
// tslint:disable-next-line:triple-equals
164165
if (this.options.boost != null) {
165166
writer.append("boost(");
166167
}
167168

169+
// tslint:disable-next-line:triple-equals
168170
if (this.options.fuzzy != null) {
169171
writer.append("fuzzy(");
170172
}
171173

174+
// tslint:disable-next-line:triple-equals
172175
if (this.options.proximity != null) {
173176
writer.append("proximity(");
174177
}
@@ -216,20 +219,23 @@ export class WhereToken extends QueryToken {
216219
writer.append(")");
217220
}
218221

222+
// tslint:disable-next-line:triple-equals
219223
if (this.options.proximity != null) {
220224
writer
221225
.append(", ")
222226
.append(this.options.proximity)
223227
.append(")");
224228
}
225229

230+
// tslint:disable-next-line:triple-equals
226231
if (this.options.fuzzy != null) {
227232
writer
228233
.append(", ")
229234
.append(this.options.fuzzy)
230235
.append(")");
231236
}
232237

238+
// tslint:disable-next-line:triple-equals
233239
if (this.options.boost != null) {
234240
writer
235241
.append(", ")

src/Documents/Subscriptions/SubscriptionWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export class SubscriptionWorker<T extends object> implements IDisposable {
315315
if (connectionStatus.type !== "ConnectionStatus") {
316316
let message = "Server returned illegal type message when expecting connection status, was:" + connectionStatus.type;
317317

318-
if (connectionStatus.type == "Error") {
318+
if (connectionStatus.type === "Error") {
319319
message += ". Exception: " + connectionStatus.exception;
320320
}
321321
throwError("InvalidOperationException", message);

src/Mapping/MetadataAsDictionary.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class MetadataInternal {
4343
}
4444

4545
private _metadataConvertValue(key, val) {
46+
// tslint:disable-next-line:triple-equals
4647
if (val == null) {
4748
return null;
4849
}

src/Utility/TcpUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class TcpUtils {
7070
for (const url of info.urls) {
7171
try {
7272
const socket = await this.connect(url, serverCertificate, clientCertificate);
73-
const supportedFeatures = await this.invokeNegotiation(info, operationType, negotiationCallback, url, socket);
73+
const supportedFeatures = await this._invokeNegotiation(info, operationType, negotiationCallback, url, socket);
7474
return new ConnectSecuredTcpSocketResult(url, socket, supportedFeatures);
7575
} catch {
7676
// ignored
@@ -79,11 +79,11 @@ export class TcpUtils {
7979
}
8080

8181
const socket = await this.connect(info.url, serverCertificate, clientCertificate);
82-
const supportedFeatures = await this.invokeNegotiation(info, operationType, negotiationCallback, info.url, socket);
82+
const supportedFeatures = await this._invokeNegotiation(info, operationType, negotiationCallback, info.url, socket);
8383
return new ConnectSecuredTcpSocketResult(info.url, socket, supportedFeatures);
8484
}
8585

86-
private static invokeNegotiation(info: TcpConnectionInfo, operationType: OperationTypes, negotiationCallback: NegotiationCallback, url: string, socket: Socket) {
86+
private static _invokeNegotiation(info: TcpConnectionInfo, operationType: OperationTypes, negotiationCallback: NegotiationCallback, url: string, socket: Socket) {
8787
switch (operationType) {
8888
case "Subscription":
8989
return negotiationCallback(url, info, socket);

test/Documents/Commands/PutDocumentCommandTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("PutDocumentCommand", function () {
5353
user.name = nameWithEmojis;
5454
user.age = 31;
5555

56-
let node = store.conventions.objectMapper.toObjectLiteral(user);
56+
const node = store.conventions.objectMapper.toObjectLiteral(user);
5757

5858
const command = new PutDocumentCommand("users/2", null, node);
5959
await store.getRequestExecutor().execute(command);

test/Ported/HiLoTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe("HiLo", function () {
252252
const usersIds = new Map<number, boolean>();
253253
const productsIds = new Map<number, boolean>();
254254

255-
let count = 10;
255+
const count = 10;
256256
const tasks: Promise<void>[] = [];
257257

258258
for (let i = 0; i < count; i++) {

0 commit comments

Comments
 (0)