From 2d5d1c9ebb06101aacaf0495f26d9cdb88b614c3 Mon Sep 17 00:00:00 2001 From: Septs Date: Sun, 6 Feb 2022 01:04:54 +0800 Subject: [PATCH 1/2] feat: add markdownlint --- .github/workflows/linters.yml | 28 +++++++++++++------- .markdownlint.json | 5 ++++ .markdownlintignore | 1 + .vscode/settings.json | 3 --- README.md | 4 ++- packages/backup-format/README.md | 2 +- packages/empty/README.md | 4 ++- packages/encryption/README.md | 2 +- packages/encryption/src/encryption/README.md | 6 ++--- packages/mask/utils-pure/README.md | 2 ++ 10 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 .markdownlint.json create mode 100644 .markdownlintignore diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index a88c8e0e42d9..5e9976a2b319 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -21,7 +21,15 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-node@v2 - - run: npx prettier@2.5.0 --list-different . + - run: npx prettier@2.5.0 --check . + markdownlint: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-node@v2 + - run: npx markdownlint-cli . anti-trojan-source: runs-on: ubuntu-20.04 steps: @@ -38,11 +46,11 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - uses: pnpm/action-setup@v2 with: - version: '6.23.1' + version: "6.23.1" - uses: actions/setup-node@v2 with: - node-version: '16' - cache: 'pnpm' + node-version: "16" + cache: "pnpm" - run: pnpm install - run: npx gulp locale-kit type-check-and-jest: @@ -57,11 +65,11 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - uses: pnpm/action-setup@v2 with: - version: '6.23.1' + version: "6.23.1" - uses: actions/setup-node@v2 with: - node-version: '16' - cache: 'pnpm' + node-version: "16" + cache: "pnpm" - run: pnpm install - run: npx gulp codegen - run: npx gulp polyfill @@ -74,11 +82,11 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - uses: pnpm/action-setup@v2 with: - version: '6.23.1' + version: "6.23.1" - uses: actions/setup-node@v2 with: - node-version: '16' - cache: 'pnpm' + node-version: "16" + cache: "pnpm" - run: pnpm install - run: pnpm run lint:ci - name: Upload eslint report diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 000000000000..117c74e6dba1 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,5 @@ +{ + "line-length": false, + "no-inline-html": false, + "no-duplicate-heading": false +} diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 000000000000..3c3629e647f5 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +node_modules diff --git a/.vscode/settings.json b/.vscode/settings.json index 7b6341bf42aa..cad096e7b384 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,9 +25,6 @@ } ], "cSpell.words": ["Reificated"], - "markdownlint.config": { - "no-inline-html": false - }, "files.associations": { "**/.env/*": "ini" }, diff --git a/README.md b/README.md index bb8950146c3b..eb109510cc10 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ + - ([I:b]) + # Mask Network diff --git a/packages/backup-format/README.md b/packages/backup-format/README.md index e6124057f085..cdae998a068b 100644 --- a/packages/backup-format/README.md +++ b/packages/backup-format/README.md @@ -4,7 +4,7 @@ Binary format: -``` +```plain Magic header (MASK-BACKUP-V001): 16 bytes Data: Arbitrary length Checksum (SHA-256): 32 bytes diff --git a/packages/empty/README.md b/packages/empty/README.md index 0c9126785f4a..8a994540a79f 100644 --- a/packages/empty/README.md +++ b/packages/empty/README.md @@ -1,5 +1,7 @@ +# empty project + This empty project is used to: -- Ban some globally available packages (react, @mui) in shared-base package. +- Ban some globally available packages (`react`, `@mui`) in shared-base package. - As the template of a new monorepo package - An example of empty project (you can copy-paste the whole folder!) diff --git a/packages/encryption/README.md b/packages/encryption/README.md index ec4864a1bca0..c3d4cd82feb6 100644 --- a/packages/encryption/README.md +++ b/packages/encryption/README.md @@ -6,7 +6,7 @@ This package is designed with OCap and prepared to run under SES. ## Decryption process -``` +```plain raw message (text or image) |> Social Network decoding (socialNetworkID) |> Standard Decryption diff --git a/packages/encryption/src/encryption/README.md b/packages/encryption/src/encryption/README.md index aa4674604d16..7d5820456660 100644 --- a/packages/encryption/src/encryption/README.md +++ b/packages/encryption/src/encryption/README.md @@ -1,6 +1,6 @@ -## Term: +# Term -### Local key: +## Local key An AES key that never exported. @@ -8,7 +8,7 @@ It is connected to the Persona or the Profile. It is used to encrypt some message to themselves to allow them to decrypt the message later. -## Steps: +## Steps 1. Convert TypedMessage to string (v38) or Uint8Array (v37). 2. Encrypt the message. diff --git a/packages/mask/utils-pure/README.md b/packages/mask/utils-pure/README.md index c5bd81fde993..2fce3bfda973 100644 --- a/packages/mask/utils-pure/README.md +++ b/packages/mask/utils-pure/README.md @@ -1 +1,3 @@ +# Pure Utils + Do not put anything DOM-related here. From 06a901d3f2ffd205c36ca7206d5563728eca6b52 Mon Sep 17 00:00:00 2001 From: Septs Date: Sun, 6 Feb 2022 01:11:39 +0800 Subject: [PATCH 2/2] fix: spellcheck --- cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/cspell.json b/cspell.json index 97dd15ebfc13..167a544b3a2c 100644 --- a/cspell.json +++ b/cspell.json @@ -134,6 +134,7 @@ "macbinary", "majeure", "Marino", + "markdownlint", "Maskbook", "maskbookjsonrpc", "maskface",