From f6f87e0c47bd2b4f1772e82948c3587655a93af6 Mon Sep 17 00:00:00 2001 From: Lyda <1829913225@qq.com> Date: Wed, 4 Feb 2026 18:37:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=20NestJS=20=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E6=B3=A8=E8=A7=A3=E5=92=8C=E8=A3=85?= =?UTF-8?q?=E9=A5=B0=E5=99=A8=E9=9D=99=E6=80=81=E5=80=BC=E7=9A=84=E9=AD=94?= =?UTF-8?q?=E6=B3=95=E5=80=BC=E6=A3=80=E6=9F=A5=E8=B1=81=E5=85=8D=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- references/js&ts.nest.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/references/js&ts.nest.md b/references/js&ts.nest.md index 354131a..a5a6581 100644 --- a/references/js&ts.nest.md +++ b/references/js&ts.nest.md @@ -61,6 +61,7 @@ src/ - 该文件不能写业务逻辑,只能写调用 service 的代码 - 文件名使用小写加横线命名(如 `user-extends.controller.ts`) - 文件名必须加 `.controller.ts` 后缀 +- 注解和装饰器上的静态值无需进行魔法值的提炼 `[JsTs.Base.NoMagicStringsAndNumbers]` ### Good @@ -113,6 +114,8 @@ userModule.ts ## Dto 命名规范 `[JsTs.Nest.DtoDefinition]` +> - override `[JsTs.Base.NoMagicStringsAndNumbers]` + - 文件名使用小写加横线命名(如 `user-extends.dto.ts`) - 文件名必须加 `.dto.ts` 后缀 - dto 目录下必须包含 `dto.ts` 文件