Skip to content

Commit 364b0f0

Browse files
committed
lint server libs
1 parent 648e87f commit 364b0f0

File tree

10 files changed

+32
-24
lines changed

10 files changed

+32
-24
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16-
import { HeaderBag, HttpRequest, HttpResponse } from "@smithy/protocol-http";
17-
import { QueryParameterBag } from "@smithy/types";
18-
import {
16+
import type { HeaderBag, HttpResponse } from "@smithy/protocol-http";
17+
import { HttpRequest } from "@smithy/protocol-http";
18+
import type { QueryParameterBag } from "@smithy/types";
19+
import type {
1920
APIGatewayProxyEvent,
2021
APIGatewayProxyEventHeaders,
2122
APIGatewayProxyEventMultiValueHeaders,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16-
import { HttpRequest } from "@smithy/protocol-http";
16+
import type { HttpRequest } from "@smithy/protocol-http";
1717

18-
import { Mux, ServiceCoordinate } from "..";
18+
import type { Mux, ServiceCoordinate } from "..";
1919

2020
export interface PathLiteralSegment {
2121
type: "path_literal";

smithy-typescript-ssdk-libs/server-common/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export * from "./errors";
1919
export * from "./validation";
2020
export * from "./unique";
2121

22-
import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
23-
import { SerdeContext } from "@smithy/types";
22+
import type { HttpRequest, HttpResponse } from "@smithy/protocol-http";
23+
import type { SerdeContext } from "@smithy/types";
2424

25-
import { ServiceException } from "./errors";
25+
import type { ServiceException } from "./errors";
2626

2727
export type Operation<I, O, Context = {}> = (input: I, context: Context) => Promise<O>;
2828

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
import * as util from "util";
1717

18-
import { findDuplicates, Input } from "./unique";
18+
import type { Input } from "./unique";
19+
import { findDuplicates } from "./unique";
1920

2021
describe("findDuplicates", () => {
2122
describe("finds duplicates in", () => {

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16-
import {
16+
import type {
1717
EnumValidationFailure,
18-
generateValidationMessage,
1918
IntegerEnumValidationFailure,
2019
LengthValidationFailure,
2120
PatternValidationFailure,
2221
RangeValidationFailure,
23-
RequiredValidationFailure,
24-
UniqueItemsValidationFailure,
22+
UniqueItemsValidationFailure} from "./index";
23+
import {
24+
generateValidationMessage,
25+
RequiredValidationFailure
2526
} from "./index";
2627

2728
describe("message formatting", () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16-
import { ServiceException } from "../errors";
16+
import type { ServiceException } from "../errors";
1717

1818
export * from "./validators";
1919

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16+
import type {
17+
SingleConstraintValidator} from "./validators";
1618
import {
1719
CompositeValidator,
1820
EnumValidator,
@@ -21,7 +23,6 @@ import {
2123
PatternValidator,
2224
RangeValidator,
2325
SensitiveConstraintValidator,
24-
SingleConstraintValidator,
2526
UniqueItemsValidator,
2627
} from "./validators";
2728

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@
1616
import { RE2 } from "re2-wasm";
1717

1818
import { findDuplicates } from "../unique";
19-
import {
19+
import type {
2020
EnumValidationFailure,
2121
IntegerEnumValidationFailure,
2222
LengthValidationFailure,
2323
PatternValidationFailure,
2424
RangeValidationFailure,
25-
RequiredValidationFailure,
2625
UniqueItemsValidationFailure,
27-
ValidationFailure,
26+
ValidationFailure} from ".";
27+
import {
28+
RequiredValidationFailure
2829
} from ".";
2930

3031
export class CompositeValidator<T> implements MultiConstraintValidator<T> {

smithy-typescript-ssdk-libs/server-node/src/index.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
*/
55

66
import { mkdtemp } from "fs/promises";
7-
import { createServer, IncomingMessage, request, RequestOptions, Server, ServerResponse } from "http";
7+
import type { IncomingMessage, RequestOptions, Server, ServerResponse } from "http";
8+
import { createServer, request } from "http";
89
import * as os from "os";
910
import * as path from "path";
10-
import { Readable } from "stream";
11+
import type { Readable } from "stream";
1112

1213
import { convertRequest } from "./node";
1314

smithy-typescript-ssdk-libs/server-node/src/node.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { HeaderBag, HttpRequest, HttpResponse } from "@smithy/protocol-http";
7-
import { QueryParameterBag } from "@smithy/types";
8-
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "http";
9-
import { URL, URLSearchParams } from "url";
6+
import type { HeaderBag, HttpResponse } from "@smithy/protocol-http";
7+
import { HttpRequest } from "@smithy/protocol-http";
8+
import type { QueryParameterBag } from "@smithy/types";
9+
import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "http";
10+
import type { URLSearchParams } from "url";
11+
import { URL } from "url";
1012

1113
function convertHeaders(headers: IncomingHttpHeaders): HeaderBag {
1214
// TODO make this proper

0 commit comments

Comments
 (0)