From b953dcb75376c182be8ad18098648da21e08cf13 Mon Sep 17 00:00:00 2001 From: himself65 Date: Tue, 8 Jun 2021 16:38:24 +0800 Subject: [PATCH 1/2] fix: disable reactDocgen Related: ecbaa2f19b01487eee4611beb5d2d69c1d27236e --- packages/theme/.storybook/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/theme/.storybook/main.js b/packages/theme/.storybook/main.js index abb8031cca93..508b97fd94cf 100644 --- a/packages/theme/.storybook/main.js +++ b/packages/theme/.storybook/main.js @@ -4,4 +4,12 @@ module.exports = { reactOptions: { fastRefresh: true, }, + typescript: { + // todo, fixme: + // temporary workaround is disable doc gen + // related to PR: + // https://github.com/DimensionDev/Maskbook/issues/3253 + // https://github.com/styleguidist/react-docgen-typescript/issues/356 + reactDocgen: 'none', + }, } From 363a17cf6e38d798eaeebcd213aba75aa2874790 Mon Sep 17 00:00:00 2001 From: himself65 Date: Tue, 8 Jun 2021 16:58:36 +0800 Subject: [PATCH 2/2] fix: linting warning --- package.json | 2 +- .../JSON/DBRecord-JSON/PostRecord.ts | 17 ++++++++--------- pnpm-lock.yaml | 17 ++++++++++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 4603b29e719f..23622cb07f52 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "npm-run-all": "^4.1.5", "only-allow": "^1.0.0", "patch-package": "./patches/patch-package-6.4.7.tgz", - "prettier": "^2.3.0", + "prettier": "^2.3.1", "ts-node": "^10.0.0", "ttypescript": "^1.5.12", "typescript": "4.3.2" diff --git a/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts b/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts index 2d9f2376bd02..08c2a340bd80 100644 --- a/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts +++ b/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts @@ -12,15 +12,14 @@ export function PostRecordToJSONFormat(post: PostRecord): BackupJSONFileLatest[' identifier: post.identifier.toText(), postBy: post.postBy.toText(), recipientGroups: post.recipientGroups.map((x) => x.toText()), - recipients: Array.from(post.recipients).map(([identifier, detail]): [ - string, - { reason: RecipientReasonJSON[] }, - ] => [ - identifier.toText(), - { - reason: Array.from(detail.reason).map(RecipientReasonToJSON), - }, - ]), + recipients: Array.from(post.recipients).map( + ([identifier, detail]): [string, { reason: RecipientReasonJSON[] }] => [ + identifier.toText(), + { + reason: Array.from(detail.reason).map(RecipientReasonToJSON), + }, + ], + ), } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9c577f78697..d29e9f0cc6c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,7 +40,7 @@ importers: npm-run-all: ^4.1.5 only-allow: ^1.0.0 patch-package: ./patches/patch-package-6.4.7.tgz - prettier: ^2.3.0 + prettier: ^2.3.1 react: '=0.0.0-experimental-d75105fa9' react-dom: '=0.0.0-experimental-d75105fa9' react-i18next: ^11.9.0 @@ -75,7 +75,7 @@ importers: eslint-config-prettier: 8.3.0_eslint@7.27.0 eslint-plugin-import: 2.23.3_eslint@7.27.0 eslint-plugin-lodash: 7.2.0_eslint@7.27.0 - eslint-plugin-prettier: 3.4.0_beb8ddd1fba5378f74976112c7860a07 + eslint-plugin-prettier: 3.4.0_beb7720e9139e3178536fb97e1a17bf3 eslint-plugin-react-hooks: 4.2.0_eslint@7.27.0 eslint-plugin-unused-imports: 1.1.1 esm: 3.2.25 @@ -84,7 +84,7 @@ importers: npm-run-all: 4.1.5 only-allow: 1.0.0 patch-package: file:patches/patch-package-6.4.7.tgz - prettier: 2.3.0 + prettier: 2.3.1 ts-node: 10.0.0_typescript@4.3.2 ttypescript: 1.5.12_ts-node@10.0.0+typescript@4.3.2 typescript: 4.3.2 @@ -11706,7 +11706,7 @@ packages: lodash: 4.17.21 dev: true - /eslint-plugin-prettier/3.4.0_beb8ddd1fba5378f74976112c7860a07: + /eslint-plugin-prettier/3.4.0_beb7720e9139e3178536fb97e1a17bf3: resolution: {integrity: sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==} engines: {node: '>=6.0.0'} peerDependencies: @@ -11719,7 +11719,7 @@ packages: dependencies: eslint: 7.27.0 eslint-config-prettier: 8.3.0_eslint@7.27.0 - prettier: 2.3.0 + prettier: 2.3.1 prettier-linter-helpers: 1.0.0 dev: true @@ -18624,6 +18624,13 @@ packages: resolution: {integrity: sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==} engines: {node: '>=10.13.0'} hasBin: true + dev: false + + /prettier/2.3.1: + resolution: {integrity: sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true /pretty-error/2.1.2: resolution: {integrity: sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==}