Chore: ensure that exported Construct
have a defaultChild
#4557
Labels
@aws-cdk/core
Related to core CDK functionality
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
package/awscl
Cross-cutting issues related to the AWS Construct Library
All construct should expose a
defaultChild
property (either by setting thenode.defaultChild
property, or by having a child namedDefault
orResource
). If there are constructs where adefaultChild
doesn't make sense(I can't find an example off the top of my head), a specific error type should be thrown.Use Case
To avoid issues like #4455, #4188, #3314
Proposed Solution
This is something that might be handled by
awslint
EDIT: I briefly tried looking into it, but couldn't find a way to do static analysis on function bodies with
jsii-reflect
. Am I missing something or is it not supported yet?Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: