@longzai-intelligence-oxlint/nestjs-route-plugin 0.2.11 → 0.2.12
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/index.d.ts +0 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,51 +1,38 @@
|
|
|
1
1
|
import { ESTree } from "@oxlint/plugins";
|
|
2
|
-
//#region src/rules/enforce-typed-handler-return/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* enforce-typed-handler-return 规则定义
|
|
5
4
|
*/
|
|
6
5
|
declare const enforceTypedHandlerReturnRule: import("@oxlint/plugins").Rule;
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/rules/no-duplicates/index.d.ts
|
|
9
6
|
/**
|
|
10
7
|
* no-duplicates 规则定义
|
|
11
8
|
*
|
|
12
9
|
* 对重复组中除第一个之外的所有路由进行报告
|
|
13
10
|
*/
|
|
14
11
|
declare const noDuplicatesRule: import("@oxlint/plugins").Rule;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/rules/order/index.d.ts
|
|
17
12
|
/**
|
|
18
13
|
* order 规则定义
|
|
19
14
|
*
|
|
20
15
|
* 检测同一 HTTP 方法组内静态路由出现在参数化路由之后的违规情况
|
|
21
16
|
*/
|
|
22
17
|
declare const orderRule: import("@oxlint/plugins").Rule;
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/rules/prefer-typed-controller/index.d.ts
|
|
25
18
|
/**
|
|
26
19
|
* prefer-typed-controller 规则定义
|
|
27
20
|
*
|
|
28
21
|
* 检测同时使用 Controller 和 ApiTags 装饰器的类,建议使用 TypedController
|
|
29
22
|
*/
|
|
30
23
|
declare const preferTypedControllerRule: import("@oxlint/plugins").Rule;
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/rules/require-route-constant/index.d.ts
|
|
33
24
|
/**
|
|
34
25
|
* require-route-constant 规则定义
|
|
35
26
|
*
|
|
36
27
|
* 检测 Controller 装饰器参数是否使用了禁止的表达式类型
|
|
37
28
|
*/
|
|
38
29
|
declare const requireRouteConstantRule: import("@oxlint/plugins").Rule;
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/rules/require-typed-response/index.d.ts
|
|
41
30
|
/**
|
|
42
31
|
* require-typed-response 规则定义
|
|
43
32
|
*
|
|
44
33
|
* 检测 defineHandler 解构是否包含响应函数,以及 TypedHandle 方法的 return 语句是否使用包装函数
|
|
45
34
|
*/
|
|
46
35
|
declare const requireTypedResponseRule: import("@oxlint/plugins").Rule;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/types.d.ts
|
|
49
36
|
/**
|
|
50
37
|
* NestJS 路由管理插件类型定义
|
|
51
38
|
*
|
|
@@ -103,8 +90,6 @@ type RequireTypedResponseOptions = {
|
|
|
103
90
|
*/
|
|
104
91
|
allowDirectReturn?: boolean;
|
|
105
92
|
};
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/utils/route.utils.d.ts
|
|
108
93
|
/**
|
|
109
94
|
* 判断给定路径是否为静态路由(不包含参数占位符)
|
|
110
95
|
*
|
|
@@ -147,8 +132,6 @@ declare function isControllerDecorator(expression: ESTree.Node): boolean;
|
|
|
147
132
|
* @returns 是否为 ApiTags 装饰器
|
|
148
133
|
*/
|
|
149
134
|
declare function isApiTagsDecorator(expression: ESTree.Node): boolean;
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/utils/handler.utils.d.ts
|
|
152
135
|
/**
|
|
153
136
|
* 判断节点是否为 defineHandler() 调用表达式
|
|
154
137
|
*
|
|
@@ -187,8 +170,6 @@ declare function isResponseFunctionCall(node: ESTree.Node | null | undefined, re
|
|
|
187
170
|
* @returns 是否存在 return 语句
|
|
188
171
|
*/
|
|
189
172
|
declare function hasReturnStatement(node: ESTree.Node): boolean;
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/index.d.ts
|
|
192
173
|
/**
|
|
193
174
|
* nestjs-route 插件
|
|
194
175
|
*
|
|
@@ -196,5 +177,4 @@ declare function hasReturnStatement(node: ESTree.Node): boolean;
|
|
|
196
177
|
* 通过 eslintCompatPlugin 包装以同时支持 Oxlint 和 ESLint 运行时
|
|
197
178
|
*/
|
|
198
179
|
declare const nestjsRoutePlugin: import("@oxlint/plugins").Plugin;
|
|
199
|
-
//#endregion
|
|
200
180
|
export { type PreferTypedControllerOptions, type RequireRouteConstantOptions, type RequireTypedResponseOptions, type RouteInfo, nestjsRoutePlugin as default, nestjsRoutePlugin, enforceTypedHandlerReturnRule, extractDestructuredNames, extractRouteInfos, findDuplicateRoutes, hasReturnStatement, hasTypedHandleDecorator, isApiTagsDecorator, isControllerDecorator, isDefineHandlerCall, isResponseFunctionCall, isRouteDecorator, isStaticRoute, noDuplicatesRule, orderRule, preferTypedControllerRule, requireRouteConstantRule, requireTypedResponseRule };
|