Skip to content

Commit 7182714

Browse files
authored
chore(eslint): lint jsdocs (#33202)
Adds a dependency to `eslint-plugin-jsdoc` and utilizes the following linter rules (for now): ``` 'jsdoc/require-param-description': ['error'], 'jsdoc/require-property-description': ['error'], 'jsdoc/require-returns-description': ['error'], ``` These ensure that no one leaving `@param` or `@returns` without a description. In most cases, these are auto-generated and then the contributor forgets to add an actual description. They are useless without a description, so I am just removing the tags entirely. Our official stance is that these jsdoc tags are _optional_, but if you write them, they must have a description. ### 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*
1 parent 93df62a commit 7182714

File tree

25 files changed

+94
-95
lines changed

25 files changed

+94
-95
lines changed

packages/@aws-cdk/aws-ec2-alpha/lib/util.ts

-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ export class CidrBlockIpv6 {
394394
}
395395

396396
/**
397-
* @param ipv6Address
398397
* @returns Converts given ipv6 address range to big int number
399398
*/
400399
private ipv6ToNumber(ipv6Address: string): bigint {

packages/@aws-cdk/aws-glue-alpha/lib/jobs/pyspark-streaming-job.ts

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ export class PySparkStreamingJob extends Job {
144144
/**
145145
* Set the executable arguments with best practices enabled by default
146146
*
147-
* @param props
148147
* @returns An array of arguments for Glue to use on execution
149148
*/
150149
private executableArguments(props: PySparkStreamingJobProps) {

packages/@aws-cdk/aws-scheduler-targets-alpha/lib/target.ts

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export abstract class ScheduleTargetBase {
9191

9292
/**
9393
* Create a return a Schedule Target Configuration for the given schedule
94-
* @param schedule
9594
* @returns a Schedule Target Configuration
9695
*/
9796
bind(schedule: ISchedule): ScheduleTargetConfig {

packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts

-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ export class DifferenceCollection<V, T extends IDifference<V>> {
420420
* - Updated
421421
* - Others
422422
*
423-
* @param cb
424423
*/
425424
public forEachDifference(cb: (logicalId: string, change: T) => any): void {
426425
const removed = new Array<{ logicalId: string; change: T }>();

packages/@aws-cdk/cloudformation-diff/lib/format.ts

-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ export class Formatter {
345345
/**
346346
* Path is supposed to start with "/stack-name". If this is the case (i.e. path has more than
347347
* two components, we remove the first part. Otherwise, we just use the full path.
348-
* @param p
349348
*/
350349
function normalizePath(p: string) {
351350
if (p.startsWith('/')) {

packages/@aws-cdk/integ-runner/lib/cli.ts

-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ export function cli(args: string[] = process.argv.slice(2)) {
284284
/**
285285
* Read CLI options from a config file if provided.
286286
*
287-
* @param fileName
288287
* @returns parsed CLI config options
289288
*/
290289
function configFromFile(fileName?: string): Record<string, any> {

packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export class StackAssembly extends CloudAssembly implements ICloudAssemblySource
1515

1616
/**
1717
* Improved stack selection interface with a single selector
18-
* @returns
1918
* @throws when the assembly does not contain any stacks, unless `selector.failOnEmpty` is `false`
2019
* @throws when individual selection strategies are not satisfied
2120
*/

packages/aws-cdk-lib/aws-apigateway/lib/access-log.ts

-9
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,6 @@ export class AccessLogField {
375375
* The request header override.
376376
* If this parameter is defined, it contains the headers to be used instead of the HTTP Headers that are defined in the Integration Request pane.
377377
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html
378-
*
379-
* @param headerName
380378
*/
381379
public static contextRequestOverrideHeader(headerName: string) {
382380
return `$context.requestOverride.header.${headerName}`;
@@ -386,8 +384,6 @@ export class AccessLogField {
386384
* The request path override. If this parameter is defined,
387385
* it contains the request path to be used instead of the URL Path Parameters that are defined in the Integration Request pane.
388386
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html
389-
*
390-
* @param pathName
391387
*/
392388
public static contextRequestOverridePath(pathName: string) {
393389
return `$context.requestOverride.path.${pathName}`;
@@ -397,8 +393,6 @@ export class AccessLogField {
397393
* The request query string override.
398394
* If this parameter is defined, it contains the request query strings to be used instead
399395
* of the URL Query String Parameters that are defined in the Integration Request pane.
400-
*
401-
* @param querystringName
402396
*/
403397
public static contextRequestOverrideQuerystring(querystringName: string) {
404398
return `$context.requestOverride.querystring.${querystringName}`;
@@ -409,8 +403,6 @@ export class AccessLogField {
409403
* If this parameter is defined, it contains the header to be returned instead of the Response header
410404
* that is defined as the Default mapping in the Integration Response pane.
411405
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html
412-
*
413-
* @param headerName
414406
*/
415407
public static contextResponseOverrideHeader(headerName: string) {
416408
return `$context.responseOverride.header.${headerName}`;
@@ -697,7 +689,6 @@ export class AccessLogFormat {
697689
/**
698690
* Custom log format.
699691
* You can create any log format string. You can easily get the $ context variable by using the methods of AccessLogField.
700-
* @param format
701692
* @example
702693
*
703694
* apigateway.AccessLogFormat.custom(JSON.stringify({

packages/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.ts

-8
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ function integrationResponse() {
247247

248248
/**
249249
* Defines the request template that will be used for the integration
250-
* @param stateMachine
251-
* @param options
252-
* @returns requestTemplate
253250
*/
254251
function requestTemplates(stateMachine: sfn.IStateMachine, options: StepFunctionsExecutionIntegrationOptions) {
255252
const templateStr = templateString(stateMachine, options);
@@ -265,11 +262,6 @@ function requestTemplates(stateMachine: sfn.IStateMachine, options: StepFunction
265262
/**
266263
* Reads the VTL template and returns the template string to be used
267264
* for the request template.
268-
*
269-
* @param stateMachine
270-
* @param includeRequestContext
271-
* @param options
272-
* @reutrns templateString
273265
*/
274266
function templateString(
275267
stateMachine: sfn.IStateMachine,

packages/aws-cdk-lib/aws-apigateway/lib/usage-plan.ts

-5
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,11 @@ export class UsagePlan extends UsagePlanBase {
261261

262262
/**
263263
* Adds an apiStage.
264-
* @param apiStage
265264
*/
266265
public addApiStage(apiStage: UsagePlanPerApiStage) {
267266
this.apiStages.push(apiStage);
268267
}
269268

270-
/**
271-
*
272-
* @param props
273-
*/
274269
private renderApiStages(apiStages: UsagePlanPerApiStage[] | undefined): CfnUsagePlan.ApiStageProperty[] | undefined {
275270
if (apiStages && apiStages.length > 0) {
276271
const stages: CfnUsagePlan.ApiStageProperty[] = [];

packages/aws-cdk-lib/aws-apigatewayv2/lib/http/vpc-link.ts

-4
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,13 @@ export class VpcLink extends Resource implements IVpcLink {
108108

109109
/**
110110
* Adds the provided subnets to the vpc link
111-
*
112-
* @param subnets
113111
*/
114112
public addSubnets(...subnets: ec2.ISubnet[]) {
115113
this.subnets.push(...subnets);
116114
}
117115

118116
/**
119117
* Adds the provided security groups to the vpc link
120-
*
121-
* @param groups
122118
*/
123119
public addSecurityGroups(...groups: ec2.ISecurityGroup[]) {
124120
this.securityGroups.push(...groups);

packages/aws-cdk-lib/aws-appconfig/lib/configuration.ts

-1
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ export abstract class ConfigurationSource {
947947
* Defines configuration content from AWS CodePipeline.
948948
*
949949
* @param pipeline The pipeline where the configuration is stored
950-
* @returns
951950
*/
952951
public static fromPipeline(pipeline: cp.IPipeline): ConfigurationSource {
953952
return {

packages/aws-cdk-lib/aws-appmesh/lib/service-discovery.ts

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export abstract class ServiceDiscovery {
9191
/**
9292
* Returns DNS based service discovery
9393
*
94-
* @param hostname
9594
* @param responseType Specifies the DNS response type for the virtual node.
9695
* The default is `DnsResponseType.LOAD_BALANCER`.
9796
* @param ipPreference No IP preference is applied to the Virtual Node.

packages/aws-cdk-lib/aws-chatbot/lib/slack-channel-configuration.ts

-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ abstract class SlackChannelConfigurationBase extends cdk.Resource implements ISl
167167

168168
/**
169169
* Adds extra permission to iam-role of Slack channel configuration
170-
* @param statement
171170
*/
172171
public addToRolePolicy(statement: iam.PolicyStatement): void {
173172
if (!this.role) {
@@ -326,7 +325,6 @@ export class SlackChannelConfiguration extends SlackChannelConfigurationBase {
326325

327326
/**
328327
* Adds a SNS topic that deliver notifications to AWS Chatbot.
329-
* @param notificationTopic
330328
*/
331329
public addNotificationTopic(notificationTopic: sns.ITopic): void {
332330
this.notificationTopics.push(notificationTopic);

packages/aws-cdk-lib/aws-ecs/lib/environment-file.ts

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export abstract class EnvironmentFile {
1010
* Loads the environment file from a local disk path.
1111
*
1212
* @param path Local disk path
13-
* @param options
1413
*/
1514
public static fromAsset(path: string, options?: AssetOptions): AssetEnvironmentFile {
1615
return new AssetEnvironmentFile(path, options);
@@ -45,7 +44,6 @@ export class AssetEnvironmentFile extends EnvironmentFile {
4544

4645
/**
4746
* @param path The path to the asset file or directory.
48-
* @param options
4947
*/
5048
constructor(public readonly path: string, private readonly options: AssetOptions = { }) {
5149
super();

packages/aws-cdk-lib/aws-sns/lib/subscription.ts

-4
Original file line numberDiff line numberDiff line change
@@ -365,17 +365,13 @@ export enum FilterOrPolicyType {
365365
export abstract class FilterOrPolicy {
366366
/**
367367
* Filter of MessageBody
368-
* @param filter
369-
* @returns
370368
*/
371369
public static filter(filter: SubscriptionFilter) {
372370
return new Filter(filter);
373371
}
374372

375373
/**
376374
* Policy of MessageBody
377-
* @param policy
378-
* @returns
379375
*/
380376
public static policy(policy: { [attribute: string]: FilterOrPolicy }) {
381377
return new Policy(policy);

0 commit comments

Comments
 (0)