@lark-apaas/coding-template-nestjs-react-fullstack 0.1.73 → 0.1.75
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 +11 -6
- package/package.json +1 -1
- package/template/.swcrc +5 -0
- package/template/_gitignore +0 -1
- package/template/client/src/components/business-ui/form/select-field.tsx +0 -1
- package/template/oxlint.config.mts +65 -0
- package/template/package-lock.json +1170 -371
- package/template/package.json +8 -8
- package/template/scripts/lint.js +60 -22
- package/template/tsconfig.app.json +9 -8
- package/template/tsconfig.json +5 -2
- package/template/tsconfig.node.json +17 -6
- package/template/eslint.config.js +0 -66
package/README.md
CHANGED
|
@@ -27,15 +27,20 @@ MIAODA_APP_TYPE=3 npx @lark-apaas/miaoda-cli@<latest> app init \
|
|
|
27
27
|
- `SANDBOX_PUBLIC_URL` —— 沙箱公网域
|
|
28
28
|
- `CLIENT_BASE_PATH=/app/<app_id>/` —— React Router basename + Vite base
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## 代码检查
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
模板使用 Oxlint native 预设(`fullstack-presets@1.1.27`)和 TypeScript-native 7.0.2。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
- `npm run oxlint`:原生规则及必要 JS 回退;未使用禁用指令为 warning。
|
|
35
|
+
- `npm run type:check`:明确调用 `typescript-native/bin/tsc` 检查 client/server,避免 `.bin/tsc` 冲突。
|
|
36
|
+
- `npm run lint`:串行执行代码、类型与可用的样式检查,全部执行后汇总退出码。runner 与 fullstack-cli、miaoda-cli 的同步版本一致,检查器以工程 scripts 为准。
|
|
37
|
+
- `npm run lint -- --files <paths>`:对目标文件使用同一 Oxlint 配置,并按所属范围检查类型。
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
Nest 开发和生产编译仍使用 SWC,`typeCheck: false`。Node 配置使用 Preserve/Bundler 做类型检查;SWC 输出 CommonJS。`.swcrc` 为路径别名指定独立 baseUrl,TS7 配置不再使用该废弃字段。模板显式保留 TypeScript 5,满足 preset/parser 等包的 JS API 与 peer 依赖;项目类型检查仍明确使用 TypeScript-native 7。
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
MCP UI 在 `server/mcp/ui` 中保留独立 TS 配置,主工程排除该浏览器目录。MCP UI 的编译器和 lint 工具按工程 scripts 与配置判断;对应配置从 coding-steering 的 mcp-guide 资产复制到工程根,不自动将 UI 检查并入主工程。
|
|
42
|
+
|
|
43
|
+
`npm run upgrade` 调用 `fullstack-cli sync`,需使用支持 Oxlint runner 的 CLI 版本。同步后的 `lint.js` 根据工程已有 scripts 选择检查器,保留类型检查脚本和应用 lint 配置。
|
|
39
44
|
|
|
40
45
|
## 包结构
|
|
41
46
|
|
|
@@ -54,6 +59,6 @@ CLI 不注入 MCP UI 检查命令;主工程保留原有 client/server 检查
|
|
|
54
59
|
|
|
55
60
|
模板不生成 `mcp-build-id`,构建脚本沿用原流程。SDK 发布态使用 veFaaS 函数 ID 与发布 revision;开发态使用后端编译产物指纹,UI/Skill 内容继续独立计入修订。首次升级切换版本来源后,Host 应重新发现。
|
|
56
61
|
|
|
57
|
-
MCP UI 的 `tsconfig.json` 和 `
|
|
62
|
+
MCP UI 的 `tsconfig.json` 和 `oxlint.mcp-ui.config.mts` 由 Agent 随 UI 在 `server/mcp/ui` 中创建,执行命令与完整示例见 coding-steering 的 `mcp-ui-guide`。主工程的 TS/Oxlint 排除该浏览器目录,不自动运行 UI 检查;不为无 UI 的应用创建配置或检查命令。
|
|
58
63
|
|
|
59
64
|
`server/mcp/ui` 与 `server/mcp/skills` 变更应由平台判为后端发布;纯前端发布不替换已部署 MCP 产物,也不承诺热更 MCP UI。发布版本号仅在实际后端发布时更新。
|
package/package.json
CHANGED
package/template/_gitignore
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint';
|
|
2
|
+
import { oxlintPresetsOfSimple } from '@lark-apaas/fullstack-presets';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
categories: {
|
|
6
|
+
correctness: 'off',
|
|
7
|
+
suspicious: 'off',
|
|
8
|
+
pedantic: 'off',
|
|
9
|
+
perf: 'off',
|
|
10
|
+
style: 'off',
|
|
11
|
+
restriction: 'off',
|
|
12
|
+
nursery: 'off',
|
|
13
|
+
},
|
|
14
|
+
options: {
|
|
15
|
+
respectEslintDisableDirectives: true,
|
|
16
|
+
reportUnusedDisableDirectives: 'warn',
|
|
17
|
+
typeAware: false,
|
|
18
|
+
typeCheck: false,
|
|
19
|
+
},
|
|
20
|
+
settings: {
|
|
21
|
+
'import/resolver': {
|
|
22
|
+
node: { extensions: ['.js', '.jsx', '.ts', '.tsx'] },
|
|
23
|
+
alias: {
|
|
24
|
+
map: [
|
|
25
|
+
['@', './client/src'],
|
|
26
|
+
['@client', './client'],
|
|
27
|
+
['@server', './server'],
|
|
28
|
+
['@shared', './shared'],
|
|
29
|
+
],
|
|
30
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
ignorePatterns: [
|
|
35
|
+
'dist/**',
|
|
36
|
+
'dist-server/**',
|
|
37
|
+
'source_package/**',
|
|
38
|
+
'coverage/**',
|
|
39
|
+
'logs/**',
|
|
40
|
+
'tmp/**',
|
|
41
|
+
'temp/**',
|
|
42
|
+
'.playwright-cli/**',
|
|
43
|
+
'.agent/**',
|
|
44
|
+
'client/src/api/gen/**',
|
|
45
|
+
'server/mcp/ui/**',
|
|
46
|
+
'server/database/.introspect/**',
|
|
47
|
+
'**/node_modules/**',
|
|
48
|
+
'**/*.d.ts',
|
|
49
|
+
'**/*.js.map',
|
|
50
|
+
'**/__tests__/**',
|
|
51
|
+
'**/*.test.{js,jsx,ts,tsx}',
|
|
52
|
+
'**/*.spec.{js,jsx,ts,tsx}',
|
|
53
|
+
],
|
|
54
|
+
overrides: [
|
|
55
|
+
{
|
|
56
|
+
...oxlintPresetsOfSimple.client,
|
|
57
|
+
files: ['client/**/*.{ts,tsx}', 'shared/**/*.{ts,tsx}'],
|
|
58
|
+
},
|
|
59
|
+
oxlintPresetsOfSimple.appTsx,
|
|
60
|
+
{
|
|
61
|
+
...oxlintPresetsOfSimple.server,
|
|
62
|
+
files: ['server/**/*.{ts,tsx}', 'shared/**/*.{ts,tsx}'],
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
});
|