From b0a9b4a5980b8ab4c6011cea5d169fd9ac62c1da Mon Sep 17 00:00:00 2001 From: yasuaki640 Date: Wed, 8 Jan 2025 23:09:38 +0900 Subject: [PATCH] add no extra semi rule --- .../@aws-cdk-testing/cli-integ/lib/github.ts | 2 +- .../cli-integ/lib/integ-test.ts | 2 +- .../lib/identitypool-role-attachment.ts | 2 +- .../cloudformation-diff/lib/diff/util.ts | 2 +- .../lib/assertions/http-call.ts | 2 +- .../test/assertions/deploy-assert.test.ts | 2 +- .../test/manifest-writer.test.ts | 2 +- .../@aws-cdk/toolkit/lib/actions/deploy.ts | 6 ++--- packages/aws-cdk-lib/assertions/lib/match.ts | 2 +- .../assertions/lib/private/messages.ts | 2 +- .../assertions/test/annotations.test.ts | 2 +- .../aws-apigatewayv2/lib/http/route.ts | 2 +- .../aws-apigatewayv2/lib/parameter-mapping.ts | 2 +- .../aws-appmesh/lib/shared-interfaces.ts | 2 +- .../aws-cdk-lib/aws-appsync/lib/graphqlapi.ts | 2 +- .../aws-cdk-lib/aws-appsync/lib/schema.ts | 2 +- .../aws-batch/lib/ecs-container-definition.ts | 4 ++-- .../aws-batch/lib/eks-container-definition.ts | 2 +- .../aws-certificatemanager/lib/certificate.ts | 2 +- .../lib/s3-bucket-origin.ts | 6 ++--- .../aws-cdk-lib/aws-cloudwatch/lib/alarm.ts | 2 +- .../aws-cdk-lib/aws-cloudwatch/lib/metric.ts | 6 ++--- .../aws-codebuild/lib/build-spec.ts | 2 +- .../aws-cdk-lib/aws-codebuild/lib/project.ts | 4 ++-- ...ormation-stackset-pipeline-actions.test.ts | 4 ++-- .../aws-codepipeline/test/pipeline.test.ts | 4 ++-- .../aws-codepipeline/test/triggers.test.ts | 10 ++++---- .../aws-cognito/lib/user-pool-client.ts | 2 +- packages/aws-cdk-lib/aws-config/lib/rule.ts | 2 +- .../aws-ec2/lib/launch-template.ts | 6 ++--- .../aws-cdk-lib/aws-ec2/lib/prefix-list.ts | 6 ++--- .../aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts | 4 ++-- .../aws-cdk-lib/aws-ec2/test/cfn-init.test.ts | 2 +- .../aws-ec2/test/ip-addresses.test.ts | 4 ++-- .../aws-ec2/test/security-group.test.ts | 2 +- .../aws-ecs/lib/base/base-service.ts | 4 ++-- .../aws-ecs/lib/base/task-definition.ts | 4 ++-- packages/aws-cdk-lib/aws-eks/lib/cluster.ts | 4 ++-- .../aws-eks/lib/managed-nodegroup.ts | 2 +- .../aws-eks/lib/service-account.ts | 2 +- packages/aws-cdk-lib/aws-eks/test/util.ts | 4 ++-- .../test/alb/listener.test.ts | 2 +- .../aws-elasticsearch/lib/domain.ts | 14 +++++------ .../aws-events-targets/lib/ecs-task.ts | 2 +- .../aws-events-targets/lib/log-group.ts | 2 +- .../aws-iam/test/managed-policy.test.ts | 6 ++--- .../aws-cdk-lib/aws-iam/test/policy.test.ts | 6 ++--- .../aws-cdk-lib/aws-lambda-nodejs/lib/util.ts | 2 +- .../aws-cdk-lib/aws-lambda/lib/function.ts | 8 +++---- .../aws-lambda/lib/singleton-lambda.ts | 2 +- .../aws-logs/lib/data-protection-policy.ts | 2 +- .../aws-opensearchservice/lib/domain.ts | 16 ++++++------- .../lib/vpc-endpoint-service-domain-name.ts | 2 +- .../aws-servicecatalog/lib/portfolio.ts | 2 +- .../lib/private/association-manager.ts | 2 +- .../aws-servicecatalog/lib/product.ts | 2 +- .../aws-cdk-lib/aws-sns/lib/subscription.ts | 2 +- packages/aws-cdk-lib/aws-sns/lib/topic.ts | 2 +- .../lib/athena/start-query-execution.ts | 2 +- .../lib/bedrock/invoke-model.ts | 2 +- .../emrcontainers/create-virtual-cluster.ts | 2 +- .../emrcontainers/delete-virtual-cluster.ts | 2 +- .../test/emrcontainers/start-job-run.test.ts | 2 +- .../aws-cdk-lib/core/lib/asset-staging.ts | 6 ++--- .../aws-cdk-lib/core/lib/private/synthesis.ts | 2 +- .../aws-cdk-lib/core/test/bundling.test.ts | 2 +- .../aws-cdk-lib/core/test/fs/utils.test.ts | 24 +++++++++---------- .../core/test/metadata-resource.test.ts | 2 +- .../aws-cdk-lib/cx-api/lib/cloud-assembly.ts | 2 +- .../cx-api/lib/private/flag-modeling.ts | 4 ++-- .../lib/codepipeline/codepipeline.ts | 2 +- .../pipelines/lib/docker-credentials.ts | 2 +- .../test/codepipeline/codepipeline.test.ts | 4 ++-- .../aws-cdk-lib/region-info/lib/default.ts | 2 +- packages/aws-cdk/lib/cdk-toolkit.ts | 4 ++-- packages/aws-cdk/lib/init-hooks.ts | 2 +- packages/aws-cdk/lib/util/work-graph-types.ts | 2 +- packages/aws-cdk/test/list-stacks.test.ts | 2 +- .../cdk-build-tools/config/eslintrc.js | 1 + tools/@aws-cdk/cdk-release/lib/index.ts | 2 +- tools/@aws-cdk/cdk-release/lib/types.ts | 2 +- 81 files changed, 141 insertions(+), 140 deletions(-) diff --git a/packages/@aws-cdk-testing/cli-integ/lib/github.ts b/packages/@aws-cdk-testing/cli-integ/lib/github.ts index 0a0c743bed8f8..a6e195926fa08 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/github.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/github.ts @@ -40,4 +40,4 @@ export async function fetchPreviousVersion(token: string, options?: { if (previousMVRelease) { return previousMVRelease; } throw new Error(`Unable to find previous version given ${JSON.stringify(options)}`); -}; +} diff --git a/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts index b4655461b5f57..b47ddb2f61e19 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts @@ -15,7 +15,7 @@ export interface TestContext { readonly randomString: string; readonly output: NodeJS.WritableStream; log(s: string): void; -}; +} if (process.env.JEST_TEST_CONCURRENT === 'true') { process.stderr.write('ℹ️ JEST_TEST_CONCURRENT is true: tests will run concurrently and filters have no effect!\n0'); diff --git a/packages/@aws-cdk/aws-cognito-identitypool-alpha/lib/identitypool-role-attachment.ts b/packages/@aws-cdk/aws-cognito-identitypool-alpha/lib/identitypool-role-attachment.ts index 06643535abc19..f86659ec8ae69 100644 --- a/packages/@aws-cdk/aws-cognito-identitypool-alpha/lib/identitypool-role-attachment.ts +++ b/packages/@aws-cdk/aws-cognito-identitypool-alpha/lib/identitypool-role-attachment.ts @@ -200,7 +200,7 @@ export class IdentityPoolRoleAttachment extends Resource implements IIdentityPoo }; }), }; - }; + } acc[mappingKey] = roleMapping; return acc; }, {} as { [name:string]: CfnIdentityPoolRoleAttachment.RoleMappingProperty }); diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts index 1c320996e6c5b..49053bb2b5f51 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts @@ -49,7 +49,7 @@ export function deepEqual(lvalue: any, rvalue: any): boolean { for (const key of keys) { if (!rvalue.hasOwnProperty(key)) { return false; } if (key === 'DependsOn') { - if (!dependsOnEqual(lvalue[key], rvalue[key])) { return false; }; + if (!dependsOnEqual(lvalue[key], rvalue[key])) { return false; } // check differences other than `DependsOn` continue; } diff --git a/packages/@aws-cdk/integ-tests-alpha/lib/assertions/http-call.ts b/packages/@aws-cdk/integ-tests-alpha/lib/assertions/http-call.ts index 2d5a33f7e1ccd..f2e99d2481d47 100644 --- a/packages/@aws-cdk/integ-tests-alpha/lib/assertions/http-call.ts +++ b/packages/@aws-cdk/integ-tests-alpha/lib/assertions/http-call.ts @@ -64,5 +64,5 @@ export class HttpApiCall extends ApiCallBase { this.stateMachineArn = waiter.stateMachineArn; this.provider.addPolicyStatementFromSdkCall('states', 'StartExecution'); return this; - }; + } } diff --git a/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts b/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts index 5f6bbf064b2f2..d8f07b339d5dd 100644 --- a/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts +++ b/packages/@aws-cdk/integ-tests-alpha/test/assertions/deploy-assert.test.ts @@ -222,7 +222,7 @@ describe('DeployAssert', () => { const deplossert = new DeployAssert(app); deplossert.awsApiCall('@aws-sdk/client-ssm', 'GetParameterCommand').expect( ExpectedResult.objectLike({}), - );; + ); // THEN const template = Template.fromStack(deplossert.scope); diff --git a/packages/@aws-cdk/integ-tests-alpha/test/manifest-writer.test.ts b/packages/@aws-cdk/integ-tests-alpha/test/manifest-writer.test.ts index b47a1c27a8d7b..7df0b78b3ac81 100644 --- a/packages/@aws-cdk/integ-tests-alpha/test/manifest-writer.test.ts +++ b/packages/@aws-cdk/integ-tests-alpha/test/manifest-writer.test.ts @@ -59,4 +59,4 @@ function deleteFolderRecursive(directoryPath: string) { }); fs.rmdirSync(directoryPath); } -}; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/deploy.ts b/packages/@aws-cdk/toolkit/lib/actions/deploy.ts index 6018ae37a6fe4..1d06a6b3c95a0 100644 --- a/packages/@aws-cdk/toolkit/lib/actions/deploy.ts +++ b/packages/@aws-cdk/toolkit/lib/actions/deploy.ts @@ -81,21 +81,21 @@ export class StackParameters { */ public static onlyExisting() { return new StackParameters({}, true); - }; + } /** * Use exactly these parameters and remove any other existing parameters from the stack. */ public static exactly(params: { [name: string]: string | undefined }) { return new StackParameters(params, false); - }; + } /** * Define additional parameters for the stack, while keeping existing parameters for unspecified values. */ public static withExisting(params: { [name: string]: string | undefined }) { return new StackParameters(params, true); - }; + } public readonly parameters: Map; public readonly keepExistingParameters: boolean; diff --git a/packages/aws-cdk-lib/assertions/lib/match.ts b/packages/aws-cdk-lib/assertions/lib/match.ts index c7ea80ad91dba..539a634ff834c 100644 --- a/packages/aws-cdk-lib/assertions/lib/match.ts +++ b/packages/aws-cdk-lib/assertions/lib/match.ts @@ -387,7 +387,7 @@ class SerializedJson extends Matcher { private readonly pattern: any, ) { super(); - }; + } public test(actual: any): MatchResult { if (getType(actual) !== 'string') { diff --git a/packages/aws-cdk-lib/assertions/lib/private/messages.ts b/packages/aws-cdk-lib/assertions/lib/private/messages.ts index e90d3aa835f5b..c6f29748a7f20 100644 --- a/packages/aws-cdk-lib/assertions/lib/private/messages.ts +++ b/packages/aws-cdk-lib/assertions/lib/private/messages.ts @@ -46,7 +46,7 @@ export function hasNoMessage(messages: Messages, constructPath: string, props: a function redactTraces(match: any, redact: boolean = true): void { if (redact && match.entry?.trace !== undefined) { match.entry.trace = 'redacted'; - }; + } } function filterPath(section: { [key: string]: SynthesisMessage }, path: string): { [key: string]: SynthesisMessage } { diff --git a/packages/aws-cdk-lib/assertions/test/annotations.test.ts b/packages/aws-cdk-lib/assertions/test/annotations.test.ts index 64f04d337ec93..e10075103e0ae 100644 --- a/packages/aws-cdk-lib/assertions/test/annotations.test.ts +++ b/packages/aws-cdk-lib/assertions/test/annotations.test.ts @@ -206,7 +206,7 @@ class MyAspect implements IAspect { this.info(node, 'this is an info'); } } - }; + } protected warn(node: IConstruct, message: string): void { // Use construct ID as suppression string, just to make it unique easily diff --git a/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/route.ts b/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/route.ts index 0c82e6597f1e3..39d713e735839 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/route.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/route.ts @@ -237,7 +237,7 @@ export class HttpRoute extends Resource implements IHttpRoute { // path variable and all that follows with a wildcard. if (path.length > 1000) { throw new Error(`Path is too long: ${path}`); - }; + } const iamPath = path.replace(/\{.*?\}.*/, '*'); return `arn:${Aws.PARTITION}:execute-api:${this.env.region}:${this.env.account}:${this.httpApi.apiId}/${stage}/${iamHttpMethod}${iamPath}`; diff --git a/packages/aws-cdk-lib/aws-apigatewayv2/lib/parameter-mapping.ts b/packages/aws-cdk-lib/aws-apigatewayv2/lib/parameter-mapping.ts index 5b3c48806ab86..07336085cbf1c 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2/lib/parameter-mapping.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2/lib/parameter-mapping.ts @@ -6,7 +6,7 @@ export interface IMappingValue { * Represents a Mapping Value. */ readonly value: string; -}; +} /** * Represents a Mapping Value. diff --git a/packages/aws-cdk-lib/aws-appmesh/lib/shared-interfaces.ts b/packages/aws-cdk-lib/aws-appmesh/lib/shared-interfaces.ts index 26027c18c3a33..d6f051dd54f28 100644 --- a/packages/aws-cdk-lib/aws-appmesh/lib/shared-interfaces.ts +++ b/packages/aws-cdk-lib/aws-appmesh/lib/shared-interfaces.ts @@ -203,7 +203,7 @@ export abstract class LoggingFormat { } return new JsonLoggingFormat(jsonLoggingFormat); - }; + } /** * Called when the Access Log Format is initialized. Can be used to enforce diff --git a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts index 824240274a687..8a4442f5c6b5e 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts @@ -815,7 +815,7 @@ export class GraphqlApi extends GraphqlApiBase { public addSchemaDependency(construct: CfnResource): boolean { if (this.schemaResource) { construct.addDependency(this.schemaResource); - }; + } return true; } diff --git a/packages/aws-cdk-lib/aws-appsync/lib/schema.ts b/packages/aws-cdk-lib/aws-appsync/lib/schema.ts index fb7f82107ead7..d46df4ad6790b 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/schema.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/schema.ts @@ -52,7 +52,7 @@ export interface SchemaProps { * existing file from disk. */ readonly filePath: string; -}; +} /** * The Schema for a GraphQL Api diff --git a/packages/aws-cdk-lib/aws-batch/lib/ecs-container-definition.ts b/packages/aws-cdk-lib/aws-batch/lib/ecs-container-definition.ts index 2253cb7d4868c..5ead1cb782c35 100644 --- a/packages/aws-cdk-lib/aws-batch/lib/ecs-container-definition.ts +++ b/packages/aws-cdk-lib/aws-batch/lib/ecs-container-definition.ts @@ -926,7 +926,7 @@ export class EcsEc2ContainerDefinition extends EcsContainerDefinitionBase implem privileged: this.privileged, resourceRequirements: this._renderResourceRequirements(), }; - }; + } /** * Add a ulimit to this container @@ -1099,7 +1099,7 @@ export class EcsFargateContainerDefinition extends EcsContainerDefinitionBase im } return containerDef; - }; + } } function createExecutionRole(scope: Construct, id: string, logging: boolean): iam.IRole { diff --git a/packages/aws-cdk-lib/aws-batch/lib/eks-container-definition.ts b/packages/aws-cdk-lib/aws-batch/lib/eks-container-definition.ts index 7dfbb7b9772c3..934e7157f5521 100644 --- a/packages/aws-cdk-lib/aws-batch/lib/eks-container-definition.ts +++ b/packages/aws-cdk-lib/aws-batch/lib/eks-container-definition.ts @@ -631,7 +631,7 @@ export class EksContainerDefinition extends Construct implements IEksContainerDe }, }), }; - }; + } } /** diff --git a/packages/aws-cdk-lib/aws-certificatemanager/lib/certificate.ts b/packages/aws-cdk-lib/aws-certificatemanager/lib/certificate.ts index caaf9fd3717a0..66cdfa89b366c 100644 --- a/packages/aws-cdk-lib/aws-certificatemanager/lib/certificate.ts +++ b/packages/aws-cdk-lib/aws-certificatemanager/lib/certificate.ts @@ -141,7 +141,7 @@ export class KeyAlgorithm { * The name of the algorithm */ public readonly name: string, - ) { }; + ) { } } /** diff --git a/packages/aws-cdk-lib/aws-cloudfront-origins/lib/s3-bucket-origin.ts b/packages/aws-cdk-lib/aws-cloudfront-origins/lib/s3-bucket-origin.ts index 9ebc1bf83d78b..45ac6927b99f9 100644 --- a/packages/aws-cdk-lib/aws-cloudfront-origins/lib/s3-bucket-origin.ts +++ b/packages/aws-cdk-lib/aws-cloudfront-origins/lib/s3-bucket-origin.ts @@ -210,7 +210,7 @@ class S3BucketOriginWithOAC extends S3BucketOrigin { const result = key.addToResourcePolicy(oacKeyPolicyStatement); return result; } -}; +} class S3BucketOriginWithOAI extends S3BucketOrigin { private readonly bucket: IBucket; @@ -236,7 +236,7 @@ class S3BucketOriginWithOAI extends S3BucketOrigin { this.originAccessIdentity = new cloudfront.OriginAccessIdentity(oaiScope, oaiId, { comment: `Identity for ${options.originId}`, }); - }; + } // Used rather than `grantRead` because `grantRead` will grant overly-permissive policies. // Only GetObject is needed to retrieve objects for the distribution. // This also excludes KMS permissions; OAI only supports SSE-S3 for buckets. @@ -260,4 +260,4 @@ class S3BucketOriginWithOAI extends S3BucketOrigin { } return { originAccessIdentity: `origin-access-identity/cloudfront/${this.originAccessIdentity.originAccessIdentityId}` }; } -}; +} diff --git a/packages/aws-cdk-lib/aws-cloudwatch/lib/alarm.ts b/packages/aws-cdk-lib/aws-cloudwatch/lib/alarm.ts index d00d5eb13ccdf..5e3e3b6032355 100644 --- a/packages/aws-cdk-lib/aws-cloudwatch/lib/alarm.ts +++ b/packages/aws-cdk-lib/aws-cloudwatch/lib/alarm.ts @@ -463,7 +463,7 @@ function assertSubmetricsCount(expr: MetricExpressionConfig) { if (Object.keys(expr.usingMetrics).length > 10) { // https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-on-metric-math-expressions throw new Error('Alarms on math expressions cannot contain more than 10 individual metrics'); - }; + } } type Writeable = { -readonly [P in keyof T]: T[P] }; diff --git a/packages/aws-cdk-lib/aws-cloudwatch/lib/metric.ts b/packages/aws-cdk-lib/aws-cloudwatch/lib/metric.ts index 428598e9602b5..49efc56b06e63 100644 --- a/packages/aws-cdk-lib/aws-cloudwatch/lib/metric.ts +++ b/packages/aws-cdk-lib/aws-cloudwatch/lib/metric.ts @@ -545,14 +545,14 @@ export class Metric implements IMetric { dimsArray.map(key => { if (dims[key] === undefined || dims[key] === null) { throw new Error(`Dimension value of '${dims[key]}' is invalid`); - }; + } if (key.length < 1 || key.length > 255) { throw new Error(`Dimension name must be at least 1 and no more than 255 characters; received ${key}`); - }; + } if (dims[key].length < 1 || dims[key].length > 255) { throw new Error(`Dimension value must be at least 1 and no more than 255 characters; received ${dims[key]}`); - }; + } }); return dims; diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/build-spec.ts b/packages/aws-cdk-lib/aws-codebuild/lib/build-spec.ts index f83e33440eaa0..d5a4d18053fae 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/build-spec.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/build-spec.ts @@ -256,4 +256,4 @@ function mergeDeep(lhs: any, rhs: any): any { } return rhs; -}; +} diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts index ff6246f98b192..038220d34c85d 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts @@ -1118,8 +1118,8 @@ export class Project extends ProjectBase { if (!Token.isUnresolved(props.autoRetryLimit) && (props.autoRetryLimit !== undefined)) { if (props.autoRetryLimit < 0 || props.autoRetryLimit > 10) { throw new Error(`autoRetryLimit must be a value between 0 and 10, got ${props.autoRetryLimit}.`); - }; - }; + } + } const resource = new CfnProject(this, 'Resource', { description: props.description, diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/cloudformation/cloudformation-stackset-pipeline-actions.test.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/cloudformation/cloudformation-stackset-pipeline-actions.test.ts index cfa43a665baea..91372a2560b15 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/cloudformation/cloudformation-stackset-pipeline-actions.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/cloudformation/cloudformation-stackset-pipeline-actions.test.ts @@ -29,7 +29,7 @@ describe('StackSetAction', () => { template: cpactions.StackSetTemplate.fromArtifactPath(stack.sourceOutput.atPath('template.yaml')), parameters: cpactions.StackSetParameters.fromArtifactPath(stack.sourceOutput.atPath('parameters.json')), }; - }; + } describe('self-managed mode', () => { test('creates admin role if not specified', () => { @@ -354,7 +354,7 @@ describe('StackInstancesAction', () => { failureTolerancePercentage: 50, maxAccountConcurrencyPercentage: 25, }; - }; + } test('simple', () => { stack.deployStage.addAction(new cpactions.CloudFormationDeployStackInstancesAction({ diff --git a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts index c0c6525758b3e..621093936ec6f 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts @@ -1034,7 +1034,7 @@ function createPipelineWithSourceAndBuildStages(scope: Construct, pipelineName?: }, ], }); -}; +} interface CreatePipelineStackOptions { readonly withFeatureFlag?: boolean; @@ -1053,7 +1053,7 @@ function createPipelineStack(options: CreatePipelineStackOptions): PipelineStack pipelineName: `Actual-Pipeline-${options.suffix}`.substring(0, 100), pipelineId: options.pipelineId, }); -}; +} // Adding 2 stages with actions so pipeline validation will pass function testPipelineSetup(pipeline: codepipeline.Pipeline, sourceActions?: codepipeline.IAction[], buildActions?: codepipeline.IAction[]) { diff --git a/packages/aws-cdk-lib/aws-codepipeline/test/triggers.test.ts b/packages/aws-cdk-lib/aws-codepipeline/test/triggers.test.ts index b067891d152f1..d1ea26d14f203 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/test/triggers.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/test/triggers.test.ts @@ -823,7 +823,7 @@ describe('triggers', () => { }, }], }); - }).toThrow(/length of pushFilter for sourceAction with name 'CodeStarConnectionsSourceAction' must be less than or equal to 3, got 4/);; + }).toThrow(/length of pushFilter for sourceAction with name 'CodeStarConnectionsSourceAction' must be less than or equal to 3, got 4/); }); test('throw if length of pullRequestFilter is greater than 3', () => { @@ -855,7 +855,7 @@ describe('triggers', () => { }, }], }); - }).toThrow(/length of pullRequestFilter for sourceAction with name 'CodeStarConnectionsSourceAction' must be less than or equal to 3, got 4/);; + }).toThrow(/length of pullRequestFilter for sourceAction with name 'CodeStarConnectionsSourceAction' must be less than or equal to 3, got 4/); }); test('throw if both pushFilter and pullRequestFilter are specified', () => { @@ -881,7 +881,7 @@ describe('triggers', () => { }, }], }); - }).toThrow(/cannot specify both pushFilter and pullRequestFilter for the trigger with sourceAction with name 'CodeStarConnectionsSourceAction'/);; + }).toThrow(/cannot specify both pushFilter and pullRequestFilter for the trigger with sourceAction with name 'CodeStarConnectionsSourceAction'/); }); test('throw if neither pushFilter nor pullRequestFilter are specified', () => { @@ -895,7 +895,7 @@ describe('triggers', () => { }, }], }); - }).toThrow(/must specify either pushFilter or pullRequestFilter for the trigger with sourceAction with name 'CodeStarConnectionsSourceAction'/);; + }).toThrow(/must specify either pushFilter or pullRequestFilter for the trigger with sourceAction with name 'CodeStarConnectionsSourceAction'/); }); test('throw if both pushFilter and pullRequestFilter are empty arrays', () => { @@ -911,7 +911,7 @@ describe('triggers', () => { }, }], }); - }).toThrow(/must specify either pushFilter or pullRequestFilter for the trigger with sourceAction with name 'CodeStarConnectionsSourceAction'/);; + }).toThrow(/must specify either pushFilter or pullRequestFilter for the trigger with sourceAction with name 'CodeStarConnectionsSourceAction'/); }); test('throw if provider of sourceAction is not \'CodeStarSourceConnection\'', () => { diff --git a/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts b/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts index d92109c73b7a8..61084df3a5fde 100644 --- a/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts +++ b/packages/aws-cdk-lib/aws-cognito/lib/user-pool-client.ts @@ -605,7 +605,7 @@ export class UserPoolClient extends Resource implements IUserPoolClient { accessToken: props.accessTokenValidity ? 'minutes' : undefined, refreshToken: props.refreshTokenValidity ? 'minutes' : undefined, }; - }; + } resource.idTokenValidity = props.idTokenValidity ? props.idTokenValidity.toMinutes() : undefined; resource.refreshTokenValidity = props.refreshTokenValidity ? props.refreshTokenValidity.toMinutes() : undefined; diff --git a/packages/aws-cdk-lib/aws-config/lib/rule.ts b/packages/aws-cdk-lib/aws-config/lib/rule.ts index 9cf824a809138..4beb796e6b288 100644 --- a/packages/aws-cdk-lib/aws-config/lib/rule.ts +++ b/packages/aws-cdk-lib/aws-config/lib/rule.ts @@ -455,7 +455,7 @@ export class CustomRule extends RuleNew { principal: new iam.ServicePrincipal('config.amazonaws.com'), sourceAccount: this.env.account, }); - }; + } if (props.lambdaFunction.role) { props.lambdaFunction.role.addManagedPolicy( diff --git a/packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts b/packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts index eea0bfe06dd65..4b31246502f0b 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts @@ -48,7 +48,7 @@ export enum CpuCredits { * @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode.html */ UNLIMITED = 'unlimited', -}; +} /** * Provides the options for specifying the instance initiated shutdown behavior. @@ -66,7 +66,7 @@ export enum InstanceInitiatedShutdownBehavior { * The instance will be terminated when it initiates a shutdown. */ TERMINATE = 'terminate', -}; +} /** * Interface for LaunchTemplate-like objects. @@ -191,7 +191,7 @@ export interface LaunchTemplateSpotOptions { * @default The default end date is 7 days from the current date. */ readonly validUntil?: Expiration; -}; +} /** * The state of token usage for your instance metadata requests. diff --git a/packages/aws-cdk-lib/aws-ec2/lib/prefix-list.ts b/packages/aws-cdk-lib/aws-ec2/lib/prefix-list.ts index 1f0ae1efbd77a..4ca436d0b57b9 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/prefix-list.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/prefix-list.ts @@ -139,11 +139,11 @@ export class PrefixList extends PrefixListBase { if (props?.prefixListName) { if ( props.prefixListName.startsWith('com.amazonaws')) { throw new Error('The name cannot start with \'com.amazonaws.\''); - }; + } if (props.prefixListName.length > 255 ) { throw new Error('Lengths exceeding 255 characters cannot be set.'); - }; - }; + } + } this.prefixListName = this.physicalName; diff --git a/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts b/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts index 351b9832c7dd9..550ea27ed3157 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts @@ -106,7 +106,7 @@ export abstract class FlowLogResourceType { resourceType: 'TransitGateway', resourceId: id, }; - }; + } /** * The Transit Gateway Attachment to attach the Flow Log to @@ -116,7 +116,7 @@ export abstract class FlowLogResourceType { resourceType: 'TransitGatewayAttachment', resourceId: id, }; - }; + } /** * The type of resource to attach a flow log to. diff --git a/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts b/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts index 0a7f5f3a7181b..5aa7e8746485e 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/cfn-init.test.ts @@ -41,7 +41,7 @@ function resetStateWithSynthesizer(customSynthesizer?: IStackSynthesizer) { type: 'CDK::Test::Resource', }); linuxUserData = ec2.UserData.forLinux(); -}; +} beforeEach(resetState); diff --git a/packages/aws-cdk-lib/aws-ec2/test/ip-addresses.test.ts b/packages/aws-cdk-lib/aws-ec2/test/ip-addresses.test.ts index b8ef25aac6563..52f4bd75b8e17 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/ip-addresses.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/ip-addresses.test.ts @@ -266,7 +266,7 @@ describe('AwsIpam Vpc Integration', () => { const ipAddresses = IpAddresses.awsIpamAllocation(awsIpamProps); - expect(() => {new Vpc(stack, 'VpcNetwork', { ipAddresses: ipAddresses });}).toThrow(/If you have not set a cidr for all subnets in this case you must set a defaultCidrMask in AwsIpam Options/);; + expect(() => {new Vpc(stack, 'VpcNetwork', { ipAddresses: ipAddresses });}).toThrow(/If you have not set a cidr for all subnets in this case you must set a defaultCidrMask in AwsIpam Options/); }); @@ -356,7 +356,7 @@ describe('AwsIpam Vpc Integration', () => { const ipAddresses = IpAddresses.awsIpamAllocation(awsIpamProps); - expect(() => {new Vpc(stack, 'VpcNetwork', { ipAddresses: ipAddresses });}).toThrow('IP space of size /18 not big enough to allocate subnets of sizes /17,/17,/17,/17');; + expect(() => {new Vpc(stack, 'VpcNetwork', { ipAddresses: ipAddresses });}).toThrow('IP space of size /18 not big enough to allocate subnets of sizes /17,/17,/17,/17'); }); diff --git a/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts b/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts index 50e7f9ae5f224..4334538eccc12 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/security-group.test.ts @@ -868,7 +868,7 @@ function testRulesAreInlined(contextDisableInlineRules: boolean | undefined | nu }); }); -}; +} function testRulesAreNotInlined(contextDisableInlineRules: boolean | undefined | null, optionsDisableInlineRules: boolean | undefined) { diff --git a/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts b/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts index 9c627fe7d0baf..aaad35c92d74a 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts @@ -942,7 +942,7 @@ export abstract class BaseService extends Resource namespace: namespace, services: services, }; - }; + } /** * Validate Service Connect Configuration @@ -970,7 +970,7 @@ export abstract class BaseService extends Resource // port must exist on the task definition if (!this.taskDefinition.findPortMappingByName(serviceConnectService.portMappingName)) { throw new Error(`Port Mapping '${serviceConnectService.portMappingName}' does not exist on the task definition.`); - }; + } // Check that no two service connect services use the same discovery name. const discoveryName = serviceConnectService.discoveryName || serviceConnectService.portMappingName; diff --git a/packages/aws-cdk-lib/aws-ecs/lib/base/task-definition.ts b/packages/aws-cdk-lib/aws-ecs/lib/base/task-definition.ts index c15e9ebdce9d5..8bf1e90819b86 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/base/task-definition.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/base/task-definition.ts @@ -843,7 +843,7 @@ export class TaskDefinition extends TaskDefinitionBase { const pm = container.findPortMappingByName(name); if (pm) { portMapping = pm; - }; + } }); return portMapping; @@ -913,7 +913,7 @@ export class TaskDefinition extends TaskDefinitionBase { } else { throw new Error(`If operatingSystemFamily is ${runtimePlatform.operatingSystemFamily!._operatingSystemFamily}, then cpu must be in 1024 (1 vCPU), 2048 (2 vCPU), or 4096 (4 vCPU). Provided value was: ${cpu}`); } - }; + } } /** diff --git a/packages/aws-cdk-lib/aws-eks/lib/cluster.ts b/packages/aws-cdk-lib/aws-eks/lib/cluster.ts index 8f66f4efa8b3a..c588a70a98e73 100644 --- a/packages/aws-cdk-lib/aws-eks/lib/cluster.ts +++ b/packages/aws-cdk-lib/aws-eks/lib/cluster.ts @@ -1306,7 +1306,7 @@ export interface ServiceLoadBalancerAddressOptions { /** * Options for fetching an IngressLoadBalancerAddress. */ -export interface IngressLoadBalancerAddressOptions extends ServiceLoadBalancerAddressOptions {}; +export interface IngressLoadBalancerAddressOptions extends ServiceLoadBalancerAddressOptions {} /** * A Cluster represents a managed Kubernetes Service (EKS) @@ -1580,7 +1580,7 @@ export class Cluster extends ClusterBase { if (!props.kubectlLayer) { Annotations.of(this).addWarningV2('@aws-cdk/aws-eks:clusterKubectlLayerNotSpecified', `You created a cluster with Kubernetes Version ${props.version.version} without specifying the kubectlLayer property. The property will become required instead of optional in 2025 Jan. Please update your CDK code to provide a kubectlLayer.`); - }; + } this.version = props.version; // since this lambda role needs to be added to the trust policy of the creation role, diff --git a/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts b/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts index 9b5b7b489b3e4..36f6a7a181c77 100644 --- a/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts +++ b/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts @@ -471,7 +471,7 @@ export class Nodegroup extends Resource implements INodegroup { 'ec2:UnassignIpv6Addresses', ], })); - }; + } this.role = ngRole; } else { this.role = props.nodeRole; diff --git a/packages/aws-cdk-lib/aws-eks/lib/service-account.ts b/packages/aws-cdk-lib/aws-eks/lib/service-account.ts index 8eef29273c3f6..6bfae59e1b952 100644 --- a/packages/aws-cdk-lib/aws-eks/lib/service-account.ts +++ b/packages/aws-cdk-lib/aws-eks/lib/service-account.ts @@ -215,7 +215,7 @@ export class ServiceAccount extends Construct implements IPrincipal { serviceAccount: this.serviceAccountName, }); - }; + } this.role = role; diff --git a/packages/aws-cdk-lib/aws-eks/test/util.ts b/packages/aws-cdk-lib/aws-eks/test/util.ts index 113dbedd88734..e87a7df7bdebb 100644 --- a/packages/aws-cdk-lib/aws-eks/test/util.ts +++ b/packages/aws-cdk-lib/aws-eks/test/util.ts @@ -24,7 +24,7 @@ export interface testFixtureClusterOptions { * If true, a FargateCluster will be created, otherwise a regular Cluster. */ isFargate?: boolean; -}; +} /** * Creates a test fixture for an EKS cluster. @@ -44,4 +44,4 @@ export function testFixtureCluster(props: Omit = {}, re const cluster = options?.isFargate ? new FargateCluster(stack, 'Cluster', clusterProps) : new Cluster(stack, 'Cluster', clusterProps); return { stack, app, cluster }; -}; +} diff --git a/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/listener.test.ts b/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/listener.test.ts index 1943a1945ac2a..a14f74825c440 100644 --- a/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/listener.test.ts +++ b/packages/aws-cdk-lib/aws-elasticloadbalancingv2/test/alb/listener.test.ts @@ -1704,7 +1704,7 @@ describe('tests', () => { interface TestCase { readonly removeSuffix?: boolean; readonly expectedLogicalId: string; - }; + } const nonDefaultTestCases: TestCase[] = [ { removeSuffix: true, expectedLogicalId: identifierToken }, { removeSuffix: false, expectedLogicalId: identifierToken + 'Rule' }, diff --git a/packages/aws-cdk-lib/aws-elasticsearch/lib/domain.ts b/packages/aws-cdk-lib/aws-elasticsearch/lib/domain.ts index 50d411a8f7463..7696601cb6017 100644 --- a/packages/aws-cdk-lib/aws-elasticsearch/lib/domain.ts +++ b/packages/aws-cdk-lib/aws-elasticsearch/lib/domain.ts @@ -1592,15 +1592,15 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { function isInstanceType(t: string): Boolean { return dedicatedMasterType.startsWith(t) || instanceType.startsWith(t); - }; + } function isSomeInstanceType(...instanceTypes: string[]): Boolean { return instanceTypes.some(isInstanceType); - }; + } function isEveryDatanodeInstanceType(...instanceTypes: string[]): Boolean { return instanceTypes.some(t => instanceType.startsWith(t)); - }; + } // Validate feature support for the given Elasticsearch version, per // https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-features-by-version.html @@ -1707,7 +1707,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { }); logGroups.push(this.slowSearchLogGroup); - }; + } if (props.logging?.slowIndexLogEnabled) { this.slowIndexLogGroup = props.logging.slowIndexLogGroup ?? @@ -1716,7 +1716,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { }); logGroups.push(this.slowIndexLogGroup); - }; + } if (props.logging?.appLogEnabled) { this.appLogGroup = props.logging.appLogGroup ?? @@ -1725,7 +1725,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { }); logGroups.push(this.appLogGroup); - }; + } if (props.logging?.auditLogEnabled) { this.auditLogGroup = props.logging.auditLogGroup ?? @@ -1734,7 +1734,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { }); logGroups.push(this.auditLogGroup); - }; + } let logGroupResourcePolicy: LogGroupResourcePolicy | null = null; if (logGroups.length > 0) { diff --git a/packages/aws-cdk-lib/aws-events-targets/lib/ecs-task.ts b/packages/aws-cdk-lib/aws-events-targets/lib/ecs-task.ts index 886622d0215a0..de2a615338171 100644 --- a/packages/aws-cdk-lib/aws-events-targets/lib/ecs-task.ts +++ b/packages/aws-cdk-lib/aws-events-targets/lib/ecs-task.ts @@ -243,7 +243,7 @@ export class EcsTask implements events.IRuleTarget { if (assignPublicIp === 'ENABLED' && launchType !== 'FARGATE') { throw new Error('assignPublicIp is only supported for FARGATE tasks'); - }; + } const baseEcsParameters = { taskCount, taskDefinitionArn, propagateTags, tagList, enableExecuteCommand }; diff --git a/packages/aws-cdk-lib/aws-events-targets/lib/log-group.ts b/packages/aws-cdk-lib/aws-events-targets/lib/log-group.ts index 3f421bc31697d..f432dd517ebf7 100644 --- a/packages/aws-cdk-lib/aws-events-targets/lib/log-group.ts +++ b/packages/aws-cdk-lib/aws-events-targets/lib/log-group.ts @@ -48,7 +48,7 @@ export abstract class LogGroupTargetInput { timestamp: options?.timestamp ?? EventField.time, message: options?.message ?? EventField.detailType, }); - }; + } /** * Return the input properties for this input object diff --git a/packages/aws-cdk-lib/aws-iam/test/managed-policy.test.ts b/packages/aws-cdk-lib/aws-iam/test/managed-policy.test.ts index 540edbf65eff3..9a8159984ebb6 100644 --- a/packages/aws-cdk-lib/aws-iam/test/managed-policy.test.ts +++ b/packages/aws-cdk-lib/aws-iam/test/managed-policy.test.ts @@ -698,7 +698,7 @@ describe('managed policy', () => { addToResourcePolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult { throw new Error('should not be called.'); } - }; + } const resource = new DummyResource(stack, 'Dummy'); Grant.addToPrincipalOrResource({ actions: ['dummy:Action'], grantee: mp, resourceArns: ['*'], resource }); @@ -724,7 +724,7 @@ describe('managed policy', () => { addToResourcePolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult { throw new Error('should not be called.'); } - }; + } const resource = new DummyResource(stack, 'Dummy', { account: '5678' }); expect(() => { @@ -741,7 +741,7 @@ describe('managed policy', () => { addToResourcePolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult { throw new Error('should not be called.'); } - }; + } const resource = new DummyResource(stack, 'Dummy'); expect(() => { diff --git a/packages/aws-cdk-lib/aws-iam/test/policy.test.ts b/packages/aws-cdk-lib/aws-iam/test/policy.test.ts index f70cccef24c7e..f703cb5d0ca66 100644 --- a/packages/aws-cdk-lib/aws-iam/test/policy.test.ts +++ b/packages/aws-cdk-lib/aws-iam/test/policy.test.ts @@ -592,7 +592,7 @@ describe('IAM policy', () => { addToResourcePolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult { throw new Error('should not be called.'); } - }; + } const resource = new DummyResource(stack, 'Dummy'); Grant.addToPrincipalOrResource({ actions: ['dummy:Action'], grantee: pol, resource, resourceArns: ['*'] }); @@ -616,7 +616,7 @@ describe('IAM policy', () => { addToResourcePolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult { throw new Error('should not be called.'); } - }; + } const resource = new DummyResource(stack, 'Dummy', { account: '5678' }); expect(() => { @@ -633,7 +633,7 @@ describe('IAM policy', () => { addToResourcePolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult { throw new Error('should not be called.'); } - }; + } const resource = new DummyResource(stack, 'Dummy'); expect(() => { diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/util.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/util.ts index 3373f38aa80cb..d24ca2201e843 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/util.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/util.ts @@ -117,7 +117,7 @@ export function tryGetModuleVersionFromPkg(mod: string, pkgJson: { [key: string] if (fileMatch && !path.isAbsolute(fileMatch[1])) { const absoluteFilePath = path.join(path.dirname(pkgPath), fileMatch[1]); return `file:${absoluteFilePath}`; - }; + } return dependencies[mod]; } diff --git a/packages/aws-cdk-lib/aws-lambda/lib/function.ts b/packages/aws-cdk-lib/aws-lambda/lib/function.ts index ad239483b50ef..053e72ed07677 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/function.ts @@ -656,7 +656,7 @@ export class Function extends FunctionBase { if (this._warnIfCurrentVersionCalled) { this.warnInvokeFunctionPermissions(this); - }; + } this._currentVersion = new Version(this, 'CurrentVersion', { lambda: this, @@ -1247,7 +1247,7 @@ export class Function extends FunctionBase { return loggingConfig; } return undefined; - }; + } /** * Mix additional information into the hash of the Version object @@ -1606,7 +1606,7 @@ Environment variables can be marked for removal when used in Lambda@Edge by sett subnetIds: selectedSubnets.subnetIds, securityGroupIds: securityGroups.map(sg => sg.securityGroupId), }; - }; + } } private configureSnapStart(props: FunctionProps): CfnFunction.SnapStartProperty | undefined { @@ -1792,5 +1792,5 @@ export class FunctionVersionUpgrade implements IAspect { const desc = cfnFunction.description ? `${cfnFunction.description} ` : ''; cfnFunction.addPropertyOverride('Description', `${desc}version-hash:${calculateFunctionHash(node)}`); } - }; + } } diff --git a/packages/aws-cdk-lib/aws-lambda/lib/singleton-lambda.ts b/packages/aws-cdk-lib/aws-lambda/lib/singleton-lambda.ts index 058a734f9385e..b9b238cf69d7e 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/singleton-lambda.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/singleton-lambda.ts @@ -125,7 +125,7 @@ export class SingletonFunction extends FunctionBase { public get resourceArnsForGrantInvoke() { return [this.functionArn, `${this.functionArn}:*`]; - }; + } /** * Adds an environment variable to this Lambda function. diff --git a/packages/aws-cdk-lib/aws-logs/lib/data-protection-policy.ts b/packages/aws-cdk-lib/aws-logs/lib/data-protection-policy.ts index 15948c6955ea1..3c675f4b70a29 100644 --- a/packages/aws-cdk-lib/aws-logs/lib/data-protection-policy.ts +++ b/packages/aws-cdk-lib/aws-logs/lib/data-protection-policy.ts @@ -61,7 +61,7 @@ export class DataProtectionPolicy { resourceName: identifier.name, })); } - }; + } const statement = [ { diff --git a/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts b/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts index fe00ce2a39f6e..ae38c5d927e62 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts +++ b/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts @@ -1513,15 +1513,15 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { function isInstanceType(t: string): Boolean { return dedicatedMasterType.startsWith(t) || instanceType.startsWith(t); - }; + } function isSomeInstanceType(...instanceTypes: string[]): Boolean { return instanceTypes.some(isInstanceType); - }; + } function isEveryDatanodeInstanceType(...instanceTypes: string[]): Boolean { return instanceTypes.some(t => instanceType.startsWith(t)); - }; + } // Validate feature support for the given Elasticsearch/OpenSearch version, per // https://docs.aws.amazon.com/opensearch-service/latest/developerguide/features-by-version.html @@ -1763,7 +1763,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { logPublishing.SEARCH_SLOW_LOGS = { enabled: false, }; - }; + } if (props.logging?.slowIndexLogEnabled) { this.slowIndexLogGroup = props.logging.slowIndexLogGroup ?? @@ -1780,7 +1780,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { logPublishing.INDEX_SLOW_LOGS = { enabled: false, }; - }; + } if (props.logging?.appLogEnabled) { this.appLogGroup = props.logging.appLogGroup ?? @@ -1797,7 +1797,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { logPublishing.ES_APPLICATION_LOGS = { enabled: false, }; - }; + } if (props.logging?.auditLogEnabled) { this.auditLogGroup = props.logging.auditLogGroup ?? @@ -1814,7 +1814,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { logPublishing.AUDIT_LOGS = { enabled: false, }; - }; + } let logGroupResourcePolicy: LogGroupResourcePolicy | null = null; if (logGroups.length > 0 && !props.suppressLogsResourcePolicy) { @@ -2194,7 +2194,7 @@ function zoneAwarenessCheckShouldBeSkipped(vpc: ec2.IVpc, vpcSubnets: ec2.Subnet for (const selection of vpcSubnets) { if (vpc.selectSubnets(selection).isPendingLookup) { return true; - }; + } } return false; } diff --git a/packages/aws-cdk-lib/aws-route53/lib/vpc-endpoint-service-domain-name.ts b/packages/aws-cdk-lib/aws-route53/lib/vpc-endpoint-service-domain-name.ts index f4d64883b1253..f2481e7e6d2ce 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/vpc-endpoint-service-domain-name.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/vpc-endpoint-service-domain-name.ts @@ -230,4 +230,4 @@ interface PrivateDnsConfiguration { */ function hashcode(s: string): string { return md5hash(s); -}; +} diff --git a/packages/aws-cdk-lib/aws-servicecatalog/lib/portfolio.ts b/packages/aws-cdk-lib/aws-servicecatalog/lib/portfolio.ts index 9810f280db900..25b4c33bd1923 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/lib/portfolio.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/lib/portfolio.ts @@ -364,7 +364,7 @@ export class Portfolio extends PortfolioBase { visit(c: IConstruct) { if (c.node.id === portfolioNodeId) { (c as Portfolio).addBucketPermissionsToSharedAccounts(); - }; + } }, }, { priority: cdk.AspectPriority.MUTATING }); } diff --git a/packages/aws-cdk-lib/aws-servicecatalog/lib/private/association-manager.ts b/packages/aws-cdk-lib/aws-servicecatalog/lib/private/association-manager.ts index 089f91cafa876..bf8738ff3c398 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/lib/private/association-manager.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/lib/private/association-manager.ts @@ -210,7 +210,7 @@ export class AssociationManager { }); return formattedAssertions; }, new Array<{ Assert: string; AssertDescription: string | undefined }>()); - }; + } } interface LaunchRoleArnOption { diff --git a/packages/aws-cdk-lib/aws-servicecatalog/lib/product.ts b/packages/aws-cdk-lib/aws-servicecatalog/lib/product.ts index 4ceaab07975fc..50d393e23fd9d 100644 --- a/packages/aws-cdk-lib/aws-servicecatalog/lib/product.ts +++ b/packages/aws-cdk-lib/aws-servicecatalog/lib/product.ts @@ -233,7 +233,7 @@ export class CloudFormationProduct extends Product { }, }; }); - }; + } private validateProductProps(props: CloudFormationProductProps) { InputValidator.validateLength(this.node.path, 'product product name', 1, 100, props.productName); diff --git a/packages/aws-cdk-lib/aws-sns/lib/subscription.ts b/packages/aws-cdk-lib/aws-sns/lib/subscription.ts index 2b6cc1c073bc7..46406a3ad413d 100644 --- a/packages/aws-cdk-lib/aws-sns/lib/subscription.ts +++ b/packages/aws-cdk-lib/aws-sns/lib/subscription.ts @@ -342,7 +342,7 @@ function buildFilterPolicyWithMessageBody( } return result; -}; +} /** * The type of the MessageBody at a given key value pair diff --git a/packages/aws-cdk-lib/aws-sns/lib/topic.ts b/packages/aws-cdk-lib/aws-sns/lib/topic.ts index f78b32bf8cfe3..aa0d3ed0ca10a 100644 --- a/packages/aws-cdk-lib/aws-sns/lib/topic.ts +++ b/packages/aws-cdk-lib/aws-sns/lib/topic.ts @@ -212,7 +212,7 @@ export class Topic extends TopicBase { */ public static fromTopicArn(scope: Construct, id: string, topicArn: string): ITopic { return Topic.fromTopicAttributes(scope, id, { topicArn }); - }; + } /** * Import an existing SNS topic provided a topic attributes diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index dceb2023dd345..09bcc9a92c9b9 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -109,7 +109,7 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { const maxAgeInMinutes = resultReuseConfigurationMaxAge.toMinutes(); if (maxAgeInMinutes > 10080) { throw new Error(`resultReuseConfigurationMaxAge must either be 0 or between 1 and 10080 minutes, got ${maxAgeInMinutes}`); - }; + } } private createPolicyStatements(): iam.PolicyStatement[] { diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts index 6d789ff85a356..4d9841ed22fa2 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/bedrock/invoke-model.ts @@ -326,7 +326,7 @@ export class BedrockInvokeModel extends sfn.TaskStateBase { : 'DISABLED', }), }; - }; + } private getInputSource(props?: BedrockInvokeModelInputProps, inputPath?: string, useNewS3UriParamsForTask?: boolean): string | undefined { if (props?.s3Location) { diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/create-virtual-cluster.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/create-virtual-cluster.ts index 7b8cf58e05d3c..1653dec34792b 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/create-virtual-cluster.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/create-virtual-cluster.ts @@ -119,7 +119,7 @@ export class EmrContainersCreateVirtualCluster extends sfn.TaskStateBase { Tags: this.props.tags, }), }; - }; + } private createPolicyStatements(): iam.PolicyStatement[] { return [ diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/delete-virtual-cluster.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/delete-virtual-cluster.ts index 4b7a3352b0842..40b6b7a66a797 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/delete-virtual-cluster.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emrcontainers/delete-virtual-cluster.ts @@ -51,7 +51,7 @@ export class EmrContainersDeleteVirtualCluster extends sfn.TaskStateBase { Id: this.props.virtualClusterId.value, }), }; - }; + } private createPolicyStatements(): iam.PolicyStatement[] { const actions = ['emr-containers:DeleteVirtualCluster']; diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts index bd52ea33d84d0..e8b7ead3117a2 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts @@ -369,7 +369,7 @@ describe('Invoke EMR Containers Start Job Run with ', () => { test('provided from user', () => { // WHEN const logGroup = logs.LogGroup.fromLogGroupName(stack, 'Monitoring Group', 'providedloggroup'); - const s3Bucket = s3.Bucket.fromBucketName(stack, 'Monitoring Bucket', 'providedbucket');; + const s3Bucket = s3.Bucket.fromBucketName(stack, 'Monitoring Bucket', 'providedbucket'); const prefixName = 'prefix'; const task = new EmrContainersStartJobRun(stack, 'EMR Containers Start Job Run', { diff --git a/packages/aws-cdk-lib/core/lib/asset-staging.ts b/packages/aws-cdk-lib/core/lib/asset-staging.ts index 49e8c292805dd..b09dd2c6128f6 100644 --- a/packages/aws-cdk-lib/core/lib/asset-staging.ts +++ b/packages/aws-cdk-lib/core/lib/asset-staging.ts @@ -664,9 +664,9 @@ function getExtension(source: string): string { for ( const ext of ARCHIVE_EXTENSIONS ) { if (source.toLowerCase().endsWith(ext)) { return ext; - }; - }; + } + } return path.extname(source); -}; +} diff --git a/packages/aws-cdk-lib/core/lib/private/synthesis.ts b/packages/aws-cdk-lib/core/lib/private/synthesis.ts index 494923495a02f..aee790052bf3e 100644 --- a/packages/aws-cdk-lib/core/lib/private/synthesis.ts +++ b/packages/aws-cdk-lib/core/lib/private/synthesis.ts @@ -313,7 +313,7 @@ function invokeAspectsV2(root: IConstruct) { throw new Error( `Cannot invoke Aspect ${aspectApplication.aspect.constructor.name} with priority ${aspectApplication.priority} on node ${node.path}: an Aspect ${lastInvokedAspect.aspect.constructor.name} with a lower priority (${lastInvokedAspect.priority}) was already invoked on this node.`, ); - }; + } aspectApplication.aspect.visit(construct); diff --git a/packages/aws-cdk-lib/core/test/bundling.test.ts b/packages/aws-cdk-lib/core/test/bundling.test.ts index ea74e92998637..7644bef721171 100644 --- a/packages/aws-cdk-lib/core/test/bundling.test.ts +++ b/packages/aws-cdk-lib/core/test/bundling.test.ts @@ -578,7 +578,7 @@ describe('bundling', () => { } catch { // We expect this to fail as the test environment will not have the required docker setup for the command to exit successfully // nevertheless what we want to check here is that the command was built correctly and triggered - }; + } expect(spawnSyncStub.calledWith(dockerCmd, [ 'run', '--rm', diff --git a/packages/aws-cdk-lib/core/test/fs/utils.test.ts b/packages/aws-cdk-lib/core/test/fs/utils.test.ts index 898f3368ec6ee..4cb48a409590a 100644 --- a/packages/aws-cdk-lib/core/test/fs/utils.test.ts +++ b/packages/aws-cdk-lib/core/test/fs/utils.test.ts @@ -15,7 +15,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.ALWAYS, sourceRoot, linkTarget)).toEqual(true); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -28,7 +28,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.ALWAYS, sourceRoot, linkTarget)).toEqual(true); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -41,7 +41,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.ALWAYS, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -54,7 +54,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.ALWAYS, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -69,7 +69,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.EXTERNAL, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.notCalled).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -82,7 +82,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.EXTERNAL, sourceRoot, linkTarget)).toEqual(true); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -95,7 +95,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.EXTERNAL, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -110,7 +110,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.BLOCK_EXTERNAL, sourceRoot, linkTarget)).toEqual(true); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -123,7 +123,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.BLOCK_EXTERNAL, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.calledOnceWith(linkTarget)).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -136,7 +136,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.BLOCK_EXTERNAL, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.notCalled).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -151,7 +151,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.NEVER, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.notCalled).toEqual(true); - ; + } finally { mockFsExists.restore(); } @@ -164,7 +164,7 @@ describe('utils', () => { try { expect(util.shouldFollow(SymlinkFollowMode.NEVER, sourceRoot, linkTarget)).toEqual(false); expect(mockFsExists.notCalled).toEqual(true); - ; + } finally { mockFsExists.restore(); } diff --git a/packages/aws-cdk-lib/core/test/metadata-resource.test.ts b/packages/aws-cdk-lib/core/test/metadata-resource.test.ts index fa05b0d501f16..c2b05ffa881b9 100644 --- a/packages/aws-cdk-lib/core/test/metadata-resource.test.ts +++ b/packages/aws-cdk-lib/core/test/metadata-resource.test.ts @@ -110,7 +110,7 @@ describe('MetadataResource', () => { const a = App.of(stage)!; stackArtifact = a.synth().getNestedAssembly(stage.artifactId).getStackByName(stackName); } - let encodedAnalytics = stackArtifact.template.Resources?.CDKMetadata?.Properties?.Analytics as string;; + let encodedAnalytics = stackArtifact.template.Resources?.CDKMetadata?.Properties?.Analytics as string; return plaintextConstructsFromAnalytics(encodedAnalytics); } }); diff --git a/packages/aws-cdk-lib/cx-api/lib/cloud-assembly.ts b/packages/aws-cdk-lib/cx-api/lib/cloud-assembly.ts index b170e6c0df5ac..c6f1c15830173 100644 --- a/packages/aws-cdk-lib/cx-api/lib/cloud-assembly.ts +++ b/packages/aws-cdk-lib/cx-api/lib/cloud-assembly.ts @@ -137,7 +137,7 @@ export class CloudAssembly { const [head, ...tail] = assemblies; const nestedAssemblies = head.nestedAssemblies.map(asm => asm.nestedAssembly); return search(stackArtifacts.concat(head.stacks), tail.concat(nestedAssemblies)); - }; + } return search([], [this]); } diff --git a/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts b/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts index 2747f12d90041..3dcb9335f1dd8 100644 --- a/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts +++ b/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts @@ -25,7 +25,7 @@ export enum FlagType { * Use this type for flags that are to be removed on a set date */ Temporary, -}; +} export interface FlagInfoBase { /** Single-line description for the flag */ @@ -38,7 +38,7 @@ export interface FlagInfoBase { readonly defaults?: { v1?: any; v2?: any }; /** Default in new projects */ readonly recommendedValue: any; -}; +} /** Flag information, adding required fields if present */ export type FlagInfo = FlagInfoBase & ( diff --git a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts index 5b84403019ed5..fd69d6ee246a1 100644 --- a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts +++ b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts @@ -832,7 +832,7 @@ export class CodePipeline extends PipelineBase { for (const roleArn of assets.flatMap(a => a.assetPublishingRoleArn ? [a.assetPublishingRoleArn] : [])) { // The ARNs include raw AWS pseudo parameters (e.g., ${AWS::Partition}), which need to be substituted. role.addAssumeRole(this.cachedFnSub.fnSub(roleArn)); - }; + } // The base commands that need to be run const script = new CodeBuildStep(node.id, { diff --git a/packages/aws-cdk-lib/pipelines/lib/docker-credentials.ts b/packages/aws-cdk-lib/pipelines/lib/docker-credentials.ts index 5b59da3314b14..44ebfc57f2d0c 100644 --- a/packages/aws-cdk-lib/pipelines/lib/docker-credentials.ts +++ b/packages/aws-cdk-lib/pipelines/lib/docker-credentials.ts @@ -109,7 +109,7 @@ export enum DockerCredentialUsage { SELF_UPDATE = 'SELF_UPDATE', /** Asset publishing */ ASSET_PUBLISHING = 'ASSET_PUBLISHING', -}; +} /** DockerCredential defined by registry domain and a secret */ class ExternalDockerCredential extends DockerCredential { diff --git a/packages/aws-cdk-lib/pipelines/test/codepipeline/codepipeline.test.ts b/packages/aws-cdk-lib/pipelines/test/codepipeline/codepipeline.test.ts index d29aaaf446936..191499eebae6a 100644 --- a/packages/aws-cdk-lib/pipelines/test/codepipeline/codepipeline.test.ts +++ b/packages/aws-cdk-lib/pipelines/test/codepipeline/codepipeline.test.ts @@ -203,7 +203,7 @@ test('CodeBuild asset role has the right Principal with the feature enabled', () stack.node.setContext(cxapi.PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE, true); const pipelineStack = new cdk.Stack(stack, 'PipelineStack', { env: PIPELINE_ENV }); const pipeline = new ModernTestGitHubNpmPipeline(pipelineStack, 'Cdk'); - pipeline.addStage(new FileAssetApp(pipelineStack, 'App', {}));; + pipeline.addStage(new FileAssetApp(pipelineStack, 'App', {})); const template = Template.fromStack(pipelineStack); const assetRole = template.toJSON().Resources.CdkAssetsFileRole6BE17A07; const statementLength = assetRole.Properties.AssumeRolePolicyDocument.Statement; @@ -225,7 +225,7 @@ test('CodeBuild asset role has the right Principal with the feature disabled', ( stack.node.setContext(cxapi.PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE, false); const pipelineStack = new cdk.Stack(stack, 'PipelineStack', { env: PIPELINE_ENV }); const pipeline = new ModernTestGitHubNpmPipeline(pipelineStack, 'Cdk'); - pipeline.addStage(new FileAssetApp(pipelineStack, 'App', {}));; + pipeline.addStage(new FileAssetApp(pipelineStack, 'App', {})); const template = Template.fromStack(pipelineStack); const assetRole = template.toJSON().Resources.CdkAssetsFileRole6BE17A07; const statementLength = assetRole.Properties.AssumeRolePolicyDocument.Statement; diff --git a/packages/aws-cdk-lib/region-info/lib/default.ts b/packages/aws-cdk-lib/region-info/lib/default.ts index f763884bfccaf..2bde964b0f102 100644 --- a/packages/aws-cdk-lib/region-info/lib/default.ts +++ b/packages/aws-cdk-lib/region-info/lib/default.ts @@ -117,7 +117,7 @@ export class Default { return universal; } - }; + } const configuration = determineConfiguration(serviceName); return configuration(serviceName, region, urlSuffix); diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index 64fa955912e4d..f452629f81a52 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -980,7 +980,7 @@ export class CdkToolkit { confirm: options.confirm ?? true, }); await gc.garbageCollect(); - }; + } } private async defineEnvironments(userEnvironmentSpecs: string[]): Promise { @@ -1213,7 +1213,7 @@ export class CdkToolkit { const closelyMatched = pattern.closelyMatched.length > 0 ? ` Do you mean ${chalk.blue(pattern.closelyMatched.join(', '))}?` : ''; warning(`${chalk.red(pattern.pattern)} does not exist.${closelyMatched}`); } - }; + } } /** diff --git a/packages/aws-cdk/lib/init-hooks.ts b/packages/aws-cdk/lib/init-hooks.ts index c2334e452b32f..ea3e3696369a7 100644 --- a/packages/aws-cdk/lib/init-hooks.ts +++ b/packages/aws-cdk/lib/init-hooks.ts @@ -88,4 +88,4 @@ async function dotnetAddProject(targetDirectory: string, context: HookContext, e } catch (e: any) { throw new ToolkitError(`Could not add project ${pname}.${ext} to solution ${pname}.sln. ${e.message}`); } -}; +} diff --git a/packages/aws-cdk/lib/util/work-graph-types.ts b/packages/aws-cdk/lib/util/work-graph-types.ts index 4a20295bf5cc1..8a5611de2be4f 100644 --- a/packages/aws-cdk/lib/util/work-graph-types.ts +++ b/packages/aws-cdk/lib/util/work-graph-types.ts @@ -8,7 +8,7 @@ export enum DeploymentState { COMPLETED = 'completed', FAILED = 'failed', SKIPPED = 'skipped', -}; +} export type WorkNode = StackNode | AssetBuildNode | AssetPublishNode; diff --git a/packages/aws-cdk/test/list-stacks.test.ts b/packages/aws-cdk/test/list-stacks.test.ts index c6788df91670b..7b4d158ab319b 100644 --- a/packages/aws-cdk/test/list-stacks.test.ts +++ b/packages/aws-cdk/test/list-stacks.test.ts @@ -1,4 +1,4 @@ -import * as cxschema from '@aws-cdk/cloud-assembly-schema';; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { instanceMockFrom, MockCloudExecutable, TestStackArtifact } from './util'; import { Bootstrapper } from '../lib/api/bootstrap'; import { Deployments } from '../lib/api/deployments'; diff --git a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js index 5a9a7fac6aecc..8bcbb23193f8d 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js +++ b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js @@ -59,6 +59,7 @@ module.exports = { 'quotes': ['error', 'single', { avoidEscape: true }], '@stylistic/member-delimiter-style': ['error'], // require semicolon delimiter '@stylistic/comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8 + '@stylistic/no-extra-semi': ['error'], // no extra semicolons 'comma-spacing': ['error', { before: false, after: true }], // space after, no space before 'no-multi-spaces': ['error', { ignoreEOLComments: false }], // no multi spaces 'array-bracket-spacing': ['error', 'never'], // [1, 2, 3] diff --git a/tools/@aws-cdk/cdk-release/lib/index.ts b/tools/@aws-cdk/cdk-release/lib/index.ts index d62d65fe0b31c..01f1c26fdf88d 100644 --- a/tools/@aws-cdk/cdk-release/lib/index.ts +++ b/tools/@aws-cdk/cdk-release/lib/index.ts @@ -47,7 +47,7 @@ export async function createRelease(opts: ReleaseOptions): Promise { ...changelogResults.map(r => r.filePath), ...bumpHookedFiles, ]); -}; +} function getProjectPackageInfos(): PackageInfo[] { const packages = lerna_project.Project.getPackagesSync(); diff --git a/tools/@aws-cdk/cdk-release/lib/types.ts b/tools/@aws-cdk/cdk-release/lib/types.ts index 790bdb70e0a31..2774bc833a326 100644 --- a/tools/@aws-cdk/cdk-release/lib/types.ts +++ b/tools/@aws-cdk/cdk-release/lib/types.ts @@ -29,7 +29,7 @@ export enum ExperimentalChangesTreatment { STRIP = 'strip', /** Write experimental changes to a separate changelog */ SEPARATE = 'separate', -}; +} export interface ReleaseOptions { releaseAs: ReleaseType;