Browse Source

configure lint command as biome for slack package

Futa Arai 11 months ago
parent
commit
0faeb8ddcf

+ 1 - 0
packages/slack/.eslintignore

@@ -0,0 +1 @@
+*

+ 1 - 1
packages/slack/package.json

@@ -43,7 +43,7 @@
     "clean": "shx rm -rf dist",
     "dev": "vite build --mode dev",
     "watch": "pnpm run dev -w --emptyOutDir=false",
-    "lint:js": "eslint **/*.{js,ts}",
+    "lint:js": "biome check",
     "lint:typecheck": "vue-tsc --noEmit",
     "lint": "npm-run-all -p lint:*",
     "test": "vitest run --coverage"

+ 1 - 1
packages/slack/src/interfaces/response-url.ts

@@ -1,4 +1,4 @@
-import type { KnownBlock, Block } from '@slack/web-api';
+import type { Block, KnownBlock } from '@slack/web-api';
 
 export type RespondBodyForResponseUrl = {
   text?: string;

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

@@ -1,4 +1,4 @@
-import type { Response, NextFunction } from 'express';
+import type { NextFunction, Response } from 'express';
 
 import type { RequestFromSlack } from '../interfaces/request-from-slack';
 import { InteractionPayloadAccessor } from '../utils/interaction-payload-accessor';

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

@@ -1,4 +1,4 @@
-import type { Response, NextFunction } from 'express';
+import type { NextFunction, Response } from 'express';
 import createError from 'http-errors';
 
 import type { RequestFromGrowi } from '../interfaces/request-between-growi-and-proxy';

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

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

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

@@ -1,20 +1,20 @@
 import type {
-  SectionBlock,
-  HeaderBlock,
-  InputBlock,
-  DividerBlock,
+  Action,
   ActionsBlock,
+  ActionsBlockElement,
   Button,
-  Overflow,
-  Datepicker,
-  Select,
-  RadioButtons,
   Checkboxes,
-  Action,
+  Datepicker,
+  DividerBlock,
+  HeaderBlock,
+  InputBlock,
   MultiSelect,
-  PlainTextInput,
   Option,
-  ActionsBlockElement,
+  Overflow,
+  PlainTextInput,
+  RadioButtons,
+  SectionBlock,
+  Select,
 } from '@slack/types';
 
 export function divider(): DividerBlock {