Browse Source

fix non-autofixable biome errors

Futa Arai 5 months ago
parent
commit
0c77d51172

+ 5 - 1
apps/app/src/services/renderer/rehype-plugins/add-class.ts

@@ -45,5 +45,9 @@ const adder = (entry: AdditionsEntry) => {
 export const rehypePlugin: Plugin<[Additions]> = (additions) => {
   const adders = Object.entries(additions).map(adder);
 
-  return (node) => adders.forEach((a) => a(node as HastNode));
+  return (node) => {
+    adders.forEach((a) => {
+      a(node as HastNode);
+    });
+  };
 };

+ 3 - 3
apps/app/src/services/renderer/rehype-plugins/keyword-highlighter.ts

@@ -93,9 +93,9 @@ export const rehypePlugin: Plugin<[KeywordHighlighterPluginParams]> = (
   return rehypeRewrite.bind(this)({
     rewrite: (node, index, parent) => {
       if (parent != null && index != null && node.type === 'text') {
-        lowercasedKeywords.forEach((keyword) =>
-          highlight(keyword, node, index, parent),
-        );
+        lowercasedKeywords.forEach((keyword) => {
+          highlight(keyword, node, index, parent);
+        });
       }
     },
   });

+ 0 - 1
apps/app/src/stores/attachment.tsx

@@ -1,7 +1,6 @@
 import { useCallback } from 'react';
 import type { IAttachmentHasId, Nullable } from '@growi/core';
 import { type SWRResponseWithUtils, withUtils } from '@growi/core/dist/swr';
-import type { Util } from 'reactstrap';
 import useSWR, { useSWRConfig } from 'swr';
 
 import { apiPost } from '~/client/util/apiv1-client';

+ 3 - 3
apps/app/src/stores/page-listing.tsx

@@ -84,13 +84,13 @@ export const useSWRINFxRecentlyUpdated = (
 };
 
 export const mutateRecentlyUpdated = async (): Promise<undefined> => {
-  [true, false].forEach((includeWipPage) =>
+  [true, false].forEach((includeWipPage) => {
     mutate(
       unstable_serialize((pageIndex, previousPageData) =>
         getRecentlyUpdatedKey(pageIndex, previousPageData, includeWipPage),
       ),
-    ),
-  );
+    );
+  });
   return;
 };
 

+ 1 - 1
apps/app/src/stores/page.tsx

@@ -130,7 +130,7 @@ export const useSWRxCurrentPage = (
         revalidate: false,
       });
     }
-  }, [initialData, key, shouldMutate]);
+  }, [initialData, shouldMutate]);
 
   return useSWR(key, null, {
     keepPreviousData: true,