Yuki Takei 6 місяців тому
батько
коміт
d634c49c5f
55 змінених файлів з 47 додано та 62 видалено
  1. 1 0
      .gitignore
  2. 1 0
      apps/pdf-converter/src/controllers/pdf.spec.ts
  3. 1 0
      apps/pdf-converter/src/controllers/pdf.ts
  4. 1 2
      apps/pdf-converter/src/service/pdf-convert.ts
  5. 0 1
      apps/slackbot-proxy/src/controllers/slack.ts
  6. 2 0
      apps/slackbot-proxy/src/services/growi-uri-injector/ViewInteractionPayloadDelegator.ts
  7. 5 2
      biome.json
  8. 0 1
      packages/core/src/models/serializers/attachment-serializer.ts
  9. 6 3
      packages/core/src/models/vo/error-apiv3.ts
  10. 1 1
      packages/core/src/utils/page-path-utils/index.ts
  11. 0 1
      packages/core/src/utils/page-utils.ts
  12. 0 1
      packages/core/vite.config.ts
  13. 1 1
      packages/pluginkit/src/v4/client/utils/growi-facade/growi-react.ts
  14. 0 1
      packages/pluginkit/src/v4/server/utils/common/validate-growi-plugin-directive.spec.ts
  15. 0 1
      packages/pluginkit/src/v4/server/utils/common/validate-growi-plugin-directive.ts
  16. 0 1
      packages/pluginkit/src/v4/server/utils/template/scan.ts
  17. 0 1
      packages/pluginkit/src/v4/server/utils/template/validate-growi-plugin-directive.spec.ts
  18. 0 1
      packages/pluginkit/src/v4/server/utils/theme/validate-growi-plugin-directive.spec.ts
  19. 0 1
      packages/pluginkit/src/v4/utils/template.spec.ts
  20. 0 1
      packages/pluginkit/vite.config.ts
  21. 1 2
      packages/presentation/src/client/components/GrowiSlides.tsx
  22. 1 1
      packages/presentation/src/client/components/MarpSlides.tsx
  23. 2 2
      packages/presentation/src/client/components/Presentation.tsx
  24. 0 1
      packages/presentation/src/client/components/Slides.tsx
  25. 1 1
      packages/presentation/src/services/use-slides-by-frontmatter.ts
  26. 0 1
      packages/presentation/vite.config.ts
  27. 0 1
      packages/preset-templates/test/index.test.ts
  28. 4 2
      packages/remark-attachment-refs/src/client/components/AttachmentList.tsx
  29. 2 1
      packages/remark-attachment-refs/src/client/components/ExtractedAttachments.tsx
  30. 0 1
      packages/remark-attachment-refs/src/client/components/Ref.tsx
  31. 0 1
      packages/remark-attachment-refs/src/client/components/RefImg.tsx
  32. 0 1
      packages/remark-attachment-refs/src/client/components/Refs.tsx
  33. 0 1
      packages/remark-attachment-refs/src/client/components/RefsImg.tsx
  34. 1 1
      packages/remark-attachment-refs/src/client/stores/refs.spec.ts
  35. 0 1
      packages/remark-drawio/src/components/DrawioViewer.tsx
  36. 0 1
      packages/remark-growi-directive/test/remark-growi-directive.test.js
  37. 3 2
      packages/remark-lsx/src/client/components/Lsx.tsx
  38. 2 1
      packages/remark-lsx/src/client/components/LsxPageList/LsxListView.tsx
  39. 2 2
      packages/remark-lsx/src/client/components/LsxPageList/LsxPage.tsx
  40. 1 1
      packages/remark-lsx/src/client/stores/lsx/lsx.spec.ts
  41. 0 1
      packages/remark-lsx/src/client/stores/lsx/lsx.ts
  42. 0 1
      packages/remark-lsx/src/client/utils/page-node.spec.ts
  43. 1 0
      packages/remark-lsx/src/server/index.ts
  44. 0 1
      packages/remark-lsx/src/server/routes/list-pages/add-depth-condition.ts
  45. 0 1
      packages/remark-lsx/src/server/routes/list-pages/index.ts
  46. 0 1
      packages/slack/src/middlewares/verify-slack-request.ts
  47. 0 1
      packages/slack/src/utils/check-communicable.ts
  48. 0 1
      packages/slack/src/utils/interaction-payload-accessor.ts
  49. 0 1
      packages/slack/src/utils/slash-command-parser.test.ts
  50. 0 1
      packages/slack/vite.config.ts
  51. 1 1
      packages/ui/src/components/Attachment.tsx
  52. 1 1
      packages/ui/src/components/PagePath/PageListMeta.tsx
  53. 1 1
      packages/ui/src/components/PagePath/PagePathLabel.tsx
  54. 4 4
      packages/ui/src/components/UserPicture.tsx
  55. 0 1
      packages/ui/vite.config.ts

+ 1 - 0
.gitignore

@@ -39,6 +39,7 @@ yarn-error.log*
 .claude
 .claude
 *.orig
 *.orig
 *.code-workspace
 *.code-workspace
+*.timestamp-*.mjs
 
 
 # turborepo
 # turborepo
 .turbo
 .turbo

+ 1 - 0
apps/pdf-converter/src/controllers/pdf.spec.ts

@@ -1,6 +1,7 @@
 import { PlatformTest } from '@tsed/platform-http/testing';
 import { PlatformTest } from '@tsed/platform-http/testing';
 import { JobStatus, JobStatusSharedWithGrowi } from 'src/service/pdf-convert';
 import { JobStatus, JobStatusSharedWithGrowi } from 'src/service/pdf-convert';
 import SuperTest from 'supertest';
 import SuperTest from 'supertest';
+
 import Server from '../server';
 import Server from '../server';
 
 
 describe('PdfCtrl', () => {
 describe('PdfCtrl', () => {

+ 1 - 0
apps/pdf-converter/src/controllers/pdf.ts

@@ -10,6 +10,7 @@ import {
   Required,
   Required,
   Returns,
   Returns,
 } from '@tsed/schema';
 } from '@tsed/schema';
+
 import PdfConvertService, {
 import PdfConvertService, {
   JobStatus,
   JobStatus,
   JobStatusSharedWithGrowi,
   JobStatusSharedWithGrowi,

+ 1 - 2
apps/pdf-converter/src/service/pdf-convert.ts

@@ -2,7 +2,6 @@ import fs from 'node:fs';
 import path from 'node:path';
 import path from 'node:path';
 import { Readable, Writable } from 'node:stream';
 import { Readable, Writable } from 'node:stream';
 import { pipeline as pipelinePromise } from 'node:stream/promises';
 import { pipeline as pipelinePromise } from 'node:stream/promises';
-
 import { OnInit } from '@tsed/common';
 import { OnInit } from '@tsed/common';
 import { Service } from '@tsed/di';
 import { Service } from '@tsed/di';
 import { Logger } from '@tsed/logger';
 import { Logger } from '@tsed/logger';
@@ -225,7 +224,7 @@ class PdfConvertService implements OnInit {
   private getPdfWritable(): Writable {
   private getPdfWritable(): Writable {
     return new Writable({
     return new Writable({
       objectMode: true,
       objectMode: true,
-      write: async (pageInfo: PageInfo, encoding, callback) => {
+      write: async (pageInfo: PageInfo, _encoding, callback) => {
         const pattern = new RegExp(
         const pattern = new RegExp(
           `^${this.tmpOutputRootDir}(?:\\/([0-9]+))?\\/html\\/(.+?)\\.html$`,
           `^${this.tmpOutputRootDir}(?:\\/([0-9]+))?\\/html\\/(.+?)\\.html$`,
         );
         );

+ 0 - 1
apps/slackbot-proxy/src/controllers/slack.ts

@@ -1,5 +1,4 @@
 import { ServerResponse } from 'node:http';
 import { ServerResponse } from 'node:http';
-
 import {
 import {
   type GrowiCommand,
   type GrowiCommand,
   type IChannelOptionalId,
   type IChannelOptionalId,

+ 2 - 0
apps/slackbot-proxy/src/services/growi-uri-injector/ViewInteractionPayloadDelegator.ts

@@ -9,12 +9,14 @@ import {
 
 
 // see: https://api.slack.com/reference/interaction-payloads/views
 // see: https://api.slack.com/reference/interaction-payloads/views
 type ViewElement = TypedBlock & {
 type ViewElement = TypedBlock & {
+  // biome-ignore lint/suspicious/noExplicitAny: ignore
   private_metadata?: any;
   private_metadata?: any;
 };
 };
 
 
 // see: https://api.slack.com/reference/interaction-payloads/views
 // see: https://api.slack.com/reference/interaction-payloads/views
 type ViewInteractionPayload = TypedBlock & {
 type ViewInteractionPayload = TypedBlock & {
   view: {
   view: {
+    // biome-ignore lint/suspicious/noExplicitAny: ignore
     private_metadata?: any;
     private_metadata?: any;
   };
   };
 };
 };

+ 5 - 2
biome.json

@@ -24,8 +24,8 @@
       "!**/package.json",
       "!**/package.json",
       "!apps/app/src/styles/prebuilt/**",
       "!apps/app/src/styles/prebuilt/**",
       "!apps/app/tmp/**",
       "!apps/app/tmp/**",
+      "!apps/pdf-converter/specs/**",
       "!apps/slackbot-proxy/src/public/bootstrap/**",
       "!apps/slackbot-proxy/src/public/bootstrap/**",
-      "!packages/editor/**",
       "!packages/pdf-converter-client/src/index.ts",
       "!packages/pdf-converter-client/src/index.ts",
       "!packages/pdf-converter-client/specs/**",
       "!packages/pdf-converter-client/specs/**",
       "!apps/app/playwright/**",
       "!apps/app/playwright/**",
@@ -101,7 +101,10 @@
   },
   },
   "overrides": [
   "overrides": [
     {
     {
-      "includes": ["apps/pdf-converter/**", "./apps/slackbot-proxy/**"],
+      "includes": [
+        "apps/pdf-converter/**",
+        "./apps/slackbot-proxy/**"
+      ],
       "linter": {
       "linter": {
         "rules": {
         "rules": {
           "style": {
           "style": {

+ 0 - 1
packages/core/src/models/serializers/attachment-serializer.ts

@@ -3,7 +3,6 @@ import { Document } from 'mongoose';
 import type { IAttachment, IUser } from '~/interfaces';
 import type { IAttachment, IUser } from '~/interfaces';
 
 
 import { isPopulated, isRef, type Ref } from '../../interfaces/common';
 import { isPopulated, isRef, type Ref } from '../../interfaces/common';
-
 import {
 import {
   type IUserSerializedSecurely,
   type IUserSerializedSecurely,
   serializeUserSecurely,
   serializeUserSecurely,

+ 6 - 3
packages/core/src/models/vo/error-apiv3.ts

@@ -1,7 +1,7 @@
+// biome-ignore lint/suspicious/noExplicitAny: ignore
 export class ErrorV3<ARGS = any> extends Error {
 export class ErrorV3<ARGS = any> extends Error {
   code: string;
   code: string;
 
 
-  // biome-ignore lint/suspicious/noExplicitAny: ignore
   args?: ARGS;
   args?: ARGS;
 
 
   constructor(
   constructor(
@@ -18,6 +18,9 @@ export class ErrorV3<ARGS = any> extends Error {
   }
   }
 }
 }
 
 
+// biome-ignore lint/suspicious/noExplicitAny: ignore
 export const isErrorV3 = <ARGS = any>(obj: any): obj is ErrorV3<ARGS> => {
 export const isErrorV3 = <ARGS = any>(obj: any): obj is ErrorV3<ARGS> => {
-  return obj != null && typeof obj === 'object' && 'code' in obj && 'message' in obj;
-}
+  return (
+    obj != null && typeof obj === 'object' && 'code' in obj && 'message' in obj
+  );
+};

+ 1 - 1
packages/core/src/utils/page-path-utils/index.ts

@@ -2,10 +2,10 @@ import escapeStringRegexp from 'escape-string-regexp';
 
 
 import { isValidObjectId } from '../objectid-utils';
 import { isValidObjectId } from '../objectid-utils';
 import { addTrailingSlash } from '../path-utils';
 import { addTrailingSlash } from '../path-utils';
-
 import { isTopPage as _isTopPage } from './is-top-page';
 import { isTopPage as _isTopPage } from './is-top-page';
 
 
 export const isTopPage = _isTopPage;
 export const isTopPage = _isTopPage;
+
 export * from './generate-children-regexp';
 export * from './generate-children-regexp';
 
 
 /**
 /**

+ 0 - 1
packages/core/src/utils/page-utils.ts

@@ -1,5 +1,4 @@
 import type { IPage } from '..';
 import type { IPage } from '..';
-
 import { isTopPage } from './page-path-utils/is-top-page';
 import { isTopPage } from './page-path-utils/is-top-page';
 
 
 // const GRANT_PUBLIC = 1;
 // const GRANT_PUBLIC = 1;

+ 0 - 1
packages/core/vite.config.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import glob from 'glob';
 import glob from 'glob';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { defineConfig } from 'vite';
 import { defineConfig } from 'vite';

+ 1 - 1
packages/pluginkit/src/v4/client/utils/growi-facade/growi-react.ts

@@ -1,5 +1,5 @@
-import type { GrowiFacade } from '@growi/core';
 import type React from 'react';
 import type React from 'react';
+import type { GrowiFacade } from '@growi/core';
 
 
 declare global {
 declare global {
   interface Window {
   interface Window {

+ 0 - 1
packages/pluginkit/src/v4/server/utils/common/validate-growi-plugin-directive.spec.ts

@@ -1,7 +1,6 @@
 import { GrowiPluginType } from '@growi/core';
 import { GrowiPluginType } from '@growi/core';
 
 
 import examplePkg from '../../../../../test/fixtures/example-package/template1/package.json';
 import examplePkg from '../../../../../test/fixtures/example-package/template1/package.json';
-
 import { validateGrowiDirective } from './validate-growi-plugin-directive';
 import { validateGrowiDirective } from './validate-growi-plugin-directive';
 
 
 const mocks = vi.hoisted(() => {
 const mocks = vi.hoisted(() => {

+ 0 - 1
packages/pluginkit/src/v4/server/utils/common/validate-growi-plugin-directive.ts

@@ -4,7 +4,6 @@ import {
   type GrowiPluginValidationData,
   type GrowiPluginValidationData,
   GrowiPluginValidationError,
   GrowiPluginValidationError,
 } from '../../../../model';
 } from '../../../../model';
-
 import { importPackageJson } from './import-package-json';
 import { importPackageJson } from './import-package-json';
 
 
 export const validateGrowiDirective = (
 export const validateGrowiDirective = (

+ 0 - 1
packages/pluginkit/src/v4/server/utils/template/scan.ts

@@ -7,7 +7,6 @@ import {
   type TemplateStatus,
   type TemplateStatus,
   type TemplateSummary,
   type TemplateSummary,
 } from '../../../interfaces';
 } from '../../../interfaces';
-
 import { getStatus } from './get-status';
 import { getStatus } from './get-status';
 import { validateTemplatePluginGrowiDirective } from './validate-growi-plugin-directive';
 import { validateTemplatePluginGrowiDirective } from './validate-growi-plugin-directive';
 
 

+ 0 - 1
packages/pluginkit/src/v4/server/utils/template/validate-growi-plugin-directive.spec.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import { GrowiPluginType } from '@growi/core';
 import { GrowiPluginType } from '@growi/core';
 
 
 import { validateTemplatePluginGrowiDirective } from './validate-growi-plugin-directive';
 import { validateTemplatePluginGrowiDirective } from './validate-growi-plugin-directive';

+ 0 - 1
packages/pluginkit/src/v4/server/utils/theme/validate-growi-plugin-directive.spec.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import { isGrowiThemeMetadata } from '@growi/core';
 import { isGrowiThemeMetadata } from '@growi/core';
 
 
 import { validateThemePluginGrowiDirective } from './validate-growi-plugin-directive';
 import { validateThemePluginGrowiDirective } from './validate-growi-plugin-directive';

+ 0 - 1
packages/pluginkit/src/v4/utils/template.spec.ts

@@ -1,5 +1,4 @@
 import type { TemplateSummary } from '../interfaces';
 import type { TemplateSummary } from '../interfaces';
-
 import { extractSupportedLocales, getLocalizedTemplate } from './template';
 import { extractSupportedLocales, getLocalizedTemplate } from './template';
 
 
 describe('getLocalizedTemplate', () => {
 describe('getLocalizedTemplate', () => {

+ 0 - 1
packages/pluginkit/vite.config.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import glob from 'glob';
 import glob from 'glob';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { defineConfig } from 'vite';
 import { defineConfig } from 'vite';

+ 1 - 2
packages/presentation/src/client/components/GrowiSlides.tsx

@@ -1,5 +1,5 @@
-import Head from 'next/head';
 import type { JSX } from 'react';
 import type { JSX } from 'react';
+import Head from 'next/head';
 import ReactMarkdown from 'react-markdown';
 import ReactMarkdown from 'react-markdown';
 
 
 import type { PresentationOptions } from '../consts';
 import type { PresentationOptions } from '../consts';
@@ -9,7 +9,6 @@ import {
   slideMarpit,
   slideMarpit,
 } from '../services/growi-marpit';
 } from '../services/growi-marpit';
 import * as extractSections from '../services/renderer/extract-sections';
 import * as extractSections from '../services/renderer/extract-sections';
-
 import {
 import {
   PresentationRichSlideSection,
   PresentationRichSlideSection,
   RichSlideSection,
   RichSlideSection,

+ 1 - 1
packages/presentation/src/client/components/MarpSlides.tsx

@@ -1,5 +1,5 @@
-import Head from 'next/head';
 import type { JSX } from 'react';
 import type { JSX } from 'react';
+import Head from 'next/head';
 
 
 import { presentationMarpit, slideMarpit } from '../services/growi-marpit';
 import { presentationMarpit, slideMarpit } from '../services/growi-marpit';
 
 

+ 2 - 2
packages/presentation/src/client/components/Presentation.tsx

@@ -1,11 +1,11 @@
 import { type JSX, useEffect } from 'react';
 import { type JSX, useEffect } from 'react';
-
 import Reveal from 'reveal.js';
 import Reveal from 'reveal.js';
 
 
 import type { PresentationOptions } from '../consts';
 import type { PresentationOptions } from '../consts';
-import styles from './Presentation.module.scss';
 import { Slides } from './Slides';
 import { Slides } from './Slides';
 
 
+import styles from './Presentation.module.scss';
+
 const moduleClass = styles['grw-presentation'] ?? '';
 const moduleClass = styles['grw-presentation'] ?? '';
 
 
 const baseRevealOptions: Reveal.Options = {
 const baseRevealOptions: Reveal.Options = {

+ 0 - 1
packages/presentation/src/client/components/Slides.tsx

@@ -1,7 +1,6 @@
 import type { JSX } from 'react';
 import type { JSX } from 'react';
 
 
 import type { PresentationOptions } from '../consts';
 import type { PresentationOptions } from '../consts';
-
 import { GrowiSlides } from './GrowiSlides';
 import { GrowiSlides } from './GrowiSlides';
 import { MarpSlides } from './MarpSlides';
 import { MarpSlides } from './MarpSlides';
 
 

+ 1 - 1
packages/presentation/src/services/use-slides-by-frontmatter.ts

@@ -1,5 +1,5 @@
-import type { Parent, Root } from 'mdast';
 import { useEffect, useState } from 'react';
 import { useEffect, useState } from 'react';
+import type { Parent, Root } from 'mdast';
 import type { Processor } from 'unified';
 import type { Processor } from 'unified';
 
 
 type ParseResult = {
 type ParseResult = {

+ 0 - 1
packages/presentation/vite.config.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import react from '@vitejs/plugin-react';
 import react from '@vitejs/plugin-react';
 import glob from 'glob';
 import glob from 'glob';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { nodeExternals } from 'rollup-plugin-node-externals';

+ 0 - 1
packages/preset-templates/test/index.test.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import {
 import {
   scanAllTemplates,
   scanAllTemplates,
   validateAllTemplateLocales,
   validateAllTemplateLocales,

+ 4 - 2
packages/remark-attachment-refs/src/client/components/AttachmentList.tsx

@@ -1,10 +1,12 @@
+import { type JSX, useCallback } from 'react';
 import type { IAttachmentHasId } from '@growi/core';
 import type { IAttachmentHasId } from '@growi/core';
 import { Attachment, LoadingSpinner } from '@growi/ui/dist/components';
 import { Attachment, LoadingSpinner } from '@growi/ui/dist/components';
-import { type JSX, useCallback } from 'react';
-import styles from './AttachmentList.module.scss';
+
 import { ExtractedAttachments } from './ExtractedAttachments';
 import { ExtractedAttachments } from './ExtractedAttachments';
 import type { RefsContext } from './util/refs-context';
 import type { RefsContext } from './util/refs-context';
 
 
+import styles from './AttachmentList.module.scss';
+
 const AttachmentLink = Attachment;
 const AttachmentLink = Attachment;
 
 
 type Props = {
 type Props = {

+ 2 - 1
packages/remark-attachment-refs/src/client/components/ExtractedAttachments.tsx

@@ -1,6 +1,7 @@
+import React, { type JSX, useCallback } from 'react';
 import type { IAttachmentHasId } from '@growi/core';
 import type { IAttachmentHasId } from '@growi/core';
 import type { Property } from 'csstype';
 import type { Property } from 'csstype';
-import React, { type JSX, useCallback } from 'react';
+
 // import Carousel, { Modal, ModalGateway } from 'react-images';
 // import Carousel, { Modal, ModalGateway } from 'react-images';
 
 
 import type { RefsContext } from './util/refs-context';
 import type { RefsContext } from './util/refs-context';

+ 0 - 1
packages/remark-attachment-refs/src/client/components/Ref.tsx

@@ -1,7 +1,6 @@
 import React, { type JSX, useMemo } from 'react';
 import React, { type JSX, useMemo } from 'react';
 
 
 import { useSWRxRef } from '../stores/refs';
 import { useSWRxRef } from '../stores/refs';
-
 import { AttachmentList } from './AttachmentList';
 import { AttachmentList } from './AttachmentList';
 import { RefsContext } from './util/refs-context';
 import { RefsContext } from './util/refs-context';
 
 

+ 0 - 1
packages/remark-attachment-refs/src/client/components/RefImg.tsx

@@ -1,7 +1,6 @@
 import React, { type JSX, useMemo } from 'react';
 import React, { type JSX, useMemo } from 'react';
 
 
 import { useSWRxRef } from '../stores/refs';
 import { useSWRxRef } from '../stores/refs';
-
 import { AttachmentList } from './AttachmentList';
 import { AttachmentList } from './AttachmentList';
 import { RefsContext } from './util/refs-context';
 import { RefsContext } from './util/refs-context';
 
 

+ 0 - 1
packages/remark-attachment-refs/src/client/components/Refs.tsx

@@ -1,7 +1,6 @@
 import React, { type JSX, useMemo } from 'react';
 import React, { type JSX, useMemo } from 'react';
 
 
 import { useSWRxRefs } from '../stores/refs';
 import { useSWRxRefs } from '../stores/refs';
-
 import { AttachmentList } from './AttachmentList';
 import { AttachmentList } from './AttachmentList';
 import { RefsContext } from './util/refs-context';
 import { RefsContext } from './util/refs-context';
 
 

+ 0 - 1
packages/remark-attachment-refs/src/client/components/RefsImg.tsx

@@ -1,7 +1,6 @@
 import React, { type JSX, useMemo } from 'react';
 import React, { type JSX, useMemo } from 'react';
 
 
 import { useSWRxRefs } from '../stores/refs';
 import { useSWRxRefs } from '../stores/refs';
-
 import { AttachmentList } from './AttachmentList';
 import { AttachmentList } from './AttachmentList';
 import { RefsContext } from './util/refs-context';
 import { RefsContext } from './util/refs-context';
 
 

+ 1 - 1
packages/remark-attachment-refs/src/client/stores/refs.spec.ts

@@ -4,8 +4,8 @@ import type { Server } from 'node:http';
 import { renderHook, waitFor } from '@testing-library/react';
 import { renderHook, waitFor } from '@testing-library/react';
 import axios from 'axios';
 import axios from 'axios';
 import express from 'express';
 import express from 'express';
-import refsMiddleware from '../../server';
 
 
+import refsMiddleware from '../../server';
 import { useSWRxRef, useSWRxRefs } from './refs';
 import { useSWRxRef, useSWRxRefs } from './refs';
 
 
 // Mock the IAttachmentHasId type for testing
 // Mock the IAttachmentHasId type for testing

+ 0 - 1
packages/remark-drawio/src/components/DrawioViewer.tsx

@@ -8,7 +8,6 @@ import {
   useRef,
   useRef,
   useState,
   useState,
 } from 'react';
 } from 'react';
-
 import { debounce } from 'throttle-debounce';
 import { debounce } from 'throttle-debounce';
 
 
 import type { IGraphViewerGlobal } from '..';
 import type { IGraphViewerGlobal } from '..';

+ 0 - 1
packages/remark-growi-directive/test/remark-growi-directive.test.js

@@ -4,7 +4,6 @@
 
 
 import fs from 'node:fs';
 import fs from 'node:fs';
 import path from 'node:path';
 import path from 'node:path';
-
 import { isHidden } from 'is-hidden';
 import { isHidden } from 'is-hidden';
 import { remark } from 'remark';
 import { remark } from 'remark';
 import { readSync } from 'to-vfile';
 import { readSync } from 'to-vfile';

+ 3 - 2
packages/remark-lsx/src/client/components/Lsx.tsx

@@ -1,12 +1,13 @@
-import { LoadingSpinner } from '@growi/ui/dist/components';
 import React, { type JSX, useCallback, useMemo } from 'react';
 import React, { type JSX, useCallback, useMemo } from 'react';
+import { LoadingSpinner } from '@growi/ui/dist/components';
 
 
 import { useSWRxLsx } from '../stores/lsx';
 import { useSWRxLsx } from '../stores/lsx';
 import { generatePageNodeTree } from '../utils/page-node';
 import { generatePageNodeTree } from '../utils/page-node';
-import styles from './Lsx.module.scss';
 import { LsxListView } from './LsxPageList/LsxListView';
 import { LsxListView } from './LsxPageList/LsxListView';
 import { LsxContext } from './lsx-context';
 import { LsxContext } from './lsx-context';
 
 
+import styles from './Lsx.module.scss';
+
 type Props = {
 type Props = {
   children: React.ReactNode;
   children: React.ReactNode;
   className?: string;
   className?: string;

+ 2 - 1
packages/remark-lsx/src/client/components/LsxPageList/LsxListView.tsx

@@ -2,9 +2,10 @@ import React, { type JSX, useMemo } from 'react';
 
 
 import type { PageNode } from '../../../interfaces/page-node';
 import type { PageNode } from '../../../interfaces/page-node';
 import type { LsxContext } from '../lsx-context';
 import type { LsxContext } from '../lsx-context';
-import styles from './LsxListView.module.scss';
 import { LsxPage } from './LsxPage';
 import { LsxPage } from './LsxPage';
 
 
+import styles from './LsxListView.module.scss';
+
 type Props = {
 type Props = {
   nodeTree?: PageNode[];
   nodeTree?: PageNode[];
   lsxContext: LsxContext;
   lsxContext: LsxContext;

+ 2 - 2
packages/remark-lsx/src/client/components/LsxPageList/LsxPage.tsx

@@ -1,7 +1,7 @@
+import React, { type JSX, useMemo } from 'react';
+import Link from 'next/link';
 import { pathUtils } from '@growi/core/dist/utils';
 import { pathUtils } from '@growi/core/dist/utils';
 import { PageListMeta, PagePathLabel } from '@growi/ui/dist/components';
 import { PageListMeta, PagePathLabel } from '@growi/ui/dist/components';
-import Link from 'next/link';
-import React, { type JSX, useMemo } from 'react';
 
 
 import type { PageNode } from '../../../interfaces/page-node';
 import type { PageNode } from '../../../interfaces/page-node';
 import type { LsxContext } from '../lsx-context';
 import type { LsxContext } from '../lsx-context';

+ 1 - 1
packages/remark-lsx/src/client/stores/lsx/lsx.spec.ts

@@ -4,8 +4,8 @@ import type { Server } from 'node:http';
 import { renderHook, waitFor } from '@testing-library/react';
 import { renderHook, waitFor } from '@testing-library/react';
 import axios from 'axios';
 import axios from 'axios';
 import express from 'express';
 import express from 'express';
-import lsxMiddleware from '../../../server';
 
 
+import lsxMiddleware from '../../../server';
 import { useSWRxLsx } from './lsx';
 import { useSWRxLsx } from './lsx';
 
 
 // Mock the generateBaseQuery function
 // Mock the generateBaseQuery function

+ 0 - 1
packages/remark-lsx/src/client/stores/lsx/lsx.ts

@@ -6,7 +6,6 @@ import type {
   LsxApiParams,
   LsxApiParams,
   LsxApiResponseData,
   LsxApiResponseData,
 } from '../../../interfaces/api';
 } from '../../../interfaces/api';
-
 import { type ParseNumOptionResult, parseNumOption } from './parse-num-option';
 import { type ParseNumOptionResult, parseNumOption } from './parse-num-option';
 
 
 const LOADMORE_PAGES_NUM = 10;
 const LOADMORE_PAGES_NUM = 10;

+ 0 - 1
packages/remark-lsx/src/client/utils/page-node.spec.ts

@@ -3,7 +3,6 @@ import { OptionParser } from '@growi/core/dist/remark-plugins';
 import { mock } from 'vitest-mock-extended';
 import { mock } from 'vitest-mock-extended';
 
 
 import type { PageNode } from '../../interfaces/page-node';
 import type { PageNode } from '../../interfaces/page-node';
-
 import { generatePageNodeTree } from './page-node';
 import { generatePageNodeTree } from './page-node';
 
 
 function omitPageData(pageNode: PageNode): Omit<PageNode, 'page'> {
 function omitPageData(pageNode: PageNode): Omit<PageNode, 'page'> {

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

@@ -2,6 +2,7 @@ import { SCOPE } from '@growi/core/dist/interfaces';
 import type { NextFunction, Request, Response } from 'express';
 import type { NextFunction, Request, Response } from 'express';
 import { query, validationResult } from 'express-validator';
 import { query, validationResult } from 'express-validator';
 import { FilterXSS } from 'xss';
 import { FilterXSS } from 'xss';
+
 import type { LsxApiOptions } from '../interfaces/api';
 import type { LsxApiOptions } from '../interfaces/api';
 import { listPages } from './routes/list-pages';
 import { listPages } from './routes/list-pages';
 
 

+ 0 - 1
packages/remark-lsx/src/server/routes/list-pages/add-depth-condition.ts

@@ -2,7 +2,6 @@ import type { ParseRangeResult } from '@growi/core/dist/remark-plugins';
 import createError from 'http-errors';
 import createError from 'http-errors';
 
 
 import { getDepthOfPath } from '../../../utils/depth-utils';
 import { getDepthOfPath } from '../../../utils/depth-utils';
-
 import type { PageQuery } from './generate-base-query';
 import type { PageQuery } from './generate-base-query';
 
 
 export const addDepthCondition = (
 export const addDepthCondition = (

+ 0 - 1
packages/remark-lsx/src/server/routes/list-pages/index.ts

@@ -6,7 +6,6 @@ import type { Request, Response } from 'express';
 import createError, { isHttpError } from 'http-errors';
 import createError, { isHttpError } from 'http-errors';
 
 
 import type { LsxApiParams, LsxApiResponseData } from '../../../interfaces/api';
 import type { LsxApiParams, LsxApiResponseData } from '../../../interfaces/api';
-
 import { addDepthCondition } from './add-depth-condition';
 import { addDepthCondition } from './add-depth-condition';
 import { addNumCondition } from './add-num-condition';
 import { addNumCondition } from './add-num-condition';
 import { addSortCondition } from './add-sort-condition';
 import { addSortCondition } from './add-sort-condition';

+ 0 - 1
packages/slack/src/middlewares/verify-slack-request.ts

@@ -1,5 +1,4 @@
 import { createHmac, timingSafeEqual } from 'node:crypto';
 import { createHmac, timingSafeEqual } from 'node:crypto';
-
 import type { NextFunction, Response } from 'express';
 import type { NextFunction, Response } from 'express';
 import createError from 'http-errors';
 import createError from 'http-errors';
 import { stringify } from 'qs';
 import { stringify } from 'qs';

+ 0 - 1
packages/slack/src/utils/check-communicable.ts

@@ -3,7 +3,6 @@ import axios, { type AxiosError } from 'axios';
 
 
 import { requiredScopes } from '../consts';
 import { requiredScopes } from '../consts';
 import type { ConnectionStatus } from '../interfaces/connection-status';
 import type { ConnectionStatus } from '../interfaces/connection-status';
-
 import { markdownSectionBlock } from './block-kit-builder';
 import { markdownSectionBlock } from './block-kit-builder';
 import { generateWebClient } from './webclient-factory';
 import { generateWebClient } from './webclient-factory';
 
 

+ 0 - 1
packages/slack/src/utils/interaction-payload-accessor.ts

@@ -2,7 +2,6 @@ import assert from 'node:assert';
 
 
 import type { IChannel } from '../interfaces/channel';
 import type { IChannel } from '../interfaces/channel';
 import type { IInteractionPayloadAccessor } from '../interfaces/request-from-slack';
 import type { IInteractionPayloadAccessor } from '../interfaces/request-from-slack';
-
 import loggerFactory from './logger';
 import loggerFactory from './logger';
 
 
 const logger = loggerFactory('@growi/slack:utils:interaction-payload-accessor');
 const logger = loggerFactory('@growi/slack:utils:interaction-payload-accessor');

+ 0 - 1
packages/slack/src/utils/slash-command-parser.test.ts

@@ -1,5 +1,4 @@
 import { InvalidGrowiCommandError } from '../models/errors';
 import { InvalidGrowiCommandError } from '../models/errors';
-
 import { parseSlashCommand } from './slash-command-parser';
 import { parseSlashCommand } from './slash-command-parser';
 
 
 describe('parseSlashCommand', () => {
 describe('parseSlashCommand', () => {

+ 0 - 1
packages/slack/vite.config.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import glob from 'glob';
 import glob from 'glob';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { defineConfig } from 'vite';
 import { defineConfig } from 'vite';

+ 1 - 1
packages/ui/src/components/Attachment.tsx

@@ -1,6 +1,6 @@
+import type { JSX } from 'react';
 import type { IAttachmentHasId } from '@growi/core';
 import type { IAttachmentHasId } from '@growi/core';
 import { format } from 'date-fns/format';
 import { format } from 'date-fns/format';
-import type { JSX } from 'react';
 
 
 import { UserPicture } from './UserPicture';
 import { UserPicture } from './UserPicture';
 
 

+ 1 - 1
packages/ui/src/components/PagePath/PageListMeta.tsx

@@ -1,6 +1,6 @@
+import type { FC, JSX } from 'react';
 import type { IPageHasId } from '@growi/core';
 import type { IPageHasId } from '@growi/core';
 import { pagePathUtils, templateChecker } from '@growi/core/dist/utils';
 import { pagePathUtils, templateChecker } from '@growi/core/dist/utils';
-import type { FC, JSX } from 'react';
 
 
 const { isTopPage } = pagePathUtils;
 const { isTopPage } = pagePathUtils;
 const { checkTemplatePath } = templateChecker;
 const { checkTemplatePath } = templateChecker;

+ 1 - 1
packages/ui/src/components/PagePath/PagePathLabel.tsx

@@ -1,5 +1,5 @@
-import { DevidedPagePath } from '@growi/core/dist/models';
 import type { FC, ReactNode } from 'react';
 import type { FC, ReactNode } from 'react';
+import { DevidedPagePath } from '@growi/core/dist/models';
 
 
 type TextElemProps = {
 type TextElemProps = {
   children?: ReactNode;
   children?: ReactNode;

+ 4 - 4
packages/ui/src/components/UserPicture.tsx

@@ -1,7 +1,3 @@
-import type { IUser, Ref } from '@growi/core';
-import { pagePathUtils } from '@growi/core/dist/utils';
-import dynamic from 'next/dynamic';
-import { useRouter } from 'next/router';
 import {
 import {
   forwardRef,
   forwardRef,
   type JSX,
   type JSX,
@@ -10,6 +6,10 @@ import {
   useCallback,
   useCallback,
   useRef,
   useRef,
 } from 'react';
 } from 'react';
+import dynamic from 'next/dynamic';
+import { useRouter } from 'next/router';
+import type { IUser, Ref } from '@growi/core';
+import { pagePathUtils } from '@growi/core/dist/utils';
 import type { UncontrolledTooltipProps } from 'reactstrap';
 import type { UncontrolledTooltipProps } from 'reactstrap';
 
 
 import styles from './UserPicture.module.scss';
 import styles from './UserPicture.module.scss';

+ 0 - 1
packages/ui/vite.config.ts

@@ -1,5 +1,4 @@
 import path from 'node:path';
 import path from 'node:path';
-
 import react from '@vitejs/plugin-react';
 import react from '@vitejs/plugin-react';
 import glob from 'glob';
 import glob from 'glob';
 import { nodeExternals } from 'rollup-plugin-node-externals';
 import { nodeExternals } from 'rollup-plugin-node-externals';