From 46d8ac9ad32046403f6e095dcb3ccf9c567e1b47 Mon Sep 17 00:00:00 2001 From: tadelesh Date: Thu, 19 Sep 2024 15:31:04 +0800 Subject: [PATCH] format --- packages/typespec-client-generator-core/src/example.ts | 4 ++-- .../typespec-client-generator-core/src/internal-utils.ts | 2 +- .../typespec-client-generator-core/src/public-utils.ts | 2 +- .../test/decorators.test.ts | 2 +- .../test/decorators/usage.test.ts | 2 +- .../test/examples/http-operation-examples.test.ts | 8 ++++---- .../test/packages/parameters.test.ts | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/typespec-client-generator-core/src/example.ts b/packages/typespec-client-generator-core/src/example.ts index 3f14295c8..e7c12cb8d 100644 --- a/packages/typespec-client-generator-core/src/example.ts +++ b/packages/typespec-client-generator-core/src/example.ts @@ -310,7 +310,7 @@ function handleHttpResponses( responseExamples.push( diagnostics.pipe( handleHttpResponse(response, statusCode, example.responses[code], relativePath), - ) + ), ); found = true; break; @@ -323,7 +323,7 @@ function handleHttpResponses( responseExamples.push( diagnostics.pipe( handleHttpResponse(response, statusCode, example.responses[code], relativePath), - ) + ), ); found = true; break; diff --git a/packages/typespec-client-generator-core/src/internal-utils.ts b/packages/typespec-client-generator-core/src/internal-utils.ts index 6909bc6eb..78e6d5e24 100644 --- a/packages/typespec-client-generator-core/src/internal-utils.ts +++ b/packages/typespec-client-generator-core/src/internal-utils.ts @@ -580,7 +580,7 @@ export function getHttpBodySpreadModel(context: TCGCContext, type: Model): Model export function isOnClient( context: TCGCContext, type: ModelProperty, - operation?: Operation + operation?: Operation, ): boolean { const namespace = operation ? getLocationOfOperation(operation) : type.model?.namespace; return ( diff --git a/packages/typespec-client-generator-core/src/public-utils.ts b/packages/typespec-client-generator-core/src/public-utils.ts index a7808e584..9bea367f7 100644 --- a/packages/typespec-client-generator-core/src/public-utils.ts +++ b/packages/typespec-client-generator-core/src/public-utils.ts @@ -488,7 +488,7 @@ function getContextPath( return dfsModelProperties( expectedType, dictOrArrayItemType, - pluralize.singular(displayName) + pluralize.singular(displayName), ); } diff --git a/packages/typespec-client-generator-core/test/decorators.test.ts b/packages/typespec-client-generator-core/test/decorators.test.ts index bd67c2aa2..890b4647b 100644 --- a/packages/typespec-client-generator-core/test/decorators.test.ts +++ b/packages/typespec-client-generator-core/test/decorators.test.ts @@ -3899,7 +3899,7 @@ describe("typespec-client-generator-core: decorators", () => { @convenientAPI(true) op op2(@path p1: string): void; } - ` + `, ); const sdkPackage = runner.context.sdkPackage; const clientAccessor = sdkPackage.clients[0].methods[0]; diff --git a/packages/typespec-client-generator-core/test/decorators/usage.test.ts b/packages/typespec-client-generator-core/test/decorators/usage.test.ts index a552b26f7..79b258b15 100644 --- a/packages/typespec-client-generator-core/test/decorators/usage.test.ts +++ b/packages/typespec-client-generator-core/test/decorators/usage.test.ts @@ -450,7 +450,7 @@ describe("typespec-client-generator-core: @usage", () => { name: string; } } - ` + `, ); const models = runner.context.sdkPackage.models; strictEqual(models.length, 2); diff --git a/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts b/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts index 34a5a0e0a..cd7f40a10 100644 --- a/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts +++ b/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts @@ -208,7 +208,7 @@ describe("typespec-client-generator-core: http operation examples", () => { ok(okResponse); deepStrictEqual( okResponse.response, - operation.responses.find((x) => x.statusCodes === 200) + operation.responses.find((x) => x.statusCodes === 200), ); ok(okResponse.bodyValue); @@ -220,7 +220,7 @@ describe("typespec-client-generator-core: http operation examples", () => { ok(createdResponse); deepStrictEqual( createdResponse.response, - operation.responses.find((x) => x.statusCodes === 201) + operation.responses.find((x) => x.statusCodes === 201), ); strictEqual(createdResponse.bodyValue, undefined); @@ -228,7 +228,7 @@ describe("typespec-client-generator-core: http operation examples", () => { deepStrictEqual( createdResponse.headers[0].header, - operation.responses.find((x) => x.statusCodes === 201)?.headers[0] + operation.responses.find((x) => x.statusCodes === 201)?.headers[0], ); strictEqual(createdResponse.headers[0].value.value, "test"); strictEqual(createdResponse.headers[0].value.kind, "string"); @@ -271,7 +271,7 @@ describe("typespec-client-generator-core: http operation examples", () => { ok(createdResponse); deepStrictEqual( createdResponse.response, - operation.responses.find((x) => x.statusCodes === 201) + operation.responses.find((x) => x.statusCodes === 201), ); strictEqual(createdResponse.bodyValue, undefined); diff --git a/packages/typespec-client-generator-core/test/packages/parameters.test.ts b/packages/typespec-client-generator-core/test/packages/parameters.test.ts index eaf62a3b5..1eb0031e8 100644 --- a/packages/typespec-client-generator-core/test/packages/parameters.test.ts +++ b/packages/typespec-client-generator-core/test/packages/parameters.test.ts @@ -44,7 +44,7 @@ describe("typespec-client-generator-core: parameters", () => { strictEqual(serviceOperation.bodyParam, undefined); strictEqual( serviceOperation.exceptions.find((x) => x.statusCodes === "*"), - undefined + undefined, ); strictEqual(serviceOperation.parameters.length, 1); @@ -152,7 +152,7 @@ describe("typespec-client-generator-core: parameters", () => { strictEqual(serviceOperation.bodyParam, undefined); strictEqual( serviceOperation.exceptions.find((x) => x.statusCodes === "*"), - undefined + undefined, ); strictEqual(serviceOperation.parameters.length, 1); @@ -231,7 +231,7 @@ describe("typespec-client-generator-core: parameters", () => { strictEqual(serviceOperation.bodyParam, undefined); strictEqual( serviceOperation.exceptions.find((x) => x.statusCodes === "*"), - undefined + undefined, ); strictEqual(serviceOperation.parameters.length, 1);