diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts index 6f7b747e6d4de..bc75242d0a68c 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/extension-interfaces.ts @@ -1,7 +1,7 @@ import * as ecs from '@aws-cdk/aws-ecs'; import * as cdk from '@aws-cdk/core'; -import { Service, ConnectToProps } from '../service'; import { Construct } from 'constructs'; +import { Service, ConnectToProps } from '../service'; /** * The types of capacity that are supported. These capacity types may change the diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/injecter.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/injecter.ts index 9b3c83bb81b2c..a6b54464c0e9c 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/injecter.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/injecter.ts @@ -1,13 +1,10 @@ import * as ecs from '@aws-cdk/aws-ecs'; import * as sns from '@aws-cdk/aws-sns'; +import { Construct } from 'constructs'; import { Service } from '../service'; import { Container } from './container'; import { ContainerMutatingHook, ServiceExtension } from './extension-interfaces'; -// Keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * An interface that will be implemented by all the resources that can be published events or written data to. */ diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts b/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts index f904b23fe863a..41b90085953a3 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts +++ b/packages/@aws-cdk-containers/ecs-service-extensions/lib/service.ts @@ -1,14 +1,11 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as ecs from '@aws-cdk/aws-ecs'; import * as iam from '@aws-cdk/aws-iam'; +import { Construct } from 'constructs'; import { IEnvironment } from './environment'; import { EnvironmentCapacityType, ServiceBuild } from './extensions/extension-interfaces'; import { ServiceDescription } from './service-description'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * connectToProps will have all the extra parameters which are required for connecting services. */ diff --git a/packages/@aws-cdk/assets/lib/staging.ts b/packages/@aws-cdk/assets/lib/staging.ts index 1781ba6ccd808..34b86f648b251 100644 --- a/packages/@aws-cdk/assets/lib/staging.ts +++ b/packages/@aws-cdk/assets/lib/staging.ts @@ -1,11 +1,8 @@ import { AssetStaging } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { toSymlinkFollow } from './compat'; import { FingerprintOptions } from './fs/options'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Deprecated * @deprecated use `core.AssetStagingProps` diff --git a/packages/@aws-cdk/aws-apigateway/lib/api-definition.ts b/packages/@aws-cdk/aws-apigateway/lib/api-definition.ts index 86d4f626bb0c2..39b513b550c8f 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/api-definition.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/api-definition.ts @@ -1,8 +1,5 @@ import * as s3 from '@aws-cdk/aws-s3'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import * as cxapi from '@aws-cdk/cx-api'; import { Construct, Node } from 'constructs'; import { CfnRestApi } from './apigateway.generated'; diff --git a/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts b/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts index 34059d5d0c4db..2b30a992749bb 100644 --- a/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/api-definition.test.ts @@ -1,5 +1,5 @@ -import { Template } from '@aws-cdk/assertions'; import * as path from 'path'; +import { Template } from '@aws-cdk/assertions'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; diff --git a/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts b/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts index 26a63641abc4e..ec6267f643d2f 100644 --- a/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/usage-plan.test.ts @@ -1,7 +1,7 @@ import { Template } from '@aws-cdk/assertions'; +import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag'; import * as cdk from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; -import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag'; import * as apigateway from '../lib'; const RESOURCE_TYPE = 'AWS::ApiGateway::UsagePlan'; diff --git a/packages/@aws-cdk/aws-appmesh/lib/health-checks.ts b/packages/@aws-cdk/aws-appmesh/lib/health-checks.ts index 5ce022251acc6..566c0acca912b 100644 --- a/packages/@aws-cdk/aws-appmesh/lib/health-checks.ts +++ b/packages/@aws-cdk/aws-appmesh/lib/health-checks.ts @@ -1,11 +1,8 @@ import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { CfnVirtualGateway, CfnVirtualNode } from './appmesh.generated'; import { Protocol } from './shared-interfaces'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties used to define healthchecks. */ diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts index e16530d6231ff..6dd0544f106a3 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/common.ts @@ -1,8 +1,5 @@ // eslint-disable-next-line import/order import * as iam from '@aws-cdk/aws-iam'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import * as constructs from 'constructs'; export function createRole(scope: constructs.Construct, _role?: iam.IRole) { diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts index 766b4d0149a8a..8868eea5d4164 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts @@ -3,14 +3,10 @@ import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; import * as subs from '@aws-cdk/aws-sns-subscriptions'; - +import { Construct } from 'constructs'; import { createRole } from './common'; import { TopicHook } from './topic-hook'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Use a Lambda Function as a hook target * diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts index 621c5d3be49af..6247b93ee306c 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/queue-hook.ts @@ -1,10 +1,7 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as sqs from '@aws-cdk/aws-sqs'; -import { createRole } from './common'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { createRole } from './common'; /** * Use an SQS queue as a hook target diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts index 168b88bba61c7..65da54b79e210 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/lib/topic-hook.ts @@ -1,10 +1,7 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as sns from '@aws-cdk/aws-sns'; -import { createRole } from './common'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { createRole } from './common'; /** * Use an SNS topic as a hook target diff --git a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts index 4004b5de39f67..4314e99971cab 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook-target.ts @@ -1,9 +1,6 @@ // eslint-disable-next-line import/order import { LifecycleHook } from './lifecycle-hook'; import * as iam from '@aws-cdk/aws-iam'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import * as constructs from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.ts index 81d7683eed451..e55c6c800eafb 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.ts @@ -8,9 +8,6 @@ * - GetAtt.Attribute2: 1234 */ import { App, CfnOutput, CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, Stack, Token } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /* eslint-disable @aws-cdk/no-core-construct */ diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts index d02ba67c5c47d..56beb537969c8 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts @@ -3,9 +3,6 @@ import * as sns from '@aws-cdk/aws-sns'; import * as sns_subscriptions from '@aws-cdk/aws-sns-subscriptions'; import * as sqs from '@aws-cdk/aws-sqs'; import { App, CfnParameter, NestedStack, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /* eslint-disable @aws-cdk/no-core-construct */ diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.ts index 2a27565973b3e..79b78eb2d6132 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.ts @@ -2,9 +2,6 @@ import * as path from 'path'; import * as lambda from '@aws-cdk/aws-lambda'; import { App, NestedStack, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /* eslint-disable @aws-cdk/no-core-construct */ diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts index ebbe5b3817156..ac60c82dd3885 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts @@ -1,9 +1,6 @@ /// !cdk-integ pragma:ignore-assets import * as sns from '@aws-cdk/aws-sns'; import { App, NestedStack, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /* eslint-disable @aws-cdk/no-core-construct */ diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.ts index b56fdde6447f7..2f5e569eb1a9e 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs1.ts @@ -2,13 +2,8 @@ // nested stack references a resource from a non-nested non-parent stack -/* eslint-disable @aws-cdk/no-core-construct */ - import * as sns from '@aws-cdk/aws-sns'; import { App, NestedStack, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; class ConsumerNestedStack extends NestedStack { diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.ts index cc1c2bd2de044..e77ca235555ef 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs2.ts @@ -1,9 +1,6 @@ /// !cdk-integ * import * as sns from '@aws-cdk/aws-sns'; import { App, Fn, NestedStack, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; // non-nested non-parent stack consumes a resource from a nested stack diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.ts index 0c05507f58620..d2ba9f6a4f71d 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-refs3.ts @@ -1,9 +1,6 @@ /// !cdk-integ * import * as sns from '@aws-cdk/aws-sns'; import { App, Fn, NestedStack, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; // references between siblings diff --git a/packages/@aws-cdk/aws-cloudformation/test/nested-stack.test.ts b/packages/@aws-cdk/aws-cloudformation/test/nested-stack.test.ts index a2e14283e5302..f8f70d3dd58fc 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/nested-stack.test.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/nested-stack.test.ts @@ -6,11 +6,8 @@ import * as sns from '@aws-cdk/aws-sns'; import { describeDeprecated } from '@aws-cdk/cdk-build-tools'; import { App, CfnParameter, CfnResource, ContextProvider, LegacyStackSynthesizer, Names, Stack } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; -import { NestedStack } from '../lib/nested-stack'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { NestedStack } from '../lib/nested-stack'; /* eslint-disable @aws-cdk/no-core-construct */ /* eslint-disable max-len */ diff --git a/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts b/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts index 5d94702ba143a..3f60e6a09e729 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/resource.test.ts @@ -3,11 +3,8 @@ import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; import { describeDeprecated, testDeprecated } from '@aws-cdk/cdk-build-tools'; import * as cdk from '@aws-cdk/core'; -import { CustomResource, CustomResourceProvider } from '../lib'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { CustomResource, CustomResourceProvider } from '../lib'; /* eslint-disable @aws-cdk/no-core-construct */ /* eslint-disable quote-props */ diff --git a/packages/@aws-cdk/aws-cloudfront/lib/origin.ts b/packages/@aws-cdk/aws-cloudfront/lib/origin.ts index 9ceaabfdab756..0640a19a2e5ba 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/origin.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/origin.ts @@ -1,9 +1,6 @@ import { Duration, Token } from '@aws-cdk/core'; -import { CfnDistribution } from './cloudfront.generated'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { CfnDistribution } from './cloudfront.generated'; /** * The failover configuration used for Origin Groups, diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/lib/ec2.ts b/packages/@aws-cdk/aws-cloudwatch-actions/lib/ec2.ts index 5fbabfa7c8472..9e7ac47cf3b5e 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/lib/ec2.ts +++ b/packages/@aws-cdk/aws-cloudwatch-actions/lib/ec2.ts @@ -1,8 +1,5 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import { Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/lib/ssm.ts b/packages/@aws-cdk/aws-cloudwatch-actions/lib/ssm.ts index 611d2b5a4fac2..663fd7817ffc7 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/lib/ssm.ts +++ b/packages/@aws-cdk/aws-cloudwatch-actions/lib/ssm.ts @@ -1,8 +1,5 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import { Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/alarm-action.ts b/packages/@aws-cdk/aws-cloudwatch/lib/alarm-action.ts index da3676162e32f..66e47e8568d5f 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/alarm-action.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/alarm-action.ts @@ -1,8 +1,5 @@ -import { IAlarm } from './alarm-base'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { IAlarm } from './alarm-base'; /** * Interface for objects that can be the targets of CloudWatch alarm actions diff --git a/packages/@aws-cdk/aws-codebuild/lib/linux-gpu-build-image.ts b/packages/@aws-cdk/aws-codebuild/lib/linux-gpu-build-image.ts index 6635415f96639..bbdf6d50517fc 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/linux-gpu-build-image.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/linux-gpu-build-image.ts @@ -1,6 +1,7 @@ import * as ecr from '@aws-cdk/aws-ecr'; import * as core from '@aws-cdk/core'; import { FactName } from '@aws-cdk/region-info'; +import { Construct } from 'constructs'; import { BuildSpec } from './build-spec'; import { runScriptLinuxBuildSpec } from './private/run-script-linux-build-spec'; import { @@ -8,10 +9,6 @@ import { ImagePullPrincipalType, IProject, } from './project'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * A CodeBuild GPU image running Linux. * diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 2fb2a07c2c47a..6712a4f362c55 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -10,6 +10,7 @@ import * as s3 from '@aws-cdk/aws-s3'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import { ArnFormat, Aws, Duration, IResource, Lazy, Names, PhysicalName, Reference, Resource, SecretValue, Stack, Token, TokenComparison, Tokenization } from '@aws-cdk/core'; import { Construct, IConstruct } from 'constructs'; +import { IArtifacts } from './artifacts'; import { BuildSpec } from './build-spec'; import { Cache } from './cache'; import { CodeBuildMetrics } from './codebuild-canned-metrics.generated'; @@ -23,7 +24,6 @@ import { LoggingOptions } from './project-logs'; import { renderReportGroupArn } from './report-group-utils'; import { ISource } from './source'; import { CODEPIPELINE_SOURCE_ARTIFACTS_TYPE, NO_SOURCE_TYPE } from './source-types'; -import { IArtifacts } from './artifacts'; const VPC_POLICY_SYM = Symbol.for('@aws-cdk/aws-codebuild.roleVpcPolicy'); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/alexa-ask/deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/alexa-ask/deploy-action.ts index 5ff461c20eda6..d1ccb2a36339a 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/alexa-ask/deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/alexa-ask/deploy-action.ts @@ -1,10 +1,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import { SecretValue } from '@aws-cdk/core'; -import { Action } from '../action'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { Action } from '../action'; /** * Construction properties of the {@link AlexaSkillDeployAction Alexa deploy Action}. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/bitbucket/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/bitbucket/source-action.ts index 8ebe155096375..6bab1e2275a18 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/bitbucket/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/bitbucket/source-action.ts @@ -1,10 +1,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as events from '@aws-cdk/aws-events'; -import { CodeStarConnectionsSourceAction, CodeStarConnectionsSourceActionProps } from '../codestar-connections/source-action'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { CodeStarConnectionsSourceAction, CodeStarConnectionsSourceActionProps } from '../codestar-connections/source-action'; /** * Construction properties for {@link BitBucketSourceAction}. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/private/singleton-policy.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/private/singleton-policy.ts index 5f31c36563e37..e2bc7cbf7cee3 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/private/singleton-policy.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/private/singleton-policy.ts @@ -1,8 +1,5 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackinstances-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackinstances-action.ts index 211d9c0ce19e5..e5170318699c0 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackinstances-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackinstances-action.ts @@ -1,13 +1,10 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { validatePercentage } from '../common'; import { SingletonPolicy } from './private/singleton-policy'; import { CommonCloudFormationStackSetOptions, StackInstances, StackSetParameters } from './stackset-types'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties for the CloudFormationDeployStackInstancesAction */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackset-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackset-action.ts index 9ff45e23d556b..4ed0eebc319f1 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackset-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/cloudformation/stackset-action.ts @@ -1,14 +1,11 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { validatePercentage } from '../common'; import { parseCapabilities, SingletonPolicy } from './private/singleton-policy'; import { CommonCloudFormationStackSetOptions, StackInstances, StackSetDeploymentModel, StackSetParameters, StackSetTemplate } from './stackset-types'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties for the CloudFormationDeployStackSetAction */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts index dd7fd6dc9ebca..c26b12d9bf0bc 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts @@ -2,8 +2,8 @@ import * as codebuild from '@aws-cdk/aws-codebuild'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; -import { CodeStarConnectionsSourceAction } from '..'; import { Construct } from 'constructs'; +import { CodeStarConnectionsSourceAction } from '..'; import { Action } from '../action'; import { CodeCommitSourceAction } from '../codecommit/source-action'; diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts index 91d3f55dadc7d..884ada9221ddc 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codecommit/source-action.ts @@ -3,13 +3,10 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as targets from '@aws-cdk/aws-events-targets'; import * as iam from '@aws-cdk/aws-iam'; import { Names, Stack, Token, TokenComparison } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * How should the CodeCommit Action detect changes. * This is the type of the {@link CodeCommitSourceAction.trigger} property. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts index a3dfd31d43733..049efe79e2043 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts @@ -2,11 +2,8 @@ import * as codedeploy from '@aws-cdk/aws-codedeploy'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; import { Lazy } from '@aws-cdk/core'; -import { Action } from '../action'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { Action } from '../action'; /** * Configuration for replacing a placeholder string in the ECS task diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/server-deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/server-deploy-action.ts index 0abfd9d0e3513..7195fb81453e8 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/server-deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/server-deploy-action.ts @@ -1,13 +1,10 @@ import * as codedeploy from '@aws-cdk/aws-codedeploy'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { deployArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Construction properties of the {@link CodeDeployServerDeployAction CodeDeploy server deploy CodePipeline Action}. */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codestar-connections/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codestar-connections/source-action.ts index 926762b67f3fb..545cea6bc792f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codestar-connections/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codestar-connections/source-action.ts @@ -1,13 +1,9 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; - +import { Construct } from 'constructs'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * The CodePipeline variables emitted by CodeStar source Action. */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts index 6a71360277a57..c48ce3dcb4281 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecr/source-action.ts @@ -3,13 +3,10 @@ import * as ecr from '@aws-cdk/aws-ecr'; import * as targets from '@aws-cdk/aws-events-targets'; import * as iam from '@aws-cdk/aws-iam'; import { Names } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * The CodePipeline variables emitted by the ECR source Action. */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts index b90bb6ff477e5..3e566d87a5a06 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/ecs/deploy-action.ts @@ -2,13 +2,10 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ecs from '@aws-cdk/aws-ecs'; import * as iam from '@aws-cdk/aws-iam'; import { Duration } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { deployArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Construction properties of {@link EcsDeployAction}. */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts index 17c396773414c..33e3ced8df351 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/github/source-action.ts @@ -1,12 +1,9 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import { SecretValue } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * If and how the GitHub source action should be triggered */ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/jenkins/jenkins-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/jenkins/jenkins-action.ts index ab381fe85e97e..c7a9a63b808f6 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/jenkins/jenkins-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/jenkins/jenkins-action.ts @@ -1,11 +1,8 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { IJenkinsProvider, jenkinsArtifactsBounds } from './jenkins-provider'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * The type of the Jenkins Action that determines its CodePipeline Category - * Build, or Test. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/lambda/invoke-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/lambda/invoke-action.ts index 7ead4270efb0c..5fe5eeb133f06 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/lambda/invoke-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/lambda/invoke-action.ts @@ -2,11 +2,8 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import { Stack } from '@aws-cdk/core'; -import { Action } from '../action'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { Action } from '../action'; /** * Construction properties of the {@link LambdaInvokeAction Lambda invoke CodePipeline Action}. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts index 31cc2ecd77be9..dea699e3bea37 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/s3/source-action.ts @@ -2,13 +2,10 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as targets from '@aws-cdk/aws-events-targets'; import * as s3 from '@aws-cdk/aws-s3'; import { Names, Token } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Action } from '../action'; import { sourceArtifactBounds } from '../common'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * How should the S3 Action detect changes. * This is the type of the {@link S3SourceAction.trigger} property. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts index 3daa2d5d6257a..416dfa3e0f855 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts @@ -1,10 +1,7 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; -import { Action } from '../action'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { Action } from '../action'; /** * Construction properties of the {@link ServiceCatalogDeployActionBeta1 ServiceCatalog deploy CodePipeline Action}. diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts index 54499f8ba9a14..9fbb9ea2d153e 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts @@ -1,9 +1,9 @@ import { Template } from '@aws-cdk/assertions'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as s3 from '@aws-cdk/aws-s3'; +import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag'; import { App, Duration, SecretValue, Stack } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; -import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag'; import * as cpactions from '../../lib'; /* eslint-disable quote-props */ diff --git a/packages/@aws-cdk/aws-codepipeline/lib/action.ts b/packages/@aws-cdk/aws-codepipeline/lib/action.ts index e827812a5fc40..0eb25ea175ffe 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/action.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/action.ts @@ -3,11 +3,8 @@ import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import { IResource, Lazy } from '@aws-cdk/core'; -import { Artifact } from './artifact'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { Artifact } from './artifact'; export enum ActionCategory { SOURCE = 'Source', diff --git a/packages/@aws-cdk/aws-codepipeline/lib/private/rich-action.ts b/packages/@aws-cdk/aws-codepipeline/lib/private/rich-action.ts index 2d2f8b82482a6..2b6499013c06d 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/private/rich-action.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/private/rich-action.ts @@ -1,10 +1,7 @@ import * as events from '@aws-cdk/aws-events'; import { ResourceEnvironment, Stack, Token, TokenComparison } from '@aws-cdk/core'; -import { ActionBindOptions, ActionConfig, ActionProperties, IAction, IPipeline, IStage } from '../action'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { ActionBindOptions, ActionConfig, ActionProperties, IAction, IPipeline, IStage } from '../action'; /** * Helper routines to work with Actions diff --git a/packages/@aws-cdk/aws-codepipeline/test/pipeline.test.ts b/packages/@aws-cdk/aws-codepipeline/test/pipeline.test.ts index dd4f79d040201..27db5eaf16629 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/pipeline.test.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/pipeline.test.ts @@ -4,14 +4,11 @@ import * as kms from '@aws-cdk/aws-kms'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; +import { Construct } from 'constructs'; import * as codepipeline from '../lib'; import { FakeBuildAction } from './fake-build-action'; import { FakeSourceAction } from './fake-source-action'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /* eslint-disable quote-props */ describe('', () => { diff --git a/packages/@aws-cdk/aws-ec2/lib/cfn-init.ts b/packages/@aws-cdk/aws-ec2/lib/cfn-init.ts index 03a8529da30a8..2292468725021 100644 --- a/packages/@aws-cdk/aws-ec2/lib/cfn-init.ts +++ b/packages/@aws-cdk/aws-ec2/lib/cfn-init.ts @@ -1,15 +1,12 @@ import * as crypto from 'crypto'; import * as iam from '@aws-cdk/aws-iam'; import { Aws, CfnResource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { InitElement } from './cfn-init-elements'; import { OperatingSystemType } from './machine-image'; import { InitBindOptions, InitElementConfig, InitElementType, InitPlatform } from './private/cfn-init-internal'; import { UserData } from './user-data'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * A CloudFormation-init configuration */ diff --git a/packages/@aws-cdk/aws-ec2/lib/machine-image.ts b/packages/@aws-cdk/aws-ec2/lib/machine-image.ts index 2b7c14c2705fa..a9d8bce42ccb9 100644 --- a/packages/@aws-cdk/aws-ec2/lib/machine-image.ts +++ b/packages/@aws-cdk/aws-ec2/lib/machine-image.ts @@ -2,13 +2,10 @@ import * as ssm from '@aws-cdk/aws-ssm'; import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { ContextProvider, CfnMapping, Aws, Stack, Token } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; +import { Construct } from 'constructs'; import { UserData } from './user-data'; import { WindowsVersion } from './windows-versions'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Interface for classes that can select an appropriate machine image to use */ diff --git a/packages/@aws-cdk/aws-ec2/lib/private/ebs-util.ts b/packages/@aws-cdk/aws-ec2/lib/private/ebs-util.ts index 80787c2224d4d..c4cce48152d89 100644 --- a/packages/@aws-cdk/aws-ec2/lib/private/ebs-util.ts +++ b/packages/@aws-cdk/aws-ec2/lib/private/ebs-util.ts @@ -1,11 +1,8 @@ import { Annotations } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { CfnInstance, CfnLaunchTemplate } from '../ec2.generated'; import { BlockDevice, EbsDeviceVolumeType } from '../volume'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - export function instanceBlockDeviceMappings(construct: Construct, blockDevices: BlockDevice[]): CfnInstance.BlockDeviceMappingProperty[] { return synthesizeBlockDeviceMappings(construct, blockDevices, {}); } diff --git a/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts b/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts index 68460e80cdb69..9f46b24289aa6 100644 --- a/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts +++ b/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts @@ -1,14 +1,11 @@ import * as fs from 'fs'; import * as path from 'path'; +import { FingerprintOptions, FollowMode, IAsset } from '@aws-cdk/assets'; import * as ecr from '@aws-cdk/aws-ecr'; import { Annotations, AssetStaging, FeatureFlags, FileFingerprintOptions, IgnoreMode, Stack, SymlinkFollowMode, Token, Stage, CfnResource } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line -import { FingerprintOptions, FollowMode, IAsset } from '@aws-cdk/assets'; - /** * networking mode on build time supported by docker */ diff --git a/packages/@aws-cdk/aws-ecr-assets/lib/tarball-asset.ts b/packages/@aws-cdk/aws-ecr-assets/lib/tarball-asset.ts index 0101d80bf7a5a..2388027e3b4cd 100644 --- a/packages/@aws-cdk/aws-ecr-assets/lib/tarball-asset.ts +++ b/packages/@aws-cdk/aws-ecr-assets/lib/tarball-asset.ts @@ -1,13 +1,10 @@ import * as fs from 'fs'; import * as path from 'path'; +import { IAsset } from '@aws-cdk/assets'; import * as ecr from '@aws-cdk/aws-ecr'; import { AssetStaging, Stack, Stage } from '@aws-cdk/core'; import { Construct } from 'constructs'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line -import { IAsset } from '@aws-cdk/assets'; - /** * Options for TarballImageAsset */ diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts b/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts index 75baad391f4e2..d136ae68af845 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts @@ -1,13 +1,10 @@ import * as iam from '@aws-cdk/aws-iam'; import { Lazy, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Mapping } from './aws-auth-mapping'; import { Cluster } from './cluster'; import { KubernetesResource } from './k8s-resource'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - export interface AwsAuthProps { /** * The EKS cluster to apply this configuration to. diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/cluster-resource.ts b/packages/@aws-cdk/aws-eks-legacy/lib/cluster-resource.ts index 279fa6cdf8c04..76b0a49497c3b 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/cluster-resource.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/cluster-resource.ts @@ -2,13 +2,10 @@ import * as path from 'path'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import { CustomResource, Duration, Token } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { CfnClusterProps } from './eks.generated'; import { KubectlLayer } from './kubectl-layer'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * A low-level CFN resource Amazon EKS cluster implemented through a custom * resource. diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts b/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts index dbd73324f22c4..4b869b43af951 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts @@ -5,6 +5,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as ssm from '@aws-cdk/aws-ssm'; import { Annotations, CfnOutput, Duration, IResource, Resource, Stack, Token, Tags } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { AwsAuth } from './aws-auth'; import { ClusterResource } from './cluster-resource'; import { CfnCluster, CfnClusterProps } from './eks.generated'; @@ -14,10 +15,6 @@ import { KubectlLayer } from './kubectl-layer'; import { spotInterruptHandler } from './spot-interrupt-handler'; import { renderUserData } from './user-data'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - // defaults are based on https://eksctl.io const DEFAULT_CAPACITY_COUNT = 2; const DEFAULT_CAPACITY_TYPE = ec2.InstanceType.of(ec2.InstanceClass.M5, ec2.InstanceSize.LARGE); diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts b/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts index 0a8afb0e97530..6b84586777e16 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/helm-chart.ts @@ -1,13 +1,10 @@ import * as path from 'path'; import * as lambda from '@aws-cdk/aws-lambda'; import { CustomResource, Duration, Names, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Cluster } from './cluster'; import { KubectlLayer } from './kubectl-layer'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Helm Chart options. */ diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/k8s-resource.ts b/packages/@aws-cdk/aws-eks-legacy/lib/k8s-resource.ts index 366a36889de8e..a233176dd5b57 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/k8s-resource.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/k8s-resource.ts @@ -1,9 +1,6 @@ import { CustomResource, Stack } from '@aws-cdk/core'; -import { Cluster } from './cluster'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { Cluster } from './cluster'; export interface KubernetesResourceProps { /** diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/kubectl-layer.ts b/packages/@aws-cdk/aws-eks-legacy/lib/kubectl-layer.ts index a9198fe4aa2d3..34319eb1c0a10 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/kubectl-layer.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/kubectl-layer.ts @@ -1,9 +1,6 @@ import * as crypto from 'crypto'; import * as lambda from '@aws-cdk/aws-lambda'; import { CfnResource, Resource, Stack, Token } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; const KUBECTL_APP_ARN = 'arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-kubectl'; diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts index aace3e9ea9391..6f7e72d0218ab 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts @@ -1,14 +1,10 @@ import { Duration, SecretValue, Tokenization } from '@aws-cdk/core'; -import { IConstruct } from 'constructs'; +import { Construct, IConstruct } from 'constructs'; import { CfnListener } from '../elasticloadbalancingv2.generated'; import { IListenerAction } from '../shared/listener-action'; import { IApplicationListener } from './application-listener'; import { IApplicationTargetGroup } from './application-target-group'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * What to do when a client makes a request to a listener * diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener-action.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener-action.ts index 0259fcd27cdc4..ebba516f37624 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener-action.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-listener-action.ts @@ -1,13 +1,10 @@ import { Duration } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { CfnListener } from '../elasticloadbalancingv2.generated'; import { IListenerAction } from '../shared/listener-action'; import { INetworkListener } from './network-listener'; import { INetworkTargetGroup } from './network-target-group'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * What to do when a client makes a request to a listener * diff --git a/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts b/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts index 492600a86e6e1..8e0c6108a8ed6 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts @@ -3,13 +3,10 @@ import * as ecs from '@aws-cdk/aws-ecs'; import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { ContainerOverride } from './ecs-task-properties'; import { singletonEventRole } from './util'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties to define an ECS Event Task */ diff --git a/packages/@aws-cdk/aws-events/lib/schedule.ts b/packages/@aws-cdk/aws-events/lib/schedule.ts index 7224d6f866c78..acdb1595a244f 100644 --- a/packages/@aws-cdk/aws-events/lib/schedule.ts +++ b/packages/@aws-cdk/aws-events/lib/schedule.ts @@ -1,7 +1,4 @@ import { Annotations, Duration } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts b/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts index 671e4ff917e2f..7f602423bcb34 100644 --- a/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts +++ b/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts @@ -1,10 +1,7 @@ import { Template, Match } from '@aws-cdk/assertions'; import { Stack } from '@aws-cdk/core'; -import * as iam from '../lib'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import * as iam from '../lib'; /* eslint-disable quote-props */ diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.ts b/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.ts index 11c8b5bda36f4..1e1e7d0e2c9f2 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.ts +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink/test/integ.application.lit.ts @@ -1,8 +1,8 @@ ///! show import * as path from 'path'; +import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as core from '@aws-cdk/core'; import * as flink from '../lib'; -import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; const app = new core.App(); const stack = new core.Stack(app, 'FlinkAppTest'); diff --git a/packages/@aws-cdk/aws-kms/test/alias.test.ts b/packages/@aws-cdk/aws-kms/test/alias.test.ts index 8cc73fde158ab..cd5d9723ed4db 100644 --- a/packages/@aws-cdk/aws-kms/test/alias.test.ts +++ b/packages/@aws-cdk/aws-kms/test/alias.test.ts @@ -1,13 +1,10 @@ import { Template } from '@aws-cdk/assertions'; import { ArnPrincipal, PolicyStatement } from '@aws-cdk/aws-iam'; import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Alias } from '../lib/alias'; import { IKey, Key } from '../lib/key'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - test('default alias', () => { const app = new App(); const stack = new Stack(app, 'Test'); diff --git a/packages/@aws-cdk/aws-lambda-destinations/lib/event-bridge.ts b/packages/@aws-cdk/aws-lambda-destinations/lib/event-bridge.ts index fce0478f3cc58..e9f3ab5414336 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/lib/event-bridge.ts +++ b/packages/@aws-cdk/aws-lambda-destinations/lib/event-bridge.ts @@ -1,9 +1,6 @@ import * as events from '@aws-cdk/aws-events'; import * as lambda from '@aws-cdk/aws-lambda'; import { Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-lambda-destinations/lib/lambda.ts b/packages/@aws-cdk/aws-lambda-destinations/lib/lambda.ts index e573319523c78..bd79b94a2b378 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/lib/lambda.ts +++ b/packages/@aws-cdk/aws-lambda-destinations/lib/lambda.ts @@ -1,11 +1,8 @@ import * as events from '@aws-cdk/aws-events'; import * as targets from '@aws-cdk/aws-events-targets'; import * as lambda from '@aws-cdk/aws-lambda'; -import { EventBridgeDestination } from './event-bridge'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { EventBridgeDestination } from './event-bridge'; /** * Options for a Lambda destination diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts index ab34eb865364c..bf89ca34cd244 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts @@ -4,8 +4,8 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import { Stack, Names } from '@aws-cdk/core'; -import { StreamEventSource, BaseStreamEventSourceProps } from './stream'; import { Construct } from 'constructs'; +import { StreamEventSource, BaseStreamEventSourceProps } from './stream'; /** * Properties for a Kafka event source diff --git a/packages/@aws-cdk/aws-lambda-python/lib/function.ts b/packages/@aws-cdk/aws-lambda-python/lib/function.ts index a6236fe0ce0d4..1bb9b86db5d55 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda-python/lib/function.ts @@ -1,8 +1,8 @@ import * as fs from 'fs'; import * as path from 'path'; -import { Construct } from 'constructs'; import { Function, FunctionOptions, Runtime, RuntimeFamily } from '@aws-cdk/aws-lambda'; import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Bundling } from './bundling'; import { BundlingOptions } from './types'; diff --git a/packages/@aws-cdk/aws-lambda-python/lib/layer.ts b/packages/@aws-cdk/aws-lambda-python/lib/layer.ts index 3ed2f30a25c46..add8824d972a8 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/layer.ts +++ b/packages/@aws-cdk/aws-lambda-python/lib/layer.ts @@ -1,13 +1,10 @@ import * as path from 'path'; import * as lambda from '@aws-cdk/aws-lambda'; import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { Bundling } from './bundling'; import { BundlingOptions } from './types'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties for PythonLayerVersion */ diff --git a/packages/@aws-cdk/aws-lambda/lib/destination.ts b/packages/@aws-cdk/aws-lambda/lib/destination.ts index 1a80c06b0a0e9..256c12820a6a3 100644 --- a/packages/@aws-cdk/aws-lambda/lib/destination.ts +++ b/packages/@aws-cdk/aws-lambda/lib/destination.ts @@ -1,8 +1,5 @@ -import { IFunction } from './function-base'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { IFunction } from './function-base'; /** * A destination configuration diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index be833695e73b7..dde2d6a212f2a 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -3,7 +3,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import { Annotations, ArnFormat, IResource, Resource, Token } from '@aws-cdk/core'; -import { Node } from 'constructs'; +import { Construct, Node } from 'constructs'; import { AliasOptions } from './alias'; import { Architecture } from './architecture'; import { EventInvokeConfig, EventInvokeConfigOptions } from './event-invoke-config'; @@ -15,10 +15,6 @@ import { CfnPermission } from './lambda.generated'; import { Permission } from './permission'; import { addAlias, flatMap } from './util'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - export interface IFunction extends IResource, ec2.IConnectable, iam.IGrantable { /** diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index 7930c8fd7b431..8f398c9d40b93 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -23,11 +23,8 @@ import { LambdaInsightsVersion } from './lambda-insights'; import { Version, VersionOptions } from './lambda-version'; import { CfnFunction } from './lambda.generated'; import { LayerVersion, ILayerVersion } from './layers'; -import { Runtime } from './runtime'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line import { LogRetentionRetryOptions } from './log-retention'; +import { Runtime } from './runtime'; import { addAlias } from './util'; /** diff --git a/packages/@aws-cdk/aws-lambda/lib/permission.ts b/packages/@aws-cdk/aws-lambda/lib/permission.ts index 1d4da4085066e..c493722e2f543 100644 --- a/packages/@aws-cdk/aws-lambda/lib/permission.ts +++ b/packages/@aws-cdk/aws-lambda/lib/permission.ts @@ -1,7 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; +import { Construct } from 'constructs'; import { FunctionUrlAuthType } from './function-url'; -import { Construct } from 'constructs'; /** * Represents a permission statement that can be added to a Lambda function's diff --git a/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts b/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts index b04a1964e015d..8ac9400636eef 100644 --- a/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts +++ b/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts @@ -1,10 +1,7 @@ import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import { Token } from '@aws-cdk/core'; -import { IScalableFunctionAttribute, UtilizationScalingOptions } from '../scalable-attribute-api'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { IScalableFunctionAttribute, UtilizationScalingOptions } from '../scalable-attribute-api'; /** * A scalable lambda alias attribute diff --git a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts index 87d9966a63a79..c9f58d8b546a1 100644 --- a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts +++ b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts @@ -1,10 +1,10 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import { ArnFormat } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { ILogGroup } from './log-group'; import { CfnDestination } from './logs.generated'; import { ILogSubscriptionDestination, LogSubscriptionDestinationConfig } from './subscription-filter'; -import { ArnFormat } from '@aws-cdk/core'; /** * Properties for a CrossAccountDestination diff --git a/packages/@aws-cdk/aws-logs/lib/log-retention.ts b/packages/@aws-cdk/aws-logs/lib/log-retention.ts index 6c49d3f18364e..27029481bfbc9 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-retention.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-retention.ts @@ -2,13 +2,10 @@ import * as path from 'path'; import * as iam from '@aws-cdk/aws-iam'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import * as cdk from '@aws-cdk/core'; +import { ArnFormat } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { RetentionDays } from './log-group'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { ArnFormat } from '@aws-cdk/core'; - /** * Construction properties for a LogRetention. */ diff --git a/packages/@aws-cdk/aws-opensearchservice/lib/log-group-resource-policy.ts b/packages/@aws-cdk/aws-opensearchservice/lib/log-group-resource-policy.ts index 3d082425dd93c..0a88658e1cf42 100644 --- a/packages/@aws-cdk/aws-opensearchservice/lib/log-group-resource-policy.ts +++ b/packages/@aws-cdk/aws-opensearchservice/lib/log-group-resource-policy.ts @@ -1,8 +1,5 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cr from '@aws-cdk/custom-resources'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-opensearchservice/lib/opensearch-access-policy.ts b/packages/@aws-cdk/aws-opensearchservice/lib/opensearch-access-policy.ts index 9f2b8f4df905f..b9e9acc3a37c6 100644 --- a/packages/@aws-cdk/aws-opensearchservice/lib/opensearch-access-policy.ts +++ b/packages/@aws-cdk/aws-opensearchservice/lib/opensearch-access-policy.ts @@ -1,9 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; import * as cr from '@aws-cdk/custom-resources'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-rds/lib/private/util.ts b/packages/@aws-cdk/aws-rds/lib/private/util.ts index 9bace496400cd..c96d781abe049 100644 --- a/packages/@aws-cdk/aws-rds/lib/private/util.ts +++ b/packages/@aws-cdk/aws-rds/lib/private/util.ts @@ -2,14 +2,11 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import { RemovalPolicy } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { DatabaseSecret } from '../database-secret'; import { IEngine } from '../engine'; import { CommonRotationUserOptions, Credentials } from '../props'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * The default set of characters we exclude from generated passwords for database users. * It's a combination of characters that have a tendency to cause problems in shell scripts, diff --git a/packages/@aws-cdk/aws-redshift/lib/private/database-query.ts b/packages/@aws-cdk/aws-redshift/lib/private/database-query.ts index 02016ec9eb57f..d87c72ffdcf8f 100644 --- a/packages/@aws-cdk/aws-redshift/lib/private/database-query.ts +++ b/packages/@aws-cdk/aws-redshift/lib/private/database-query.ts @@ -4,14 +4,11 @@ import * as lambda from '@aws-cdk/aws-lambda'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as cdk from '@aws-cdk/core'; import * as customresources from '@aws-cdk/custom-resources'; +import { Construct } from 'constructs'; import { Cluster } from '../cluster'; import { DatabaseOptions } from '../database-options'; import { DatabaseQueryHandlerProps } from './handler-props'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - export interface DatabaseQueryProps extends DatabaseOptions { readonly handler: string; readonly properties: HandlerProps; diff --git a/packages/@aws-cdk/aws-redshift/lib/private/privileges.ts b/packages/@aws-cdk/aws-redshift/lib/private/privileges.ts index 8e8d2d82421ba..01b2d5f34ae0d 100644 --- a/packages/@aws-cdk/aws-redshift/lib/private/privileges.ts +++ b/packages/@aws-cdk/aws-redshift/lib/private/privileges.ts @@ -1,4 +1,5 @@ import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { DatabaseOptions } from '../database-options'; import { ITable, TableAction } from '../table'; import { IUser } from '../user'; @@ -6,10 +7,6 @@ import { DatabaseQuery } from './database-query'; import { HandlerName } from './database-query-provider/handler-name'; import { TablePrivilege as SerializedTablePrivilege, UserTablePrivilegesHandlerProps } from './handler-props'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * The Redshift table and action that make up a privilege that can be granted to a Redshift user. */ diff --git a/packages/@aws-cdk/aws-redshift/lib/table.ts b/packages/@aws-cdk/aws-redshift/lib/table.ts index 0ac879210f829..58b39c1b88bfd 100644 --- a/packages/@aws-cdk/aws-redshift/lib/table.ts +++ b/packages/@aws-cdk/aws-redshift/lib/table.ts @@ -1,4 +1,5 @@ import * as cdk from '@aws-cdk/core'; +import { Construct, IConstruct } from 'constructs'; import { ICluster } from './cluster'; import { DatabaseOptions } from './database-options'; import { DatabaseQuery } from './private/database-query'; @@ -7,10 +8,6 @@ import { getDistKeyColumn, getSortKeyColumns } from './private/database-query-pr import { TableHandlerProps } from './private/handler-props'; import { IUser } from './user'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct, IConstruct } from 'constructs'; - /** * An action that a Redshift user can be granted privilege to perform on a table. */ diff --git a/packages/@aws-cdk/aws-redshift/lib/user.ts b/packages/@aws-cdk/aws-redshift/lib/user.ts index 932918a79d71e..717cdc82ce024 100644 --- a/packages/@aws-cdk/aws-redshift/lib/user.ts +++ b/packages/@aws-cdk/aws-redshift/lib/user.ts @@ -1,6 +1,7 @@ import * as kms from '@aws-cdk/aws-kms'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as cdk from '@aws-cdk/core'; +import { Construct, IConstruct } from 'constructs'; import { ICluster } from './cluster'; import { DatabaseOptions } from './database-options'; import { DatabaseSecret } from './database-secret'; @@ -10,10 +11,6 @@ import { UserHandlerProps } from './private/handler-props'; import { UserTablePrivileges } from './private/privileges'; import { ITable, TableAction } from './table'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct, IConstruct } from 'constructs'; - /** * Properties for configuring a Redshift user. */ diff --git a/packages/@aws-cdk/aws-route53/lib/util.ts b/packages/@aws-cdk/aws-route53/lib/util.ts index 05844a5fd2c6e..285a5d46b3646 100644 --- a/packages/@aws-cdk/aws-route53/lib/util.ts +++ b/packages/@aws-cdk/aws-route53/lib/util.ts @@ -1,9 +1,6 @@ import { Stack } from '@aws-cdk/core'; -import { IHostedZone } from './hosted-zone-ref'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { IHostedZone } from './hosted-zone-ref'; /** * Validates a zone name is valid by Route53 specifc naming rules, diff --git a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts index 47752e7e8c9c5..bd2fe20dfaeb7 100644 --- a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts +++ b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts @@ -1,4 +1,5 @@ import * as path from 'path'; +import { CopyOptions } from '@aws-cdk/assets'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as s3 from '@aws-cdk/aws-s3'; @@ -7,10 +8,6 @@ import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { toSymlinkFollow } from './compat'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { CopyOptions } from '@aws-cdk/assets'; - export interface AssetOptions extends CopyOptions, cdk.FileCopyOptions, cdk.AssetOptions { /** * A list of principals that should be able to read this asset from S3. diff --git a/packages/@aws-cdk/aws-s3-deployment/lib/render-data.ts b/packages/@aws-cdk/aws-s3-deployment/lib/render-data.ts index b413a5bdf8183..24b13d3519f16 100644 --- a/packages/@aws-cdk/aws-s3-deployment/lib/render-data.ts +++ b/packages/@aws-cdk/aws-s3-deployment/lib/render-data.ts @@ -1,7 +1,4 @@ import { Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; export interface Content { diff --git a/packages/@aws-cdk/aws-s3-deployment/lib/source.ts b/packages/@aws-cdk/aws-s3-deployment/lib/source.ts index 12952e1673f46..a570f84cfacdb 100644 --- a/packages/@aws-cdk/aws-s3-deployment/lib/source.ts +++ b/packages/@aws-cdk/aws-s3-deployment/lib/source.ts @@ -4,11 +4,8 @@ import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import { FileSystem, Stack } from '@aws-cdk/core'; -import { renderData } from './render-data'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { renderData } from './render-data'; /** * Source information. diff --git a/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts b/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts index d74b48483d0ed..7bec8f04d2170 100644 --- a/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts +++ b/packages/@aws-cdk/aws-s3-notifications/lib/lambda.ts @@ -2,9 +2,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as s3 from '@aws-cdk/aws-s3'; import { CfnResource, Names, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; /** diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/cloudformation-template.ts b/packages/@aws-cdk/aws-servicecatalog/lib/cloudformation-template.ts index 3054bc109280e..07af9b2cc822d 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/cloudformation-template.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/cloudformation-template.ts @@ -1,11 +1,8 @@ import * as s3_assets from '@aws-cdk/aws-s3-assets'; +import { Construct } from 'constructs'; import { hashValues } from './private/util'; import { ProductStack } from './product-stack'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Represents the Product Provisioning Artifact Template. */ diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts b/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts index cfe92db543a8e..376824d664af6 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/portfolio.ts @@ -1,6 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as sns from '@aws-cdk/aws-sns'; import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { MessageLanguage } from './common'; import { CloudFormationRuleConstraintOptions, CommonConstraintOptions, @@ -13,10 +14,6 @@ import { IProduct } from './product'; import { CfnPortfolio, CfnPortfolioPrincipalAssociation, CfnPortfolioShare } from './servicecatalog.generated'; import { TagOptions } from './tag-options'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Options for portfolio share. */ diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/product-stack-history.ts b/packages/@aws-cdk/aws-servicecatalog/lib/product-stack-history.ts index 2fe578494f64d..5d62fa2e50547 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/product-stack-history.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/product-stack-history.ts @@ -1,15 +1,12 @@ import * as fs from 'fs'; import * as path from 'path'; import { Names } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { CloudFormationTemplate } from './cloudformation-template'; import { DEFAULT_PRODUCT_STACK_SNAPSHOT_DIRECTORY } from './common'; import { CloudFormationProductVersion } from './product'; import { ProductStack } from './product-stack'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties for a ProductStackHistory. */ diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/product-stack.ts b/packages/@aws-cdk/aws-servicecatalog/lib/product-stack.ts index 5e6d1d64a15eb..216b0b90b1d12 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/product-stack.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/product-stack.ts @@ -2,13 +2,10 @@ import * as crypto from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { ProductStackSynthesizer } from './private/product-stack-synthesizer'; import { ProductStackHistory } from './product-stack-history'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * A Service Catalog product stack, which is similar in form to a Cloudformation nested stack. * You can add the resources to this stack that you want to define for your service catalog product. diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/tag-options.ts b/packages/@aws-cdk/aws-servicecatalog/lib/tag-options.ts index b0342c6336bd3..07a4cdcbe935c 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/tag-options.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/tag-options.ts @@ -1,12 +1,9 @@ import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { hashValues } from './private/util'; import { InputValidator } from './private/validation'; import { CfnTagOption } from './servicecatalog.generated'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties for TagOptions. */ diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts index 2006e7cce1bdb..7fcdc313102a0 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts @@ -1,13 +1,10 @@ import * as crypto from 'crypto'; import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { IAttributeGroup } from './attribute-group'; import { InputValidator } from './private/validation'; import { CfnApplication, CfnAttributeGroupAssociation, CfnResourceAssociation } from './servicecatalogappregistry.generated'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * A Service Catalog AppRegistry Application. */ diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts index 11fde74fb968e..02af6db135a6e 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts @@ -1,11 +1,8 @@ import * as cdk from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { InputValidator } from './private/validation'; import { CfnAttributeGroup } from './servicecatalogappregistry.generated'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * A Service Catalog AppRegistry Attribute Group. */ diff --git a/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts b/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts index b4d44235c5cec..7b5446abbdf23 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/lib/lambda.ts @@ -2,11 +2,8 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; import { ArnFormat, Names, Stack, Token } from '@aws-cdk/core'; -import { SubscriptionProps } from './subscription'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { SubscriptionProps } from './subscription'; /** * Properties for a Lambda subscription diff --git a/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts b/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts index db93c987a00a6..8b8f533ad6788 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts @@ -2,11 +2,8 @@ import * as iam from '@aws-cdk/aws-iam'; import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; import { ArnFormat, Names, Stack, Token } from '@aws-cdk/core'; -import { SubscriptionProps } from './subscription'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { SubscriptionProps } from './subscription'; /** * Properties for an SQS subscription diff --git a/packages/@aws-cdk/aws-sns/lib/subscriber.ts b/packages/@aws-cdk/aws-sns/lib/subscriber.ts index 8cac6b4f5d223..a52ee834cab11 100644 --- a/packages/@aws-cdk/aws-sns/lib/subscriber.ts +++ b/packages/@aws-cdk/aws-sns/lib/subscriber.ts @@ -1,10 +1,7 @@ +import { Construct } from 'constructs'; import { SubscriptionOptions } from './subscription'; import { ITopic } from './topic-base'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Subscription configuration */ diff --git a/packages/@aws-cdk/aws-sns/lib/topic-base.ts b/packages/@aws-cdk/aws-sns/lib/topic-base.ts index c6ce471980b75..35fef62dc2e0f 100644 --- a/packages/@aws-cdk/aws-sns/lib/topic-base.ts +++ b/packages/@aws-cdk/aws-sns/lib/topic-base.ts @@ -2,14 +2,11 @@ import * as notifications from '@aws-cdk/aws-codestarnotifications'; import * as iam from '@aws-cdk/aws-iam'; import { IResource, Resource, ResourceProps, Token } from '@aws-cdk/core'; import * as constructs from 'constructs'; +import { Construct } from 'constructs'; import { TopicPolicy } from './policy'; import { ITopicSubscription } from './subscriber'; import { Subscription } from './subscription'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Represents an SNS topic */ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke.test.ts index 34c4afea272f3..c76288702488f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/invoke.test.ts @@ -1,8 +1,8 @@ import * as lambda from '@aws-cdk/aws-lambda'; import * as sfn from '@aws-cdk/aws-stepfunctions'; +import { testDeprecated } from '@aws-cdk/cdk-build-tools'; import { Stack } from '@aws-cdk/core'; import { LambdaInvocationType, LambdaInvoke } from '../../lib'; -import { testDeprecated } from '@aws-cdk/cdk-build-tools'; /* eslint-disable quote-props */ diff --git a/packages/@aws-cdk/aws-synthetics/test/code.test.ts b/packages/@aws-cdk/aws-synthetics/test/code.test.ts index 6b93ad9b6cebd..eb5e7d71ac330 100644 --- a/packages/@aws-cdk/aws-synthetics/test/code.test.ts +++ b/packages/@aws-cdk/aws-synthetics/test/code.test.ts @@ -1,8 +1,8 @@ import * as path from 'path'; import { Template } from '@aws-cdk/assertions'; import * as s3 from '@aws-cdk/aws-s3'; -import * as cxapi from '@aws-cdk/cx-api'; import { App, Stack } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import * as synthetics from '../lib'; import { RuntimeFamily } from '../lib'; diff --git a/packages/@aws-cdk/core/test/logical-id.test.ts b/packages/@aws-cdk/core/test/logical-id.test.ts index 4a3a6e7af2820..7edcb824007f3 100644 --- a/packages/@aws-cdk/core/test/logical-id.test.ts +++ b/packages/@aws-cdk/core/test/logical-id.test.ts @@ -1,7 +1,7 @@ +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { App, CfnElement, CfnResource, Stack } from '../lib'; import { toCloudFormation } from './util'; -import * as cxapi from '@aws-cdk/cx-api'; /** * These tests are executed once (for specific ID schemes) diff --git a/packages/@aws-cdk/custom-resources/lib/provider-framework/provider.ts b/packages/@aws-cdk/custom-resources/lib/provider-framework/provider.ts index d087f80cfd501..1f48b3801bad9 100644 --- a/packages/@aws-cdk/custom-resources/lib/provider-framework/provider.ts +++ b/packages/@aws-cdk/custom-resources/lib/provider-framework/provider.ts @@ -1,4 +1,5 @@ import * as path from 'path'; +import { CustomResourceProviderConfig, ICustomResourceProvider } from '@aws-cdk/aws-cloudformation'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; @@ -9,10 +10,6 @@ import * as consts from './runtime/consts'; import { calculateRetryPolicy } from './util'; import { WaiterStateMachine } from './waiter-state-machine'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { CustomResourceProviderConfig, ICustomResourceProvider } from '@aws-cdk/aws-cloudformation'; - const RUNTIME_HANDLER_PATH = path.join(__dirname, 'runtime'); const FRAMEWORK_HANDLER_TIMEOUT = Duration.minutes(15); // keep it simple for now diff --git a/packages/@aws-cdk/custom-resources/lib/provider-framework/waiter-state-machine.ts b/packages/@aws-cdk/custom-resources/lib/provider-framework/waiter-state-machine.ts index 6654a3925be63..90d2fd34dcf9a 100644 --- a/packages/@aws-cdk/custom-resources/lib/provider-framework/waiter-state-machine.ts +++ b/packages/@aws-cdk/custom-resources/lib/provider-framework/waiter-state-machine.ts @@ -1,9 +1,6 @@ import { Grant, IGrantable, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; import { IFunction } from '@aws-cdk/aws-lambda'; import { CfnResource, Duration, Stack } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; export interface WaiterStateMachineProps { diff --git a/packages/@aws-cdk/integ-tests/lib/assertions/assertions.ts b/packages/@aws-cdk/integ-tests/lib/assertions/assertions.ts index 4d467c7e2992c..507d6c1d158cc 100644 --- a/packages/@aws-cdk/integ-tests/lib/assertions/assertions.ts +++ b/packages/@aws-cdk/integ-tests/lib/assertions/assertions.ts @@ -1,12 +1,8 @@ import { CustomResource, CfnOutput } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { ExpectedResult, ActualResult } from './common'; import { AssertionRequest, AssertionsProvider, ASSERT_RESOURCE_TYPE } from './providers'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - - /** * Options for an EqualsAssertion */ diff --git a/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts b/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts index 870b91877091d..1b4c64e963646 100644 --- a/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts +++ b/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts @@ -1,8 +1,5 @@ import * as path from 'path'; import { Duration, CfnResource, AssetStaging, Stack, FileAssetPackaging, Token, Lazy, Reference } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; let SDK_METADATA: any = undefined; diff --git a/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts b/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts index 35b8e76da58d9..a7322738fa8d9 100644 --- a/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts +++ b/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts @@ -1,12 +1,9 @@ import { CustomResource, Reference, Lazy, CfnResource, Stack, ArnFormat } from '@aws-cdk/core'; +import { Construct, IConstruct } from 'constructs'; import { EqualsAssertion } from './assertions'; import { ExpectedResult, ActualResult } from './common'; import { AssertionsProvider, SDK_RESOURCE_TYPE_PREFIX } from './providers'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct, IConstruct } from 'constructs'; - /** * Interface for creating a custom resource that will perform * an API call using the AWS SDK diff --git a/packages/@aws-cdk/integ-tests/lib/test-case.ts b/packages/@aws-cdk/integ-tests/lib/test-case.ts index 49b7d2770aff5..e909f8f322809 100644 --- a/packages/@aws-cdk/integ-tests/lib/test-case.ts +++ b/packages/@aws-cdk/integ-tests/lib/test-case.ts @@ -1,15 +1,12 @@ import { IntegManifest, Manifest, TestCase, TestOptions } from '@aws-cdk/cloud-assembly-schema'; import { attachCustomSynthesis, Stack, ISynthesisSession, StackProps } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { IDeployAssert } from './assertions'; import { DeployAssert } from './assertions/private/deploy-assert'; import { IntegManifestSynthesizer } from './manifest-synthesizer'; const TEST_CASE_STACK_SYMBOL = Symbol.for('@aws-cdk/integ-tests.IntegTestCaseStack'); -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Properties of an integration test case */ diff --git a/packages/@aws-cdk/lambda-layer-awscli/test/awscli-layer.test.ts b/packages/@aws-cdk/lambda-layer-awscli/test/awscli-layer.test.ts index 561bb87a14ac7..b8f84b3fb6af8 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/test/awscli-layer.test.ts +++ b/packages/@aws-cdk/lambda-layer-awscli/test/awscli-layer.test.ts @@ -1,6 +1,6 @@ +import { Template } from '@aws-cdk/assertions'; import { Stack } from '@aws-cdk/core'; import { AwsCliLayer } from '../lib'; -import { Template } from '@aws-cdk/assertions'; test('synthesized to a layer version', () => { //GIVEN diff --git a/packages/@aws-cdk/lambda-layer-kubectl/test/kubectl-layer.test.ts b/packages/@aws-cdk/lambda-layer-kubectl/test/kubectl-layer.test.ts index 68374424b0085..c46796cbb1bb2 100644 --- a/packages/@aws-cdk/lambda-layer-kubectl/test/kubectl-layer.test.ts +++ b/packages/@aws-cdk/lambda-layer-kubectl/test/kubectl-layer.test.ts @@ -1,6 +1,6 @@ +import { Template } from '@aws-cdk/assertions'; import { Stack } from '@aws-cdk/core'; import { KubectlLayer } from '../lib'; -import { Template } from '@aws-cdk/assertions'; test('synthesized to a layer version', () => { //GIVEN diff --git a/packages/@aws-cdk/pipelines/lib/legacy/synths/simple-synth-action.ts b/packages/@aws-cdk/pipelines/lib/legacy/synths/simple-synth-action.ts index ad6b5b2383059..dd4eb77ba5a29 100644 --- a/packages/@aws-cdk/pipelines/lib/legacy/synths/simple-synth-action.ts +++ b/packages/@aws-cdk/pipelines/lib/legacy/synths/simple-synth-action.ts @@ -7,16 +7,13 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import { Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; import { dockerCredentialsInstallCommands, DockerCredential, DockerCredentialUsage } from '../../docker-credentials'; import { toPosixPath } from '../../private/fs'; import { copyEnvironmentVariables, filterEmpty } from './_util'; const DEFAULT_OUTPUT_DIR = 'cdk.out'; -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from 'constructs'; - /** * Configuration options for a SimpleSynth * diff --git a/packages/@aws-cdk/pipelines/lib/legacy/validation/shell-script-action.ts b/packages/@aws-cdk/pipelines/lib/legacy/validation/shell-script-action.ts index bf3b3fae8d216..b7d99df878fed 100644 --- a/packages/@aws-cdk/pipelines/lib/legacy/validation/shell-script-action.ts +++ b/packages/@aws-cdk/pipelines/lib/legacy/validation/shell-script-action.ts @@ -4,11 +4,8 @@ import * as codepipeline_actions from '@aws-cdk/aws-codepipeline-actions'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; -import { StackOutput } from '../stage'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order import { Construct } from 'constructs'; +import { StackOutput } from '../stage'; /** * Properties for ShellScriptAction diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts index 5b95f7bc8d4d0..31ceac08d298b 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts @@ -1,12 +1,12 @@ import { promises as fs } from 'fs'; import * as cxapi from '@aws-cdk/cx-api'; import { RegionInfo } from '@aws-cdk/region-info'; +import * as semver from 'semver'; import * as contextproviders from '../../context-providers'; import { debug, warning } from '../../logging'; import { Configuration } from '../../settings'; import { SdkProvider } from '../aws-auth'; import { CloudAssembly } from './cloud-assembly'; -import * as semver from 'semver'; /** * @returns output directory diff --git a/packages/awslint/.eslintrc.js b/packages/awslint/.eslintrc.js index ae3c7daecb331..8dc37b94d97cd 100644 --- a/packages/awslint/.eslintrc.js +++ b/packages/awslint/.eslintrc.js @@ -34,7 +34,6 @@ module.exports = { }, ignorePatterns: ['*.js', '*.d.ts', 'node_modules/', '*.generated.ts'], rules: { - '@aws-cdk/construct-import-order': [ 'error' ], '@aws-cdk/no-core-construct': [ 'error' ], '@aws-cdk/no-qualified-construct': [ 'error' ], '@aws-cdk/invalid-cfn-imports': [ 'error' ], diff --git a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js index c10afb06ac5bc..e7abc89b0f610 100644 --- a/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js +++ b/tools/@aws-cdk/cdk-build-tools/config/eslintrc.js @@ -41,7 +41,6 @@ module.exports = { }, ignorePatterns: ['*.js', '*.d.ts', 'node_modules/', '*.generated.ts'], rules: { - '@aws-cdk/construct-import-order': [ 'error' ], '@aws-cdk/no-core-construct': [ 'error' ], '@aws-cdk/no-qualified-construct': [ 'error' ], '@aws-cdk/invalid-cfn-imports': [ 'error' ], diff --git a/tools/@aws-cdk/eslint-plugin/lib/index.ts b/tools/@aws-cdk/eslint-plugin/lib/index.ts index 4870222ada730..11850f16b58f8 100644 --- a/tools/@aws-cdk/eslint-plugin/lib/index.ts +++ b/tools/@aws-cdk/eslint-plugin/lib/index.ts @@ -1,6 +1,5 @@ export const rules = { 'no-core-construct': require('./rules/no-core-construct'), 'no-qualified-construct': require('./rules/no-qualified-construct'), - 'construct-import-order': require('./rules/construct-import-order'), 'invalid-cfn-imports': require('./rules/invalid-cfn-imports'), }; diff --git a/tools/@aws-cdk/eslint-plugin/lib/rules/construct-import-order.ts b/tools/@aws-cdk/eslint-plugin/lib/rules/construct-import-order.ts deleted file mode 100644 index fc6066e486747..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/lib/rules/construct-import-order.ts +++ /dev/null @@ -1,104 +0,0 @@ -// -// This rule ensures that the `@aws-cdk/core.Construct` class is always -// imported at the end, and in a separate section. In the `v2-main` branch, -// this class is removed and so is the import. Keeping it in a separate line -// and section ensures that any other adjustments to the import do not cause -// conflicts on forward merges. -// - -import { ImportDeclaration } from 'estree'; -import { Rule } from 'eslint'; - -interface ImportOrderViolation { - node: ImportDeclaration; - localName: string; - range: [number, number]; -} - -let importOrderViolation: ImportOrderViolation | undefined; -let coreConstructImportLine: ImportDeclaration | undefined; -let lastImport: Rule.Node | undefined; - -export function create(context: Rule.RuleContext): Rule.NodeListener { - return { - Program: _ => { - // reset for every file - importOrderViolation = undefined; - coreConstructImportLine = undefined; - lastImport = undefined; - }, - - // collect all "import" statements. we will later use them to determine - // exactly how to import `core.Construct`. - ImportDeclaration: node => { - lastImport = node; - - if (coreConstructImportLine && coreConstructImportLine.range) { - // If CoreConstruct import was previously seen, this import line should not succeed it. - - importOrderViolation = { - node: coreConstructImportLine, - range: coreConstructImportLine.range, - localName: coreConstructImportLine.specifiers[0].local.name, - }; - } - - for (const [i, s] of node.specifiers.entries()) { - const isConstruct = (s.local.name === 'CoreConstruct' || s.local.name === 'Construct') && node.source.value === '@aws-cdk/core'; - if (isConstruct && s.range) { - if (node.specifiers.length > 1) { - // if there is more than one specifier on the line that also imports CoreConstruct, i.e., - // `import { Resource, Construct as CoreConstruct, Token } from '@aws-cdk/core'` - - // If this is the last specifier, delete just that. If not, delete until the beginning of the next specifier. - const range: [number, number] = (i === node.specifiers.length - 1) ? s.range : [s.range[0], node.specifiers[i + 1].range![0]]; - importOrderViolation = { node, range, localName: s.local.name }; - } else { - // This means that CoreConstruct is the only import within this line, - // so record the node so the whole line can be removed if there are imports that follow - - coreConstructImportLine = node; - } - } - } - }, - - Identifier: node => { - if ( - node.parent.type !== 'ImportSpecifier' && - (node.name === 'CoreConstruct' || node.name === 'Construct') && - importOrderViolation - ) { - reportImportOrderViolations(context); - } - }, - } -} - -function reportImportOrderViolations(context: Rule.RuleContext) { - if (importOrderViolation && lastImport) { - const violation = importOrderViolation; - const _lastImport = lastImport; - context.report({ - message: 'To avoid merge conflicts with the v2 branch, import of "@aws-cdk/core.Construct" must be in its own line, ' - + 'and as the very last import.', - node: violation.node, - fix: fixer => { - const fixes: Rule.Fix[] = []; - fixes.push(fixer.removeRange(violation.range)); - const sym = violation.localName === 'Construct' ? 'Construct' : 'Construct as CoreConstruct' - const addImport = `import { ${sym} } from '@aws-cdk/core';`; - fixes.push(fixer.insertTextAfter(_lastImport, [ - "", - "", - "// keep this import separate from other imports to reduce chance for merge conflicts with v2-main", - "// eslint-disable-next-line no-duplicate-imports, import/order", - addImport, - ].join('\n'))); - return fixes; - } - }); - // reset, so that this is reported only once - importOrderViolation = undefined; - } -} \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-class-usage.expected.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-class-usage.expected.ts deleted file mode 100644 index a6c9ecede29f0..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-class-usage.expected.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { Something } from 'Somewhere'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from '@aws-cdk/core'; - -class MyConstruct extends Construct { -} \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-class-usage.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-class-usage.ts deleted file mode 100644 index 8689366792602..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-class-usage.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Construct } from '@aws-cdk/core'; -import { Something } from 'Somewhere'; - -class MyConstruct extends Construct { -} \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-multiple-specifiers.expected.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-multiple-specifiers.expected.ts deleted file mode 100644 index b0458a380f220..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-multiple-specifiers.expected.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Resource } from '@aws-cdk/core'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from '@aws-cdk/core'; - -let x: Resource; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-multiple-specifiers.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-multiple-specifiers.ts deleted file mode 100644 index c417c728ab86c..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-multiple-specifiers.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Construct, Resource } from '@aws-cdk/core'; - -let x: Resource; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-nonfinal.expected.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-nonfinal.expected.ts deleted file mode 100644 index a9e29b0d3a912..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-nonfinal.expected.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { Something } from 'Somewhere'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct } from '@aws-cdk/core'; - -let x: Something; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-nonfinal.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-nonfinal.ts deleted file mode 100644 index d7716d82c3d12..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/construct-nonfinal.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Construct } from '@aws-cdk/core'; -import { Something } from 'Somewhere'; - -let x: Something; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-class-usage.expected.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-class-usage.expected.ts deleted file mode 100644 index eccef051ab56c..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-class-usage.expected.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { Something } from 'Somewhere'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct as CoreConstruct } from '@aws-cdk/core'; - -class MyConstruct extends CoreConstruct { -} \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-class-usage.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-class-usage.ts deleted file mode 100644 index 5cf72993ecbe9..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-class-usage.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Construct as CoreConstruct } from '@aws-cdk/core'; -import { Something } from 'Somewhere'; - -class MyConstruct extends CoreConstruct { -} \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-multiple-specifiers.expected.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-multiple-specifiers.expected.ts deleted file mode 100644 index 8a8b9c6efe4b4..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-multiple-specifiers.expected.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Resource, Token } from '@aws-cdk/core'; -import { Construct } from 'constructs' - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct as CoreConstruct } from '@aws-cdk/core'; - -let x: CoreConstruct; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-multiple-specifiers.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-multiple-specifiers.ts deleted file mode 100644 index 403f5166a31bc..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-multiple-specifiers.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Construct as CoreConstruct, Resource, Token } from '@aws-cdk/core'; -import { Construct } from 'constructs' - -let x: CoreConstruct; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-nonfinal.expected.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-nonfinal.expected.ts deleted file mode 100644 index a0430db275df2..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-nonfinal.expected.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { Construct } from 'constructs'; - -// keep this import separate from other imports to reduce chance for merge conflicts with v2-main -// eslint-disable-next-line no-duplicate-imports, import/order -import { Construct as CoreConstruct } from '@aws-cdk/core'; - -let x: CoreConstruct; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-nonfinal.ts b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-nonfinal.ts deleted file mode 100644 index 98baab61bb84c..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/coreconstruct-nonfinal.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Construct as CoreConstruct } from '@aws-cdk/core'; -import { Construct } from 'constructs'; - -let x: CoreConstruct; -let y: Construct; \ No newline at end of file diff --git a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/eslintrc.js b/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/eslintrc.js deleted file mode 100644 index 3082e03d4ed79..0000000000000 --- a/tools/@aws-cdk/eslint-plugin/test/rules/fixtures/construct-import-order/eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: ['rulesdir'], - rules: { - 'rulesdir/construct-import-order': [ 'error' ], - } -} \ No newline at end of file diff --git a/tools/@aws-cdk/pkglint/.eslintrc.js b/tools/@aws-cdk/pkglint/.eslintrc.js index ae3c7daecb331..8dc37b94d97cd 100644 --- a/tools/@aws-cdk/pkglint/.eslintrc.js +++ b/tools/@aws-cdk/pkglint/.eslintrc.js @@ -34,7 +34,6 @@ module.exports = { }, ignorePatterns: ['*.js', '*.d.ts', 'node_modules/', '*.generated.ts'], rules: { - '@aws-cdk/construct-import-order': [ 'error' ], '@aws-cdk/no-core-construct': [ 'error' ], '@aws-cdk/no-qualified-construct': [ 'error' ], '@aws-cdk/invalid-cfn-imports': [ 'error' ],