eslint-cdk-plugin 0.4.0 → 1.0.1
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 +52 -7
- package/dist/index.d.mts +31 -0
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -0
- package/dist/no-class-in-interface-props.d.mts +2 -0
- package/dist/no-class-in-interface-props.mjs +10 -18
- package/dist/no-class-in-interface-props.mjs.map +1 -0
- package/dist/no-construct-stack-suffix.d.mts +2 -0
- package/dist/no-construct-stack-suffix.mjs +13 -22
- package/dist/no-construct-stack-suffix.mjs.map +1 -0
- package/dist/no-import-private.d.mts +2 -0
- package/dist/no-import-private.mjs +17 -29
- package/dist/no-import-private.mjs.map +1 -0
- package/dist/no-mutable-props-interface.d.mts +2 -0
- package/dist/no-mutable-props-interface.mjs +11 -23
- package/dist/no-mutable-props-interface.mjs.map +1 -0
- package/dist/no-mutable-public-fields.d.mts +2 -0
- package/dist/no-mutable-public-fields.mjs +20 -33
- package/dist/no-mutable-public-fields.mjs.map +1 -0
- package/dist/no-parent-name-construct-id-match.d.mts +2 -0
- package/dist/no-parent-name-construct-id-match.mjs +82 -129
- package/dist/no-parent-name-construct-id-match.mjs.map +1 -0
- package/dist/no-public-class-fields.d.mts +2 -0
- package/dist/no-public-class-fields.mjs +30 -57
- package/dist/no-public-class-fields.mjs.map +1 -0
- package/dist/no-variable-construct-id.d.mts +2 -0
- package/dist/no-variable-construct-id.mjs +63 -0
- package/dist/no-variable-construct-id.mjs.map +1 -0
- package/dist/pascal-case-construct-id.d.mts +2 -0
- package/dist/pascal-case-construct-id.mjs +17 -44
- package/dist/pascal-case-construct-id.mjs.map +1 -0
- package/dist/require-passing-this.d.mts +2 -0
- package/dist/require-passing-this.mjs +39 -0
- package/dist/require-passing-this.mjs.map +1 -0
- package/dist/utils/convertString.d.mts +1 -0
- package/dist/utils/convertString.mjs +4 -9
- package/dist/utils/convertString.mjs.map +1 -0
- package/dist/utils/typeCheck.d.mts +3 -0
- package/dist/utils/typeCheck.mjs +16 -0
- package/dist/utils/typeCheck.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/utils/isConstructOrStackType.mjs +0 -19
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { AST_NODE_TYPES, ESLintUtils, } from "@typescript-eslint/utils";
|
|
2
2
|
import { toPascalCase } from "./utils/convertString.mjs";
|
|
3
|
-
import { isConstructOrStackType } from "./utils/
|
|
4
|
-
|
|
3
|
+
import { isConstructOrStackType } from "./utils/typeCheck.mjs";
|
|
4
|
+
const QUOTE_TYPE = {
|
|
5
5
|
SINGLE: "'",
|
|
6
6
|
DOUBLE: '"',
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Enforce PascalCase for Construct ID.
|
|
11
|
-
* @param context - The rule context provided by ESLint
|
|
12
|
-
* @returns An object containing the AST visitor functions
|
|
13
|
-
* @see {@link https://eslint-cdk-plugin.dev/rules/pascal-case-construct-id} - Documentation
|
|
14
|
-
*/
|
|
15
|
-
export var pascalCaseConstructId = ESLintUtils.RuleCreator.withoutDocs({
|
|
8
|
+
export const pascalCaseConstructId = ESLintUtils.RuleCreator.withoutDocs({
|
|
16
9
|
meta: {
|
|
17
10
|
type: "problem",
|
|
18
11
|
docs: {
|
|
@@ -25,23 +18,12 @@ export var pascalCaseConstructId = ESLintUtils.RuleCreator.withoutDocs({
|
|
|
25
18
|
fixable: "code",
|
|
26
19
|
},
|
|
27
20
|
defaultOptions: [],
|
|
28
|
-
create
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
create(context) {
|
|
22
|
+
const parserServices = ESLintUtils.getParserServices(context);
|
|
23
|
+
const typeChecker = parserServices.program.getTypeChecker();
|
|
31
24
|
return {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// validateConstructId(node, context, node.expression.arguments);
|
|
35
|
-
// },
|
|
36
|
-
// VariableDeclaration(node) {
|
|
37
|
-
// if (!node.declarations.length) return;
|
|
38
|
-
// for (const declaration of node.declarations) {
|
|
39
|
-
// if (declaration.init?.type !== AST_NODE_TYPES.NewExpression) return;
|
|
40
|
-
// validateConstructId(node, context, declaration.init.arguments);
|
|
41
|
-
// }
|
|
42
|
-
// },
|
|
43
|
-
NewExpression: function (node) {
|
|
44
|
-
var type = checker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node));
|
|
25
|
+
NewExpression(node) {
|
|
26
|
+
const type = typeChecker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node));
|
|
45
27
|
if (!isConstructOrStackType(type)) {
|
|
46
28
|
return;
|
|
47
29
|
}
|
|
@@ -52,38 +34,29 @@ export var pascalCaseConstructId = ESLintUtils.RuleCreator.withoutDocs({
|
|
|
52
34
|
};
|
|
53
35
|
},
|
|
54
36
|
});
|
|
55
|
-
|
|
56
|
-
* check if the string is PascalCase
|
|
57
|
-
* @param str - The string to check
|
|
58
|
-
* @returns true if the string is PascalCase, false otherwise
|
|
59
|
-
*/
|
|
60
|
-
var isPascalCase = function (str) {
|
|
37
|
+
const isPascalCase = (str) => {
|
|
61
38
|
return /^[A-Z][a-zA-Z0-9]*$/.test(str);
|
|
62
39
|
};
|
|
63
|
-
|
|
64
|
-
* Check the construct ID is PascalCase
|
|
65
|
-
*/
|
|
66
|
-
var validateConstructId = function (node, context, expression) {
|
|
67
|
-
var _a;
|
|
40
|
+
const validateConstructId = (node, context, expression) => {
|
|
68
41
|
if (expression.arguments.length < 2)
|
|
69
42
|
return;
|
|
70
|
-
|
|
71
|
-
var secondArg = expression.arguments[1];
|
|
43
|
+
const secondArg = expression.arguments[1];
|
|
72
44
|
if (secondArg.type !== AST_NODE_TYPES.Literal ||
|
|
73
45
|
typeof secondArg.value !== "string") {
|
|
74
46
|
return;
|
|
75
47
|
}
|
|
76
|
-
|
|
48
|
+
const quote = secondArg.raw?.startsWith('"')
|
|
77
49
|
? QUOTE_TYPE.DOUBLE
|
|
78
50
|
: QUOTE_TYPE.SINGLE;
|
|
79
51
|
if (!isPascalCase(secondArg.value)) {
|
|
80
52
|
context.report({
|
|
81
|
-
node
|
|
53
|
+
node,
|
|
82
54
|
messageId: "pascalCaseConstructId",
|
|
83
|
-
fix:
|
|
84
|
-
|
|
85
|
-
return fixer.replaceText(secondArg,
|
|
55
|
+
fix: (fixer) => {
|
|
56
|
+
const pascalCaseValue = toPascalCase(secondArg.value);
|
|
57
|
+
return fixer.replaceText(secondArg, `${quote}${pascalCaseValue}${quote}`);
|
|
86
58
|
},
|
|
87
59
|
});
|
|
88
60
|
}
|
|
89
61
|
};
|
|
62
|
+
//# sourceMappingURL=pascal-case-construct-id.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pascal-case-construct-id.mjs","sourceRoot":"","sources":["../src/pascal-case-construct-id.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,GAGZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;CACH,CAAC;AAaX,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC;IACvE,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,sCAAsC;SACpD;QACD,QAAQ,EAAE;YACR,qBAAqB,EAAE,kCAAkC;SAC1D;QACD,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,MAAM;KAChB;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,cAAc,GAAG,WAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC9D,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAC5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AY,CAAC,SAAS,CAAC,KAAe,CAAC,CAAC;gBAChE,OAAO,KAAK,CAAC,WAAW,CACtB,SAAS,EACT,GAAG,KAAK,GAAG,eAAe,GAAG,KAAK,EAAE,CACrC,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
+
import { isConstructType } from "./utils/typeCheck.mjs";
|
|
3
|
+
export const requirePassingThis = ESLintUtils.RuleCreator.withoutDocs({
|
|
4
|
+
meta: {
|
|
5
|
+
type: "problem",
|
|
6
|
+
docs: {
|
|
7
|
+
description: "Require passing `this` in a constructor.",
|
|
8
|
+
},
|
|
9
|
+
messages: {
|
|
10
|
+
requirePassingThis: "Require passing `this` in a constructor.",
|
|
11
|
+
},
|
|
12
|
+
schema: [],
|
|
13
|
+
fixable: "code",
|
|
14
|
+
},
|
|
15
|
+
defaultOptions: [],
|
|
16
|
+
create(context) {
|
|
17
|
+
const parserServices = ESLintUtils.getParserServices(context);
|
|
18
|
+
const typeChecker = parserServices.program.getTypeChecker();
|
|
19
|
+
return {
|
|
20
|
+
NewExpression(node) {
|
|
21
|
+
const type = typeChecker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node));
|
|
22
|
+
if (!isConstructType(type) || !node.arguments.length) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const argument = node.arguments[0];
|
|
26
|
+
if (argument.type !== AST_NODE_TYPES.ThisExpression) {
|
|
27
|
+
context.report({
|
|
28
|
+
node,
|
|
29
|
+
messageId: "requirePassingThis",
|
|
30
|
+
fix: (fixer) => {
|
|
31
|
+
return fixer.replaceText(argument, "this");
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=require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AK,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;wBAC7C,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toPascalCase: (str: string) => string;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* Convert a string to PascalCase
|
|
3
|
-
* @param str - The string to convert
|
|
4
|
-
* @returns The PascalCase string
|
|
5
|
-
*/
|
|
6
|
-
export var toPascalCase = function (str) {
|
|
1
|
+
export const toPascalCase = (str) => {
|
|
7
2
|
return str
|
|
8
3
|
.split(/[-_\s]/)
|
|
9
|
-
.map(
|
|
10
|
-
// Consider camelCase, split by uppercase letters
|
|
4
|
+
.map((word) => {
|
|
11
5
|
return word
|
|
12
6
|
.replace(/([A-Z])/g, " $1")
|
|
13
7
|
.split(/\s+/)
|
|
14
|
-
.map(
|
|
8
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase())
|
|
15
9
|
.join("");
|
|
16
10
|
})
|
|
17
11
|
.join("");
|
|
18
12
|
};
|
|
13
|
+
//# sourceMappingURL=convertString.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertString.mjs","sourceRoot":"","sources":["../../src/utils/convertString.mts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE;IAClD,OAAO,GAAG;SACP,KAAK,CAAC,QAAQ,CAAC;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAEZ,OAAO,IAAI;aACR,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;aAC1B,KAAK,CAAC,KAAK,CAAC;aACZ,GAAG,CACF,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CACrE;aACA,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const isConstructOrStackType = (type) => {
|
|
2
|
+
return isTargetSuperClassType(type, ["Construct", "Stack"]);
|
|
3
|
+
};
|
|
4
|
+
export const isConstructType = (type) => {
|
|
5
|
+
return isTargetSuperClassType(type, ["Construct"]);
|
|
6
|
+
};
|
|
7
|
+
const isTargetSuperClassType = (type, targetSuperClasses) => {
|
|
8
|
+
if (!type.symbol)
|
|
9
|
+
return false;
|
|
10
|
+
if (targetSuperClasses.some((suffix) => type.symbol.name.endsWith(suffix))) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
const baseTypes = type.getBaseTypes() || [];
|
|
14
|
+
return baseTypes.some((baseType) => isConstructOrStackType(baseType));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=typeCheck.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeCheck.mjs","sourceRoot":"","sources":["../../src/utils/typeCheck.mts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAU,EAAW,EAAE;IAC5D,OAAO,sBAAsB,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAU,EAAW,EAAE;IACrD,OAAO,sBAAsB,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;AACrD,CAAC,CAAC;AAQF,MAAM,sBAAsB,GAAG,CAC7B,IAAU,EACV,kBAAoC,EAC3B,EAAE;IACX,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAG/B,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC;IACd,CAAC;IAGD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IAC5C,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-cdk-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "eslint plugin for AWS CDK projects",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "rm -rf dist && tsc
|
|
8
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
9
9
|
"test": "vitest --run",
|
|
10
10
|
"lint": "eslint --fix --config eslint.config.mjs",
|
|
11
11
|
"release:minor": "standard-version --release-as minor",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export var SUPPORTED_SUPER_CLASS_SUFFIXES = ["Construct", "Stack"];
|
|
2
|
-
/**
|
|
3
|
-
* Check if the type extends Construct or Stack
|
|
4
|
-
* @param type - The type to check
|
|
5
|
-
* @returns True if the type extends Construct or Stack, otherwise false
|
|
6
|
-
*/
|
|
7
|
-
export var isConstructOrStackType = function (type) {
|
|
8
|
-
if (!type.symbol)
|
|
9
|
-
return false;
|
|
10
|
-
// NOTE: Check if the current type ends in Construct or Stack
|
|
11
|
-
if (SUPPORTED_SUPER_CLASS_SUFFIXES.some(function (suffix) {
|
|
12
|
-
return type.symbol.name.endsWith(suffix);
|
|
13
|
-
})) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
// NOTE: Check the base type
|
|
17
|
-
var baseTypes = type.getBaseTypes() || [];
|
|
18
|
-
return baseTypes.some(function (baseType) { return isConstructOrStackType(baseType); });
|
|
19
|
-
};
|