@lark-apaas/fullstack-presets 1.1.17 → 1.1.19

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.
@@ -16,11 +16,6 @@ const rule = {
16
16
  },
17
17
  },
18
18
  create(context) {
19
- // view.controller.ts 返回的是服务端渲染的视图,不走 shared 类型约定
20
- const filename = context.filename ?? context.getFilename();
21
- if (filename && /view\.controller\.ts$/.test(filename)) {
22
- return {};
23
- }
24
19
  // 追踪从 shared/ 路径导入的类型名
25
20
  const sharedTypeNames = new Set();
26
21
  return {
@@ -20,7 +20,7 @@ const testFileIgnorePatterns = [
20
20
  '**/*.spec.ts',
21
21
  '**/*.spec.tsx',
22
22
  ];
23
- const globalIgnoreServerPatterns = ['server/database/.introspect/**', ...testFileIgnorePatterns]; // 全局 eslint server ignore
23
+ const globalIgnoreServerPatterns = ['tmp/**', 'server/database/.introspect/**', ...testFileIgnorePatterns]; // 全局 eslint server ignore
24
24
  const globalIgnoreClientPatterns = ['dist', 'node_modules', 'client/src/api/gen', ...testFileIgnorePatterns]; // 全局 eslint client Ignore
25
25
  // 只导出纯净的规则配置,不包含基础配置
26
26
  // 用户需要在项目配置中自己添加基础配置(eslintJs, tseslint, nestjs 等)
@@ -169,8 +169,8 @@ const baseConfig = {
169
169
  // 平台规则:禁止直接调用 capability 内部 API,应使用 capabilityClient
170
170
  '@lark-apaas/no-direct-capability-api': 'error',
171
171
  '@lark-apaas/no-nested-styled-jsx': 'error',
172
- // 自定义规则:HTTP 调用响应类型必须定义在 shared/
173
- '@lark-apaas/require-shared-request-type': 'error',
172
+ // 自定义规则:HTTP 调用响应类型必须定义在 shared/(默认关闭,需 y 位升级后对新应用开启)
173
+ '@lark-apaas/require-shared-request-type': 'off',
174
174
  // TypeScript 规则
175
175
  '@typescript-eslint/no-unused-vars': 'off', // 未使用变量检查关闭
176
176
  '@typescript-eslint/no-explicit-any': 'off', // 允许使用 any 类型
@@ -75,8 +75,8 @@ exports.default = {
75
75
  '@darraghor/nestjs-typed/all-properties-are-whitelisted': 'off',
76
76
  // 自定义规则:Drizzle count() 必须 Number() 包裹
77
77
  '@lark-apaas/require-number-wrapped-count': 'error',
78
- // 自定义规则:Controller 返回类型必须定义在 shared/
79
- '@lark-apaas/require-shared-response-type': 'error',
78
+ // 自定义规则:Controller 返回类型必须定义在 shared/(默认关闭,需 y 位升级后对新应用开启)
79
+ '@lark-apaas/require-shared-response-type': 'off',
80
80
  // Drizzle ORM 规则
81
81
  'no-restricted-syntax': [
82
82
  'error',
@@ -21,7 +21,7 @@ const testFileIgnorePatterns = [
21
21
  '**/*.spec.ts',
22
22
  '**/*.spec.tsx',
23
23
  ];
24
- const globalIgnoreServerPatterns = ['server/database/.introspect/**', ...testFileIgnorePatterns]; // 全局 eslint server ignore
24
+ const globalIgnoreServerPatterns = ['tmp/**', 'server/database/.introspect/**', ...testFileIgnorePatterns]; // 全局 eslint server ignore
25
25
  const globalIgnoreClientPatterns = ['dist', 'node_modules', 'client/src/api/gen', ...testFileIgnorePatterns]; // 全局 eslint client Ignore
26
26
  // @lark-apaas 插件只注册一次,client 和 server config 共享
27
27
  const larkApaasPlugin = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-presets",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "files": [
5
5
  "lib"
6
6
  ],