Open kenberkeley opened 1 year ago
Same for ⬇️
We can not assume all the developers would write import { Runtime } from "aws-cdk-lib/aws-lambda"
. What if somebody writes import { Runtime as LambdaRuntime } from "aws-cdk-lib/aws-lambda"
to void this rule check?
Cause
https://github.com/hupe1980/cdkdx/blob/28df1ba253bd250c854fc1d94edc9a830e85fd94/packages/eslint-plugin-cdk/src/utils/cdk.ts#L20
This line of code ⬆️ enforces we use the name
cdk
to import "all" fromaws-cdk-lib
.e.g.
Reason
You might be curious why I would wanna use other import names like
Cdk
. Well, let's take a look at React:From the above example, we can see that capitalizing the name of import "all" makes more sense.
Workaround
import { Stack } from "aws-cdk-lib"
, oreslint-plugin-cdk@1.8.0
with ⬇️