eslint-plugin-awscdk 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +9 -34
  2. package/dist/index.cjs +1033 -1208
  3. package/dist/index.d.cts +81 -74
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.mts +81 -75
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +1029 -1206
  8. package/dist/index.mjs.map +1 -1
  9. package/package.json +39 -42
  10. package/src/configs/classic-config.ts +5 -13
  11. package/src/configs/flat-config.ts +12 -20
  12. package/src/core/ast-node/finder/constructor.ts +2 -3
  13. package/src/core/ast-node/finder/property-name.ts +3 -4
  14. package/src/core/ast-node/finder/public-property.ts +7 -15
  15. package/src/core/cdk-construct/type-checker/is-construct-or-stack.ts +2 -6
  16. package/src/core/cdk-construct/type-checker/is-construct.ts +1 -6
  17. package/src/core/cdk-construct/type-checker/is-resource-with-readonly-interface.ts +6 -16
  18. package/src/core/cdk-construct/type-checker/is-resource.ts +1 -1
  19. package/src/core/cdk-construct/type-finder/index.ts +4 -12
  20. package/src/core/ts-type/checker/is-extends-target-super-class.ts +1 -1
  21. package/src/core/ts-type/finder/array-element.ts +0 -1
  22. package/src/core/ts-type/finder/constructor-property-name.ts +1 -4
  23. package/src/core/ts-type/finder/generics-type-argument.ts +1 -5
  24. package/src/index.ts +4 -3
  25. package/src/rules/construct-constructor-property.ts +10 -30
  26. package/src/rules/index.ts +3 -2
  27. package/src/rules/migrate-disable-comments.ts +4 -12
  28. package/src/rules/no-construct-in-public-property-of-construct.ts +1 -1
  29. package/src/rules/no-construct-stack-suffix.ts +5 -18
  30. package/src/rules/no-import-private.ts +2 -5
  31. package/src/rules/no-mutable-public-property-of-construct.ts +3 -8
  32. package/src/rules/no-parent-name-construct-id-match.ts +2 -6
  33. package/src/rules/no-unused-props/index.ts +4 -5
  34. package/src/rules/no-unused-props/props-usage-analyzer.ts +15 -34
  35. package/src/rules/no-unused-props/props-usage-tracker.ts +10 -17
  36. package/src/rules/no-unused-props/visitor/direct-props-usage-visitor.ts +1 -1
  37. package/src/rules/no-unused-props/visitor/instance-variable-usage-visitor.ts +3 -9
  38. package/src/rules/no-unused-props/visitor/method-call-collector-visitor.ts +2 -3
  39. package/src/rules/no-unused-props/visitor/props-alias-visitor.ts +1 -1
  40. package/src/rules/no-unused-props/visitor/traverse-nodes.ts +1 -4
  41. package/src/rules/no-variable-construct-id.ts +5 -22
  42. package/src/rules/pascal-case-construct-id.ts +4 -17
  43. package/src/rules/prefer-grants-property.ts +4 -14
  44. package/src/rules/prevent-construct-id-collision.ts +144 -0
  45. package/src/rules/props-name-convention.ts +1 -2
  46. package/src/rules/require-jsdoc.ts +4 -11
  47. package/src/rules/require-passing-this.ts +2 -9
  48. package/src/rules/require-props-default-doc.ts +1 -1
  49. package/src/shared/converter/to-pascal-case.ts +1 -3
  50. package/src/shared/create-rule.ts +1 -1
package/README.md CHANGED
@@ -14,33 +14,6 @@
14
14
 
15
15
  Please refer to the [website](https://eslint-plugin-awscdk.dev/).
16
16
 
17
- ## 📦 Package Name Migration Notice
18
-
19
- > **Important**: This package was previously published as `eslint-cdk-plugin`. Starting from v4.0.0, it has been renamed to `eslint-plugin-awscdk` to follow ESLint's official naming convention.
20
-
21
- ### Migration Steps
22
-
23
- #### 1. Update `eslint-cdk-plugin` to latest version
24
-
25
- ```bash
26
- # npm
27
- npm install -D eslint-cdk-plugin@latest
28
-
29
- # yarn
30
- yarn add -D eslint-cdk-plugin@latest
31
-
32
- # pnpm
33
- pnpm install -D eslint-cdk-plugin@latest
34
- ```
35
-
36
- #### 2. execute migration command
37
-
38
- ```bash
39
- npx migrate-cdk-plugin
40
- ```
41
-
42
- The old package name will continue to receive updates until for a while , after which it will be deprecated.
43
-
44
17
  ## 📦 Installation
45
18
 
46
19
  ```bash
@@ -68,16 +41,18 @@ import tseslint from "typescript-eslint";
68
41
  import cdkPlugin from "eslint-plugin-awscdk";
69
42
 
70
43
  export default defineConfig([
71
- eslint.configs.recommended,
72
- ...tseslint.configs.recommended,
73
44
  {
74
45
  files: ["lib/**/*.ts", "bin/*.ts"],
75
- // ✅ Add plugins
76
- extends: [cdkPlugin.configs.recommended], // or cdkPlugin.configs.strict
46
+ extends: [
47
+ eslint.configs.recommended,
48
+ ...tseslint.configs.recommended,
49
+ // ✅ Add plugins
50
+ cdkPlugin.configs.recommended, // or cdkPlugin.configs.strict
51
+ ],
77
52
  rules: {
78
53
  // ✅ Add rules (use custom rules)
79
- "awscdk/require-jsdoc": "warn"
80
- }
54
+ "awscdk/require-jsdoc": "warn",
55
+ },
81
56
  },
82
57
  ]);
83
58
  ```
@@ -104,7 +79,7 @@ module.exports = {
104
79
  rules: {
105
80
  // ✅ Add rules (use custom rules)
106
81
  "awscdk/require-jsdoc": "warn",
107
- }
82
+ },
108
83
  };
109
84
  ```
110
85