-
Couldn't load subscription status.
- Fork 4.3k
Closed
Labels
Description
We have introduced a new error type ValidationError into aws-cdk-lib, seeerrors.ts.
This error type now needs to be rolled-out everywhere in aws-cdk-lib.
This will be a huge effort and significant grunt work. See tips below for how to make this easier.
Example PR: #33031
Here is the plan:
- As a team, split up the work between
aws-cdk-liband all alpha modules. - Raise exactly 1 PR per module
- Do NOT make any other changes. If something isn't a straightforward update, park it for now.
- If something isn't a
ValidationError, check you may useUnscopedValidationErrorbut it's a last resort and should be avoided. - Add the module to the list of checked modules in
packages/aws-cdk-lib/.eslintrc.js. - If you are completing an alpha module (not
aws-cdk-lib) make sure to add theno-throw-default-errorrule to the local eslint config.
We might have to ignore it in a few places that are still unclear.
Tips:
- Enforce using typed errors by adding the new module first into
.eslintrc.js - Once you have done that, eslint and VSCode should flag up all rule violations and changing errors will be semi-automatic and super easy.
- Consider using Amazon Q as well.