8000 chore(eslint): lint jsdocs (#33202) · aws/aws-cdk@7182714 · GitHub
[go: up one dir, main page]

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
  • aws-cdk
  • tools/@aws-cdk
  • 25 files changed

    +94
    -95
    lines changed

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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 1 deletion
    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

    Lines changed: 0 additions & 9 deletions
    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

    Lines changed: 0 additions & 8 deletions
    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

    Lines changed: 0 additions & 5 deletions
    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[] = [];

    0 commit comments

    Comments
     (0)
    0