Browse Source

fix lint error

Shun Miyazawa 6 months ago
parent
commit
5bcd022c41

+ 3 - 3
apps/app/src/features/external-user-group/client/components/ExternalUserGroup/ExternalUserGroupManagement.tsx

@@ -38,8 +38,8 @@ export const ExternalGroupManagement: FC = () => {
   const userGroupsForDeleteModal: IGrantedGroup[] =
     userGroupList != null
       ? userGroupList.map((group) => {
-          return { item: group, type: GroupType.userGroup };
-        })
+        return { item: group, type: GroupType.userGroup };
+      })
       : [];
   const externalUserGroupIds = externalUserGroups.map((group) => group._id);
 
@@ -153,7 +153,7 @@ export const ExternalGroupManagement: FC = () => {
         hideDeleteModal();
 
         toastSuccess(`Deleted ${selectedExternalUserGroup?.name} group.`);
-      } catch (err) {
+      } catch {
         toastError(new Error('Unable to delete the groups'));
       }
     },

+ 1 - 0
apps/app/src/features/external-user-group/server/models/external-user-group-relation.ts

@@ -15,6 +15,7 @@ export interface ExternalUserGroupRelationDocument
 
 export interface ExternalUserGroupRelationModel
   extends Model<ExternalUserGroupRelationDocument> {
+  // biome-ignore lint/suspicious/noExplicitAny: ignore
   [x: string]: any; // for old methods
 
   PAGE_ITEMS: 50;

+ 1 - 0
apps/app/src/features/external-user-group/server/models/external-user-group.ts

@@ -12,6 +12,7 @@ export interface ExternalUserGroupDocument
 
 export interface ExternalUserGroupModel
   extends Model<ExternalUserGroupDocument> {
+  // biome-ignore lint/suspicious/noExplicitAny: ignore
   [x: string]: any; // for old methods
 
   PAGE_ITEMS: 10;

+ 1 - 1
packages/presentation/src/client/services/renderer/extract-sections.ts

@@ -61,7 +61,7 @@ export const remarkPlugin: Plugin<[ExtractSectionsPluginParams]> = (
 
   return (tree) => {
     // wrap with <section>
-    visit(tree, startCondition, (node, index, parent: Parent) => {
+    visit(tree, startCondition, (node, _index, parent: Parent) => {
       if (parent == null || parent.type !== 'root' || node.type === 'yaml') {
         return;
       }

+ 3 - 3
packages/remark-drawio/src/components/DrawioViewer.tsx

@@ -103,8 +103,8 @@ export const DrawioViewer = memo((props: DrawioViewerProps): JSX.Element => {
 
     const code = Array.isArray(children)
       ? children
-          .filter((elem) => typeof elem === 'string') // omit non-string elements (e.g. br element generated by line-breaks option)
-          .join('')
+        .filter((elem) => typeof elem === 'string') // omit non-string elements (e.g. br element generated by line-breaks option)
+        .join('')
       : children.toString();
 
     let mxgraphData: string | undefined;
@@ -162,7 +162,7 @@ export const DrawioViewer = memo((props: DrawioViewerProps): JSX.Element => {
     }
 
     const observer = new ResizeObserver((entries) => {
-      for (const entry of entries) {
+      for (const _entry of entries) {
         // setElementWidth(entry.contentRect.width);
         onRenderingStart?.();
         renderDrawioWithDebounce();

+ 0 - 8
packages/remark-growi-directive/src/mdast-util-growi-directive/lib/index.js

@@ -22,8 +22,6 @@ import { stringifyEntitiesLight } from 'stringify-entities';
 
 const own = {}.hasOwnProperty;
 
-const shortcut = /^[^\t\n\r "#'.<=>`}]+$/;
-
 export const DirectiveType = Object.freeze({
   Text: 'textGrowiPluginDirective',
   Leaf: 'leafGrowiPluginDirective',
@@ -223,12 +221,6 @@ function attributes(node, state) {
   const attrs = node.attributes || {};
   /** @type {Array.<string>} */
   const values = [];
-  /** @type {string|undefined} */
-  let classesFull;
-  /** @type {string|undefined} */
-  let classes;
-  /** @type {string|undefined} */
-  let id;
   /** @type {string} */
   let key;
 

+ 0 - 2
packages/remark-growi-directive/src/micromark-extension-growi-directive/lib/factory-attributes.js

@@ -50,8 +50,6 @@ export function factoryAttributes(
   attributeValueData,
   disallowEol,
 ) {
-  /** @type {string} */
-  let type;
   /** @type {Code|undefined} */
   let marker;
 

+ 1 - 1
packages/slack/src/middlewares/parse-slack-interaction-request.ts

@@ -5,7 +5,7 @@ import { InteractionPayloadAccessor } from '../utils/interaction-payload-accesso
 
 export const parseSlackInteractionRequest = (
   req: RequestFromSlack,
-  res: Response,
+  _res: Response,
   next: NextFunction,
 ): void => {
   // There is no payload in the request from slack

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

@@ -14,7 +14,7 @@ const logger = loggerFactory(
  */
 export const verifyGrowiToSlackRequest = (
   req: RequestFromGrowi,
-  res: Response,
+  _res: Response,
   next: NextFunction,
 ): void => {
   const str = req.headers['x-growi-gtop-tokens'];

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

@@ -16,7 +16,7 @@ const logger = loggerFactory('@growi/slack:middlewares:verify-slack-request');
 export const verifySlackRequest = (
   // biome-ignore lint/suspicious/noExplicitAny: ignore
   req: RequestFromSlack & { rawBody: any },
-  res: Response,
+  _res: Response,
   next: NextFunction,
 ): void => {
   const signingSecret = req.slackSigningSecret;

+ 0 - 1
packages/slack/src/utils/block-kit-builder.ts

@@ -1,5 +1,4 @@
 import type {
-  Action,
   ActionsBlock,
   ActionsBlockElement,
   Button,

+ 1 - 1
packages/slack/src/utils/response-url-validator.ts

@@ -36,7 +36,7 @@ export function isValidResponseUrl(
     }
 
     return false;
-  } catch (error) {
+  } catch {
     // Invalid URL format
     return false;
   }