Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: disallow use of name value for public variables #59

Open
1 of 2 tasks
ren-yamanashi opened this issue Nov 25, 2024 · 0 comments
Open
1 of 2 tasks

feat: disallow use of name value for public variables #59

ren-yamanashi opened this issue Nov 25, 2024 · 0 comments
Assignees
Labels
feature New features/Updates to existing features

Comments

@ren-yamanashi
Copy link
Owner

Feature Description

Specifying the name value for a public variable makes it unclear what the variable represents.
Therefore, it is recommended to use the variable name resource instead of value.

Motivation

To appropriate variable names that are difficult to understand.

Invalid Code Examples

export class Vpc extends Construct {
  public readonly value: IVpc;
}

Valid Code Examples

export class Vpc extends Construct {
  public readonly resource: IVpc;
}

Rule Type

problem (possible errors)

Implementation Details

  • This rule is related to AWS CDK best practices
  • I'm willing to submit a PR for this feature

Additional Context

No response

@ren-yamanashi ren-yamanashi added the feature New features/Updates to existing features label Nov 25, 2024
@ren-yamanashi ren-yamanashi self-assigned this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features/Updates to existing features
Projects
None yet
Development

No branches or pull requests

1 participant