@typespec/eslint-plugin 0.55.0-dev.1 → 0.56.0-dev.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-decorator.d.ts","sourceRoot":"","sources":["../../../src/rules/call-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"call-decorator.d.ts","sourceRoot":"","sources":["../../../src/rules/call-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,iBAAiB,kGAuD5B,CAAC"}
|
|
@@ -14,16 +14,20 @@ const messages = {
|
|
|
14
14
|
exports.callDecoratorRule = (0, utils_js_1.createRule)({
|
|
15
15
|
create(context) {
|
|
16
16
|
const parserServices = context.sourceCode.parserServices;
|
|
17
|
-
if (!parserServices.program) {
|
|
17
|
+
if (parserServices === undefined || !parserServices.program) {
|
|
18
18
|
return {};
|
|
19
19
|
}
|
|
20
20
|
const checker = parserServices.program.getTypeChecker();
|
|
21
21
|
return {
|
|
22
22
|
CallExpression(node) {
|
|
23
|
+
var _a;
|
|
23
24
|
if (node.callee.type === utils_1.TSESTree.AST_NODE_TYPES.Identifier) {
|
|
24
25
|
const functionName = node.callee.name;
|
|
25
26
|
if (functionName.startsWith("$")) {
|
|
26
|
-
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
|
|
27
|
+
const tsNode = (_a = parserServices.esTreeNodeToTSNodeMap) === null || _a === void 0 ? void 0 : _a.get(node);
|
|
28
|
+
if (tsNode === undefined) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
27
31
|
const signature = checker.getResolvedSignature(tsNode);
|
|
28
32
|
if (signature === undefined) {
|
|
29
33
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-decorator.js","sourceRoot":"","sources":["../../../src/rules/call-decorator.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA8D;AAC9D,4DAA4B;AAC5B,0CAAyC;AAEzC,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE,yDAAyD;IAClE,6BAA6B,EAAE,2BAA2B;CAC3D,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,qBAAU,EAAiC;IAC1E,MAAM,CAAC,OAAO;QACZ,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;QACzD,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"call-decorator.js","sourceRoot":"","sources":["../../../src/rules/call-decorator.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA8D;AAC9D,4DAA4B;AAC5B,0CAAyC;AAEzC,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE,yDAAyD;IAClE,6BAA6B,EAAE,2BAA2B;CAC3D,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,qBAAU,EAAiC;IAC1E,MAAM,CAAC,OAAO;QACZ,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;QACzD,IAAI,cAAc,KAAK,SAAS,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAC5D,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACxD,OAAO;YACL,cAAc,CAAC,IAAI;;gBACjB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,gBAAQ,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;oBAC5D,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;oBACtC,IAAI,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;wBACjC,MAAM,MAAM,GAAG,MAAA,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AG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjD,MAAM,gBAAgB,GAAG,OAAO,CAAC,yBAAyB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACrF,IACE,CAAC,gBAAgB,CAAC,KAAK,GAAG,oBAAE,CAAC,SAAS,CAAC,cAAc;QACnD,CAAA,MAAA,gBAAgB,CAAC,WAAW,0CAAE,IAAI,MAAK,kBAAkB,CAAC;QAC5D,CAAA,MAAA,gBAAgB,CAAC,MAAM,0CAAE,IAAI,MAAK,kBAAkB,EACpD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const createRule: <
|
|
2
|
+
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options, ESLintUtils.RuleListener>;
|
|
3
3
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,eAAO,MAAM,UAAU,mOAGtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0-dev.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "Eslint plugin providing set of rules to be used in the JS/TS code of TypeSpec libraries",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
"!dist/test/**"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"eslint": "^8.
|
|
30
|
+
"eslint": "^8.57.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "~18.11.19",
|
|
34
|
-
"@typescript-eslint/parser": "^
|
|
35
|
-
"@typescript-eslint/rule-tester": "~
|
|
36
|
-
"@typespec/eslint-config-typespec": "~0.
|
|
37
|
-
"@vitest/coverage-v8": "^1.
|
|
38
|
-
"@vitest/ui": "^1.
|
|
34
|
+
"@typescript-eslint/parser": "^7.4.0",
|
|
35
|
+
"@typescript-eslint/rule-tester": "~7.4.0",
|
|
36
|
+
"@typespec/eslint-config-typespec": "~0.55.0 || >=0.56.0-dev <0.56.0",
|
|
37
|
+
"@vitest/coverage-v8": "^1.4.0",
|
|
38
|
+
"@vitest/ui": "^1.4.0",
|
|
39
39
|
"c8": "^9.1.0",
|
|
40
|
-
"eslint": "^8.
|
|
40
|
+
"eslint": "^8.57.0",
|
|
41
41
|
"rimraf": "~5.0.5",
|
|
42
|
-
"typescript": "~5.
|
|
43
|
-
"vitest": "^1.
|
|
42
|
+
"typescript": "~5.4.3",
|
|
43
|
+
"vitest": "^1.4.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@typescript-eslint/utils": "~
|
|
46
|
+
"@typescript-eslint/utils": "~7.4.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"clean": "rimraf ./dist ./temp",
|