Skip to content

Commit 97c1c11

Browse files
Run eslint autofix
1 parent 02693e6 commit 97c1c11

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

smithy-typescript-ssdk-libs/server-apigateway/src/lambda.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import { HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";
1717
import { HeaderBag, QueryParameterBag } from "@aws-sdk/types";
1818
import {
19-
APIGatewayProxyEventV2,
20-
APIGatewayProxyResultV2,
2119
APIGatewayProxyEventHeaders,
2220
APIGatewayProxyEventQueryStringParameters,
21+
APIGatewayProxyEventV2,
22+
APIGatewayProxyResultV2,
2323
} from "aws-lambda";
2424
import { Readable } from "stream";
2525

smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
import { HttpRequest } from "@aws-sdk/protocol-http";
17+
1718
import { HttpBindingMux, UriSpec } from ".";
1819

1920
describe("simple matching", () => {

smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
import { HttpRequest } from "@aws-sdk/types";
17+
1718
import { Mux, ServiceCoordinate } from "..";
1819

1920
export interface PathLiteralSegment {
@@ -74,7 +75,7 @@ export class UriSpec<S extends string, O extends string> {
7475
return false;
7576
}
7677

77-
let requestPathSegments = req.path.split("/").filter((s) => s.length > 0);
78+
const requestPathSegments = req.path.split("/").filter((s) => s.length > 0);
7879

7980
let requestPathIdx = 0;
8081
path_loop: for (let i = 0; i < this.pathSegments.length; i++) {
@@ -94,7 +95,7 @@ export class UriSpec<S extends string, O extends string> {
9495
}
9596
let matched = false;
9697
if (i < this.pathSegments.length - 1) {
97-
let nextSegment = this.pathSegments[i + 1];
98+
const nextSegment = this.pathSegments[i + 1];
9899
while (!matched && ++requestPathIdx < requestPathSegments.length) {
99100
if (this.matchesSegment(requestPathSegments[requestPathIdx], nextSegment)) {
100101
matched = true;

smithy-typescript-ssdk-libs/server-common/src/validation/validators.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export class CompositeValidator<T> implements MultiConstraintValidator<T> {
3131
}
3232

3333
validate(input: T | undefined | null, memberName: string): ValidationFailure[] {
34-
let retVal: ValidationFailure[] = [];
35-
for (let v of this.validators) {
36-
let failure = v.validate(input, memberName);
34+
const retVal: ValidationFailure[] = [];
35+
for (const v of this.validators) {
36+
const failure = v.validate(input, memberName);
3737
if (failure) {
3838
retVal.push(failure);
3939
}
@@ -52,7 +52,7 @@ export class CompositeStructureValidator<T> implements MultiConstraintValidator<
5252
}
5353

5454
validate(input: T | undefined | null, memberName: string): ValidationFailure[] {
55-
let retVal: ValidationFailure[] = [];
55+
const retVal: ValidationFailure[] = [];
5656
retVal.push(...this.referenceValidator.validate(input, memberName));
5757
if (input !== null && input !== undefined) {
5858
retVal.push(...this.structureValidator(input));
@@ -71,10 +71,10 @@ export class CompositeCollectionValidator<T> implements MultiConstraintValidator
7171
}
7272

7373
validate(input: Iterable<T> | undefined | null, memberName: string): ValidationFailure[] {
74-
let retVal: ValidationFailure[] = [];
74+
const retVal: ValidationFailure[] = [];
7575
retVal.push(...this.referenceValidator.validate(input, memberName));
7676
if (input !== null && input !== undefined) {
77-
for (let member of input) {
77+
for (const member of input) {
7878
retVal.push(...this.memberValidator.validate(member, memberName));
7979
}
8080
}
@@ -98,7 +98,7 @@ export class CompositeMapValidator<T> implements MultiConstraintValidator<{ [key
9898
}
9999

100100
validate(input: { [key: string]: T } | undefined | null, memberName: string): ValidationFailure[] {
101-
let retVal: ValidationFailure[] = [];
101+
const retVal: ValidationFailure[] = [];
102102
retVal.push(...this.referenceValidator.validate(input, memberName));
103103
if (input !== null && input !== undefined) {
104104
Object.keys(input).forEach((key) => {
@@ -278,9 +278,9 @@ export class UniqueItemsValidator implements SingleConstraintValidator<Array<any
278278
return null;
279279
}
280280

281-
let repeats = new Set<any>();
282-
let uniqueValues = new Set<any>();
283-
for (let i of input) {
281+
const repeats = new Set<any>();
282+
const uniqueValues = new Set<any>();
283+
for (const i of input) {
284284
if (uniqueValues.has(i)) {
285285
repeats.add(i);
286286
} else {

0 commit comments

Comments
 (0)