eslint-cdk-plugin 1.1.0 → 2.0.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.
- package/README.md +6 -17
- package/dist/index.cjs +241 -193770
- package/dist/index.d.ts +78 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +241 -193770
- package/package.json +14 -13
- package/src/constants/tsInternalFlags.ts +14 -0
- package/src/index.ts +60 -34
- package/src/rules/construct-constructor-property.ts +117 -0
- package/src/rules/no-class-in-interface.ts +5 -3
- package/src/rules/no-construct-stack-suffix.ts +53 -9
- package/src/rules/no-parent-name-construct-id-match.ts +1 -1
- package/src/rules/no-public-class-fields.ts +9 -3
- package/src/rules/no-variable-construct-id.ts +19 -0
- package/src/rules/pascal-case-construct-id.ts +1 -1
- package/src/rules/require-passing-this.ts +62 -11
- package/src/utils/parseType.ts +33 -1
- package/src/utils/typeCheck.ts +1 -1
- package/src/types/symbolFlags.ts +0 -6
package/README.md
CHANGED
|
@@ -35,27 +35,16 @@ Note: This plugin uses typescript type information and must be used in conjuncti
|
|
|
35
35
|
|
|
36
36
|
```js
|
|
37
37
|
// eslint.config.mjs
|
|
38
|
-
import
|
|
38
|
+
import cdkPlugin from "eslint-cdk-plugin";
|
|
39
39
|
import tsEslint from "typescript-eslint";
|
|
40
40
|
|
|
41
41
|
export default [
|
|
42
42
|
...tsEslint.configs.recommended,
|
|
43
|
+
// ✅ Add plugins
|
|
44
|
+
cdkPlugin.configs.recommended,
|
|
43
45
|
{
|
|
44
46
|
files: ["lib/**/*.ts", "bin/*.ts"],
|
|
45
|
-
|
|
46
|
-
parserOptions: {
|
|
47
|
-
projectService: true,
|
|
48
|
-
project: "./tsconfig.json",
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
// ✅ Add plugins
|
|
52
|
-
plugins: {
|
|
53
|
-
cdk: eslintCdkPlugin,
|
|
54
|
-
},
|
|
55
|
-
// ✅ Add rules (use recommended rules)
|
|
56
|
-
rules: {
|
|
57
|
-
...eslintCdkPlugin.configs.recommended.rules,
|
|
58
|
-
},
|
|
47
|
+
// ... some configs
|
|
59
48
|
},
|
|
60
49
|
];
|
|
61
50
|
```
|
|
@@ -65,7 +54,7 @@ export default [
|
|
|
65
54
|
```js
|
|
66
55
|
// eslint.config.mjs
|
|
67
56
|
import tsEslint from "typescript-eslint";
|
|
68
|
-
import
|
|
57
|
+
import cdkPlugin from "eslint-cdk-plugin";
|
|
69
58
|
|
|
70
59
|
export default [
|
|
71
60
|
...tsEslint.configs.recommended,
|
|
@@ -79,7 +68,7 @@ export default [
|
|
|
79
68
|
},
|
|
80
69
|
// ✅ Add plugins
|
|
81
70
|
plugins: {
|
|
82
|
-
cdk:
|
|
71
|
+
cdk: cdkPlugin,
|
|
83
72
|
},
|
|
84
73
|
// ✅ Add rules (use custom rules)
|
|
85
74
|
rules: {
|