Bläddra i källkod

format with biome

Yuki Takei 6 månader sedan
förälder
incheckning
4a6e0d484b

+ 10 - 14
apps/app/src/features/growi-plugin/client/Admin/stores/admin-plugins.tsx

@@ -6,20 +6,16 @@ import { apiv3Get } from '~/client/util/apiv3-client';
 import type { IGrowiPluginHasId } from '../../../interfaces';
 
 type Plugins = {
-  plugins: IGrowiPluginHasId[]
-}
+  plugins: IGrowiPluginHasId[];
+};
 
 export const useSWRxAdminPlugins = (): SWRResponse<Plugins, Error> => {
-  return useSWR(
-    '/plugins',
-    async(endpoint) => {
-      try {
-        const res = await apiv3Get<Plugins>(endpoint);
-        return res.data;
-      }
-      catch (err) {
-        throw new Error(err);
-      }
-    },
-  );
+  return useSWR('/plugins', async (endpoint) => {
+    try {
+      const res = await apiv3Get<Plugins>(endpoint);
+      return res.data;
+    } catch (err) {
+      throw new Error(err);
+    }
+  });
 };

+ 2 - 3
apps/app/src/features/growi-plugin/server/services/growi-plugin/growi-plugin.integ.ts

@@ -1,9 +1,8 @@
-import fs from 'fs';
-import path from 'path';
+import fs from 'node:fs';
+import path from 'node:path';
 
 import { PLUGIN_STORING_PATH } from '../../consts';
 import { GrowiPlugin } from '../../models';
-
 import { growiPluginService } from './growi-plugin';
 
 describe('Installing a GROWI template plugin', () => {

+ 0 - 1
apps/app/src/features/growi-plugin/server/services/growi-plugin/growi-plugin.ts

@@ -23,7 +23,6 @@ import type {
 import { PLUGIN_EXPRESS_STATIC_DIR, PLUGIN_STORING_PATH } from '../../consts';
 import { GrowiPlugin } from '../../models';
 import { GitHubUrl } from '../../models/vo/github-url';
-
 import { generateTemplatePluginMeta } from './generate-template-plugin-meta';
 import { generateThemePluginMeta } from './generate-theme-plugin-meta';
 

+ 1 - 0
apps/app/src/features/page-bulk-export/server/service/page-bulk-export-job-clean-up-cron.ts

@@ -1,4 +1,5 @@
 import type { HydratedDocument } from 'mongoose';
+
 import { SupportedAction } from '~/interfaces/activity';
 import type Crowi from '~/server/crowi';
 import { configManager } from '~/server/service/config-manager';

+ 0 - 1
apps/app/src/features/rate-limiter/middleware/consume-points.ts

@@ -1,7 +1,6 @@
 import type { RateLimiterRes } from 'rate-limiter-flexible';
 
 import { DEFAULT_MAX_REQUESTS, type IApiRateLimitConfig } from '../config';
-
 import { rateLimiterFactory } from './rate-limiter-factory';
 
 export const consumePoints = async (

+ 0 - 1
apps/app/src/features/rate-limiter/middleware/factory.ts

@@ -10,7 +10,6 @@ import {
   type IApiRateLimitConfig,
 } from '../config';
 import { generateApiRateLimitConfig } from '../utils/config-generator';
-
 import { consumePoints } from './consume-points';
 
 const logger = loggerFactory('growi:middleware:api-rate-limit');

+ 2 - 3
apps/app/src/features/search/client/components/SearchModal.tsx

@@ -19,10 +19,9 @@ import { SearchHelp } from './SearchHelp';
 import { SearchMethodMenuItem } from './SearchMethodMenuItem';
 import { SearchResultMenuItem } from './SearchResultMenuItem';
 
-
 type Props = {
   onSearch: (keyword: string) => void;
-}
+};
 
 const SearchModalSubstance = (props: Props): JSX.Element => {
   const { onSearch } = props;
@@ -166,7 +165,7 @@ const SearchModal = (): JSX.Element => {
 
   const setSearchKeyword = useSetSearchKeyword();
 
-    const searchHandler = useCallback(
+  const searchHandler = useCallback(
     (keyword: string) => {
       // invoke override function if exists
       if (onSearchOverride != null) {

+ 4 - 1
apps/app/src/features/search/client/components/SearchPage/SearchControl.tsx

@@ -123,7 +123,10 @@ const SearchControl = React.memo((props: Props): JSX.Element => {
     <div className="shadow-sm">
       <div className="grw-search-page-nav d-flex py-3 align-items-center">
         <div className="flex-grow-1 mx-4">
-          <SearchModalTriggerinput keywordOnInit={keyword} onSearchInvoked={searchBySearchControlHandler} />
+          <SearchModalTriggerinput
+            keywordOnInit={keyword}
+            onSearchInvoked={searchBySearchControlHandler}
+          />
         </div>
       </div>
       {/* TODO: replace the following elements deleteAll button , relevance button and include specificPath button component */}

+ 1 - 4
apps/app/src/features/search/client/components/SearchPage/SearchPage.tsx

@@ -10,10 +10,7 @@ import type {
   ISelectableAndIndeterminatable,
 } from '~/client/interfaces/selectable-all';
 import type { IFormattedSearchResult } from '~/interfaces/search';
-import {
-  useSearchKeyword,
-  useSetSearchKeyword,
-} from '~/states/search';
+import { useSearchKeyword, useSetSearchKeyword } from '~/states/search';
 import { showPageLimitationLAtom } from '~/states/server-configurations';
 import {
   type ISearchConditions,