Yuki Takei 2 месяцев назад
Родитель
Сommit
62e89c387a
2 измененных файлов с 5 добавлено и 2 удалено
  1. 1 1
      packages/remark-lsx/package.json
  2. 4 1
      packages/remark-lsx/src/server/index.ts

+ 1 - 1
packages/remark-lsx/package.json

@@ -25,7 +25,7 @@
     "watch:server": "pnpm run dev:server -w --emptyOutDir=false",
     "lint:js": "biome check",
     "lint:styles": "stylelint --allow-empty-input \"src/**/*.scss\" \"src/**/*.css\"",
-    "lint:typecheck": "vue-tsc --noEmit",
+    "lint:typecheck": "tsgo --noEmit",
     "lint": "run-p lint:*",
     "test": "vitest run --coverage"
   },

+ 4 - 1
packages/remark-lsx/src/server/index.ts

@@ -1,4 +1,5 @@
 import { SCOPE } from '@growi/core/dist/interfaces';
+import type { AccessTokenParser } from '@growi/core/dist/interfaces/server';
 import type { NextFunction, Request, Response } from 'express';
 import { query, validationResult } from 'express-validator';
 import { FilterXSS } from 'xss';
@@ -56,10 +57,12 @@ const middleware = (crowi: any, app: any): void => {
     true,
     loginRequiredFallback,
   );
-  const accessTokenParser = crowi.accessTokenParser;
+  const accessTokenParser: AccessTokenParser = crowi.accessTokenParser;
 
   app.get(
     '/_api/lsx',
+    // biome-ignore lint/suspicious/noTsIgnore: Suppress auto fix by lefthook
+    // @ts-ignore - Scope type causes "Type instantiation is excessively deep" with tsgo
     accessTokenParser([SCOPE.READ.FEATURES.PAGE], { acceptLegacy: true }),
     loginRequired,
     lsxValidator,