Skip to content

Commit

Permalink
chore(eslint): lint jsdoc alignment (#33242)
Browse files Browse the repository at this point in the history
ensures that our jsdocs are aligned correctly

### 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 30, 2025
1 parent e69c79e commit a486bbc
Show file tree
Hide file tree
Showing 123 changed files with 905 additions and 907 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ async function writePackageMap(repoRoot: string): Promise<string> {
const YARN_MONOREPO_CACHE: Record<string, any> = {};

/**
* Return a { name -> directory } packages found in a Yarn monorepo
*
* Cached in YARN_MONOREPO_CACHE.
*/
* Return a { name -> directory } packages found in a Yarn monorepo
*
* Cached in YARN_MONOREPO_CACHE.
*/
export async function findYarnPackages(root: string): Promise<Record<string, string>> {
if (!(root in YARN_MONOREPO_CACHE)) {
const outputDataString: string = JSON.parse(await shell(['yarn', 'workspaces', '--json', 'info'], {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Certificate, CertificateValidation, KeyAlgorithm } from 'aws-cdk-lib/aw
* to have a valid public hosted zone that you can use
* to request certificates for.
*
*/
*/
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Certificate, CertificateValidation } from 'aws-cdk-lib/aws-certificatem
* In order to test this you need to have a valid public hosted zone that you can use
* to request certificates for.
*
*/
*/
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const awsIpamVpc = new Vpc(stack, 'AwsIpamVpc', {

/**
* Testing That the Vpc is Deployed with the correct Cidrs.
**/
**/
const integ = new IntegTest(app, 'Vpc-Ipam', {
testCases: [stack],
allowDestroy: ['EC2::IPAM'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class CognitoStack extends Stack {
* In order to test this you need to have a valid public hosted zone that you can use
* to request certificates for.
*
*/
*/
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@ import { Construct } from 'constructs';
* `openssl req -x509 -CA rootCA_cert.pem -CAkey rootCA_key.pem -days 7 -new -nodes -keyout client_key.pem -out client_cert.pem`
*
* 3. Create OpenSSL configuration file (openssl.cnf):
```
cat << EOF > openssl.cnf
[ ca ]
default_ca = CA_default
[ CA_default ]
dir = .
database = \$dir/index.txt
new_certs_dir = \$dir/newcerts
certificate = \$dir/rootCA_cert.pem
serial = \$dir/serial
private_key = \$dir/rootCA_key.pem
RANDFILE = \$dir/private/.rand
default_crl_days = 30
default_md = sha256
preserve = no
policy = policy_match
crl_extensions = crl_ext
[ policy_match ]
countryName = optional
stateOrProvinceName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ crl_ext ]
authorityKeyIdentifier=keyid:always
EOF
```
* ```
* cat << EOF > openssl.cnf
* [ ca ]
* default_ca = CA_default
*
* [ CA_default ]
* dir = .
* database = \$dir/index.txt
* new_certs_dir = \$dir/newcerts
* certificate = \$dir/rootCA_cert.pem
* serial = \$dir/serial
* private_key = \$dir/rootCA_key.pem
* RANDFILE = \$dir/private/.rand
* default_crl_days = 30
* default_md = sha256
* preserve = no
* policy = policy_match
* crl_extensions = crl_ext
*
* [ policy_match ]
* countryName = optional
* stateOrProvinceName = optional
* organizationName = optional
* organizationalUnitName = optional
* commonName = supplied
* emailAddress = optional
*
* [ crl_ext ]
* authorityKeyIdentifier=keyid:always
* EOF
* ```
*
* 4. Generate Certificate Revocation List (CRL) (valid for 30 days):
* `openssl ca -config openssl.cnf -gencrl -out crl.pem -crldays 30 -md sha256`
Expand Down Expand Up @@ -140,7 +140,7 @@ class MutualTls extends Stack {
* In order to test this you need to have a valid public hosted zone that you can use
* to request certificates for.
*
*/
*/
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class AlbOidcStack extends Stack {
* In order to test this you need to have a valid public hosted zone that you can use
* to request certificates for.
*
*/
*/
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
import { STANDARD_NODEJS_RUNTIME } from '../../config';

/**
* Stack verification steps:
* aws application-autoscaling describe-scalable-targets --service-namespace lambda --resource-ids function:<function name>:prod
* has a minCapacity of 3 and maxCapacity of 50
*/
* Stack verification steps:
* aws application-autoscaling describe-scalable-targets --service-namespace lambda --resource-ids function:<function name>:prod
* has a minCapacity of 3 and maxCapacity of 50
*/
class TestStack extends cdk.Stack {
constructor(scope: cdk.App, id: string) {
super(scope, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
* - `yarn integ aws-route53/test/integ.cross-account-zone-delegation.js`
* b. Fall back if temp credentials do not work (account info may be in snapshot)
* - `yarn integ aws-route53/test/integ.cross-account-zone-delegation.js --profiles cross-account`
*/
*/

const app = new cdk.App();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from '
* - `yarn integ custom-resources/test/aws-custom-resource/integ.cross-account-assumeRole.js`
* b. Fall back if temp credentials do not work (account info may be in snapshot)
* - `yarn integ custom-resources/test/aws-custom-resource/integ.cross-account-assumeRole.js --profiles cross-account`
*/
*/

const app = new cdk.App();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ describe(AppStagingSynthesizer, () => {
});

/**
* Evaluate a possibly string-containing value the same way CFN would do
*
* (Be invariant to the specific Fn::Sub or Fn::Join we would output)
*/
* Evaluate a possibly string-containing value the same way CFN would do
*
* (Be invariant to the specific Fn::Sub or Fn::Join we would output)
*/
function evalCFN(value: any) {
return evaluateCFN(stack.resolve(value), CFN_CONTEXT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TestStack extends Stack {
/**
* In order to test this you need to have a valid public hosted zone that you can use
* to request certificates for.
*/
*/
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export interface IVpcIngressConnection extends cdk.IResource {
readonly vpcIngressConnectionArn: string;

/**
* The name of the VPC Ingress Connection.
* @attribute
*/
* The name of the VPC Ingress Connection.
* @attribute
*/
readonly vpcIngressConnectionName: string;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export interface IdentityPoolFacebookLoginProvider {

/**
* Login Provider for identity federation using Apple credentials
*/
*/
export interface IdentityPoolAppleLoginProvider {
/**
* Services ID for Apple identity federation
Expand Down
30 changes: 15 additions & 15 deletions packages/@aws-cdk/aws-ec2-alpha/lib/ipam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ export interface PoolOptions {
readonly publicIpSource?: IpamPoolPublicIpSource;

/**
* Limits which service in AWS that the pool can be used in.
*
* "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-awsservice
*
* @default - required in case of an IPv6, throws an error if not provided.
*/
* Limits which service in AWS that the pool can be used in.
*
* "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-awsservice
*
* @default - required in case of an IPv6, throws an error if not provided.
*/
readonly awsService?: AwsServiceName;

/**
Expand Down Expand Up @@ -184,9 +184,9 @@ export interface IpamPoolCidrProvisioningOptions {
*/
export interface IIpamPool {
/**
* Pool ID to be passed to the VPC construct
* @attribute IpamPoolId
*/
* Pool ID to be passed to the VPC construct
* @attribute IpamPoolId
*/
readonly ipamPoolId: string;

/**
Expand Down Expand Up @@ -468,10 +468,10 @@ class IpamScopeBase implements IIpamScopeBase {
*/
export class Ipam extends Resource {
/**
* Provides access to default public IPAM scope through add pool method.
* Usage: To add an Ipam Pool to a default public scope
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html
*/
* Provides access to default public IPAM scope through add pool method.
* Usage: To add an Ipam Pool to a default public scope
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html
*/
public readonly publicScope: IIpamScopeBase;

/**
Expand Down
48 changes: 24 additions & 24 deletions packages/@aws-cdk/aws-ec2-alpha/lib/subnet-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ interface ICidr {
*/
export class IpCidr implements ICidr {
/**
* IPv6 CIDR range for the subnet
* Allowed only if IPv6 is enabled on VPc
*/
* IPv6 CIDR range for the subnet
* Allowed only if IPv6 is enabled on VPc
*/
public readonly cidr: string;
constructor(props: string ) {
this.cidr = props;
Expand Down Expand Up @@ -133,50 +133,50 @@ export class SubnetV2 extends Resource implements ISubnetV2 {
*/
public static fromSubnetV2Attributes(scope: Construct, id: string, attrs: SubnetV2Attributes) : ISubnetV2 {
/**
* Class to define an import for an existing subnet
* @resource AWS::EC2::Subnet
*/
* Class to define an import for an existing subnet
* @resource AWS::EC2::Subnet
*/
class ImportedSubnetV2 extends Resource implements ISubnetV2 {
/**
* The IPv6 CIDR Block assigned to this subnet
*/
* The IPv6 CIDR Block assigned to this subnet
*/
public readonly ipv6CidrBlock?: string = attrs.ipv6CidrBlock;

/**
* The type of subnet (eg. public or private) that this subnet represents.
*/
* The type of subnet (eg. public or private) that this subnet represents.
*/
public readonly subnetType?: SubnetType = attrs.subnetType;

/**
* The Availability Zone in which subnet is located
*/
* The Availability Zone in which subnet is located
*/
public readonly availabilityZone: string = attrs.availabilityZone;

/**
* The subnetId for this particular subnet
* Refers to the physical ID created
*/
* The subnetId for this particular subnet
* Refers to the physical ID created
*/
public readonly subnetId: string = attrs.subnetId;

/**
* Dependable that can be depended upon to force internet connectivity established on the VPC
*/
* Dependable that can be depended upon to force internet connectivity established on the VPC
*/
public readonly internetConnectivityEstablished: IDependable = new DependencyGroup();

/**
* The IPv4 CIDR block assigned to this subnet
*/
* The IPv4 CIDR block assigned to this subnet
*/
public readonly ipv4CidrBlock: string = attrs.ipv4CidrBlock;

/**
* Current route table associated with this subnet
*/
* Current route table associated with this subnet
*/
public readonly routeTable: IRouteTable = { routeTableId: attrs.routeTableId! };

/**
* Associate a Network ACL with this subnet
* Required here since it is implemented in the ISubnetV2
*/
* Associate a Network ACL with this subnet
* Required here since it is implemented in the ISubnetV2
*/
public associateNetworkAcl(aclId: string, networkAcl: INetworkAcl) {
const aclScope = networkAcl instanceof Construct ? networkAcl : this;
const other = networkAcl instanceof Construct ? this : networkAcl;
Expand Down
Loading

0 comments on commit a486bbc

Please sign in to comment.