@typespec/eslint-plugin 0.51.0 → 0.52.0-dev.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/dist/src/index.d.ts +1 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/rules/call-decorator.d.ts.map +1 -1
- package/dist/src/rules/call-decorator.js +5 -2
- package/dist/src/rules/call-decorator.js.map +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/package.json +8 -7
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const rules:
|
|
2
|
-
"call-decorator": import("@typescript-eslint/utils/dist/ts-eslint/Rule.js").RuleModule<"default" | "suggestReplaceWithContextCall", never[], import("@typescript-eslint/utils/dist/ts-eslint/Rule.js").RuleListener>;
|
|
3
|
-
};
|
|
1
|
+
export declare const rules: Record<string, unknown>;
|
|
4
2
|
export declare const configs: {
|
|
5
3
|
recommended: {
|
|
6
4
|
rules: {
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAEzC,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC"}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAA8D;AAEjD,QAAA,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAA8D;AAEjD,QAAA,KAAK,GAA4B;IAC5C,gBAAgB,EAAE,qCAAiB;CACpC,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,WAAW,EAAE;QACX,KAAK,EAAE;YACL,0BAA0B,EAAE,MAAM;SACnC;KACF;CACF,CAAC"}
|
|
@@ -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,kGAqD5B,CAAC"}
|
|
@@ -13,7 +13,10 @@ const messages = {
|
|
|
13
13
|
};
|
|
14
14
|
exports.callDecoratorRule = (0, utils_js_1.createRule)({
|
|
15
15
|
create(context) {
|
|
16
|
-
const parserServices = context.
|
|
16
|
+
const parserServices = context.sourceCode.parserServices;
|
|
17
|
+
if (!parserServices.program) {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
17
20
|
const checker = parserServices.program.getTypeChecker();
|
|
18
21
|
return {
|
|
19
22
|
CallExpression(node) {
|
|
@@ -51,7 +54,7 @@ exports.callDecoratorRule = (0, utils_js_1.createRule)({
|
|
|
51
54
|
meta: {
|
|
52
55
|
docs: {
|
|
53
56
|
description: "Calling a TypeSpec decorator from JS/TS code should be done with context.call",
|
|
54
|
-
recommended: "
|
|
57
|
+
recommended: "recommended",
|
|
55
58
|
},
|
|
56
59
|
hasSuggestions: true,
|
|
57
60
|
messages,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-decorator.js","sourceRoot":"","sources":["../../../src/rules/call-decorator.ts"],"names":[],"mappings":";;;;;;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K,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: <TOptions extends readonly unknown[], TMessageIds extends string
|
|
2
|
+
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds>>) => ESLintUtils.RuleModule<TMessageIds, TOptions, 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,yOAGtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0-dev.1",
|
|
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://microsoft.github.io/typespec",
|
|
@@ -30,20 +30,21 @@
|
|
|
30
30
|
"eslint": ">=0.8.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@types/mocha": "~10.0.
|
|
33
|
+
"@types/mocha": "~10.0.6",
|
|
34
34
|
"@types/node": "~18.11.9",
|
|
35
|
-
"@typespec/eslint-config-typespec": "~0.51.0",
|
|
36
|
-
"@typescript-eslint/parser": "^6.
|
|
37
|
-
"eslint": "
|
|
35
|
+
"@typespec/eslint-config-typespec": "~0.51.0 || >=0.52.0-dev <0.52.0",
|
|
36
|
+
"@typescript-eslint/parser": "^6.14.0",
|
|
37
|
+
"@typescript-eslint/rule-tester": "~6.14.0",
|
|
38
|
+
"eslint": "^8.55.0",
|
|
38
39
|
"mocha": "~10.2.0",
|
|
39
40
|
"mocha-junit-reporter": "~2.2.1",
|
|
40
41
|
"mocha-multi-reporters": "~1.5.1",
|
|
41
42
|
"c8": "~8.0.1",
|
|
42
43
|
"rimraf": "~5.0.1",
|
|
43
|
-
"typescript": "~5.
|
|
44
|
+
"typescript": "~5.3.3"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@typescript-eslint/utils": "~
|
|
47
|
+
"@typescript-eslint/utils": "~6.14.0"
|
|
47
48
|
},
|
|
48
49
|
"scripts": {
|
|
49
50
|
"clean": "rimraf ./dist ./temp",
|