Skip to content

Commit

Permalink
chore(eslint): lint against padded lines after class declarations (#3…
Browse files Browse the repository at this point in the history
…3071)

Linter rule to ensure that we don't have padded lines within our class declarations. This helps standardize a pattern that we review for already.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
kaizencc authored Jan 22, 2025
1 parent 066cd4f commit 704ff0b
Show file tree
Hide file tree
Showing 283 changed files with 3 additions and 379 deletions.
1 change: 0 additions & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ interface ClientConfig {
}

export class AwsClients {

public static async forRegion(region: string, output: NodeJS.WritableStream) {
return new AwsClients(region, output);
}
Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/with-cli-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,5 @@ __EOS__`], {
},
});
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { ServicePrincipal, Role } from 'aws-cdk-lib/aws-iam';

class OriginalStack extends Stack {

public readonly apiId: string;

constructor(scope: App, id: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as cloudwatchActions from 'aws-cdk-lib/aws-cloudwatch-actions';
import { LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION } from 'aws-cdk-lib/cx-api';

class LambdaAlarmActionIntegrationTestStack extends Stack {

constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as integ from '@aws-cdk/integ-tests-alpha';
import * as cloudwatchActions from 'aws-cdk-lib/aws-cloudwatch-actions';

class SsmIncidentAlarmActionIntegrationTestStack extends Stack {

constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { Alarm, Metric } from 'aws-cdk-lib/aws-cloudwatch';

class AlarmWithLabelIntegrationTest extends Stack {

constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { Alarm, AlarmRule, AlarmState, CompositeAlarm, Metric } from 'aws-cdk-lib/aws-cloudwatch';

class CompositeAlarmIntegrationTest extends Stack {

constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

Expand Down Expand Up @@ -61,11 +60,9 @@ class CompositeAlarmIntegrationTest extends Stack {
actionsSuppressor: alarm5,
});
}

}

class CompositeAlarmImportIntegrationTest extends Stack {

constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';

export class TestStack extends Stack {

readonly table: dynamodb.TableV2;

constructor(scope: Construct, id: string, props?: StackProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Construct } from 'constructs';
import { AttributeType, Table } from 'aws-cdk-lib/aws-dynamodb';

export class TestStack extends Stack {

readonly table: Table;
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as iam from 'aws-cdk-lib/aws-iam';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';

export class TestStack extends Stack {

readonly table: dynamodb.Table;
readonly tableTwo: dynamodb.Table;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';

export class TestStack extends Stack {

readonly table: dynamodb.Table;

constructor(scope: Construct, id: string, props?: StackProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import * as path from 'path';
const app = new cdk.App();

class EC2DualStack extends cdk.Stack {

public readonly instancePublicIp: string;

constructor(scope: Construct, id: string, props?: cdk.StackProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class TestStack extends cdk.Stack {
contributorInsights: true,
});
}

}

const stack = new TestStack(app, 'TestStackLoadBalancer');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export interface BucketPingerProps {
readonly timeout?: Duration;
}
export class BucketPinger extends Construct {

private _resource: CustomResource;

constructor(scope: Construct, id: string, props: BucketPingerProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';

const LATEST_VERSION: eks.AlbControllerVersion = eks.AlbControllerVersion.V2_8_2;
class EksClusterAlbControllerStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { NodegroupAmiType } from 'aws-cdk-lib/aws-eks';

class EksClusterStack extends Stack {

private cluster: eks.Cluster;
private vpc: ec2.IVpc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { NodegroupAmiType } from 'aws-cdk-lib/aws-eks';

class EksClusterStack extends Stack {

private cluster: eks.Cluster;
private vpc: ec2.IVpc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';

class EksAllHandlersInVpcStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import * as constructs from 'constructs';
import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

private cluster: eks.Cluster;
private importedCluster: eks.ICluster;
private vpc: ec2.IVpc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

private cluster: eks.Cluster;
private vpc: ec2.Vpc;

Expand Down Expand Up @@ -347,7 +346,6 @@ class EksClusterStack extends Stack {
});

}

}

// this test uses both the bottlerocket image and the inf1 instance, which are only supported in these
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';

class EksClusterTagsStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

private cluster: eks.Cluster;
private vpc: ec2.IVpc;

Expand Down Expand Up @@ -339,7 +338,6 @@ class EksClusterStack extends Stack {
});

}

}

// this test uses both the bottlerocket image and the inf1 instance, which are only supported in these
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';

class EksClusterInferenceStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as eks from 'aws-cdk-lib/aws-eks';
import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';

class EksClusterInferenceStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';

class EksClusterStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { NodegroupAmiType, TaintEffect } from 'aws-cdk-lib/aws-eks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

private cluster: eks.Cluster;
private vpc: ec2.IVpc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export interface PingerProps {
readonly subnets?: ec2.ISubnet[];
}
export class Pinger extends Construct {

private _resource: CustomResource;

constructor(scope: Construct, id: string, props: PingerProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
const app = new cdk.App();

class AwsAppSyncEvent extends cdk.Stack {

constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
super(scope, id, props);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { LambdaDestination } from 'aws-cdk-lib/aws-logs-destinations';
import { STANDARD_NODEJS_RUNTIME } from '../../config';

class LambdaStack extends Stack {

public readonly queue: sqs.Queue;

constructor(scope: constructs.Construct, id: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface S3AssertProps {
* Code is written in Python because why not.
*/
export class S3Assert extends Construct {

constructor(scope: Construct, id: string, props: S3AssertProps) {
super(scope, id);

Expand All @@ -48,7 +47,6 @@ export class S3Assert extends Construct {
}

class S3AssertProvider extends Construct {

/**
* Returns the singleton provider.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export class S3File extends Construct {
}

class S3FileProvider extends Construct {

/**
* Returns the singleton provider.
*/
Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-amplify-alpha/lib/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export interface DomainProps extends DomainOptions {
* An Amplify Console domain
*/
export class Domain extends Resource {

/**
* The ARN of the domain
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,4 @@ export class AutoScalingConfiguration extends cdk.Resource implements IAutoScali
throw new Error(`maxConcurrency must be between 1 and 200, got ${props.maxConcurrency}.`);
}
}

}
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ export class Memory {
* The code runtimes
*/
export class Runtime {

/**
* CORRETTO 8
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export interface GitHubRepositoryProps {
* The GitHubRepository resource
*/
export class GitHubRepository extends cdk.Resource implements IGitHubRepository {

public readonly owner: string;
public readonly repo: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export interface UserPoolAuthenticationProviderBindConfig {
* Defines a User Pool Authentication Provider
*/
export class UserPoolAuthenticationProvider implements IUserPoolAuthenticationProvider {

/**
* The User Pool of the Associated Identity Providers
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export class ApiCall {
throw Error(`No client constructor found within package: ${this.v3PackageName}`);
}
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"publishConfig": {
"tag": "latest"
}
}
}
3 changes: 0 additions & 3 deletions packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ export interface IIpamScopeBase {
* @internal
*/
class IpamPool extends Resource implements IIpamPool {

/**
* Pool ID to be passed to the VPC construct
* @attribute IpamPoolId
Expand Down Expand Up @@ -388,7 +387,6 @@ class IpamPool extends Resource implements IIpamPool {
* @resource AWS::EC2::IPAMScope
*/
class IpamScope extends Resource implements IIpamScopeBase {

/**
* Stores the reference to newly created Resource
*/
Expand Down Expand Up @@ -434,7 +432,6 @@ class IpamScope extends Resource implements IIpamScopeBase {
addPool(id: string, options: PoolOptions): IIpamPool {
return createIpamPool(this.scope, id, this.props, options, this.scopeId);
}

}

/**
Expand Down
3 changes: 0 additions & 3 deletions packages/@aws-cdk/aws-ec2-alpha/lib/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ export class VPNGatewayV2 extends Resource implements IRouteTarget {
* @resource AWS::EC2::NatGateway
*/
export class NatGateway extends Resource implements IRouteTarget {

/**
* Id of the NatGateway
* @attribute
Expand Down Expand Up @@ -471,7 +470,6 @@ export class NatGateway extends Resource implements IRouteTarget {
* @resource AWS::EC2::VPCPeeringConnection
*/
export class VPCPeeringConnection extends Resource implements IRouteTarget {

/**
* The type of router used in the route.
*/
Expand Down Expand Up @@ -563,7 +561,6 @@ export class VPCPeeringConnection extends Resource implements IRouteTarget {

return false;
}

}

/**
Expand Down
Loading

0 comments on commit 704ff0b

Please sign in to comment.