From e321b09d8b2b49c9ae1788f587e483e5a5eb781a Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Fri, 14 Mar 2025 10:27:16 +0000 Subject: [PATCH] docs: fix comments in mdx files (#3141) MDX uses `{/* ... */}` for comments --- .github/vale/styles/.gitignore | 5 ++++- .../vocabularies}/Docs/accept.txt | 0 .../vocabularies}/Docs/reject.txt | 0 .github/workflows/docs.yml | 2 +- .vale.ini | 16 +++++++++++++++- docs/contributor-manual/development-workflows.md | 2 +- docs/contributor-manual/releases.md | 2 +- docs/releases/3.0.0-alpha.11.mdx | 4 ++-- docs/releases/3.0.0-alpha.13.mdx | 4 ++-- docs/releases/3.0.0-beta.0.mdx | 4 ++-- docs/releases/unreleased.mdx | 2 +- 11 files changed, 29 insertions(+), 12 deletions(-) rename .github/vale/styles/{Vocab => config/vocabularies}/Docs/accept.txt (100%) rename .github/vale/styles/{Vocab => config/vocabularies}/Docs/reject.txt (100%) diff --git a/.github/vale/styles/.gitignore b/.github/vale/styles/.gitignore index 6d8c9b57f..e5f3ca82f 100644 --- a/.github/vale/styles/.gitignore +++ b/.github/vale/styles/.gitignore @@ -1,4 +1,7 @@ * !Makefile !LibreTime -!Vocab +!config/ +!config/* +!config/vocabularies/* +!config/vocabularies/Docs/* diff --git a/.github/vale/styles/Vocab/Docs/accept.txt b/.github/vale/styles/config/vocabularies/Docs/accept.txt similarity index 100% rename from .github/vale/styles/Vocab/Docs/accept.txt rename to .github/vale/styles/config/vocabularies/Docs/accept.txt diff --git a/.github/vale/styles/Vocab/Docs/reject.txt b/.github/vale/styles/config/vocabularies/Docs/reject.txt similarity index 100% rename from .github/vale/styles/Vocab/Docs/reject.txt rename to .github/vale/styles/config/vocabularies/Docs/reject.txt diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0b5ebf273..ed03e588c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -43,7 +43,7 @@ jobs: errata-ai/vale \ vale_{version}_Linux_64-bit.tar.gz --extract vale \ /usr/local/bin/vale \ - --version v2.21.3 \ + --version v3.9.6 \ --version-file '{destination}.version' - name: Add annotations matchers diff --git a/.vale.ini b/.vale.ini index d74b872b5..a8d3de823 100644 --- a/.vale.ini +++ b/.vale.ini @@ -6,12 +6,26 @@ Packages = \ Vocab = Docs -[*.md] +# Ignore MDX components +IgnoredScopes = code, tt, img, url, a +SkippedScopes = script, style, pre, figure, code + +[formats] +# This is a workaround until https://github.com/errata-ai/vale/issues/841 is fixed +mdx = md + +[*.{md,mdx}] BasedOnStyles = Vale, Microsoft, LibreTime # Exclude emoji shortcodes `:tada:` BlockIgnores = (:[a-z-_]+:) +# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs, and angle brackets +TokenIgnores = (<\/?[A-Z].+>), (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) + Microsoft.GeneralURL = False Microsoft.RangeFormat = False Vale.Spelling = False + +[*.mdx] +CommentDelimiters = {/*, */} diff --git a/docs/contributor-manual/development-workflows.md b/docs/contributor-manual/development-workflows.md index cfa13172e..4ecd4ba20 100644 --- a/docs/contributor-manual/development-workflows.md +++ b/docs/contributor-manual/development-workflows.md @@ -13,7 +13,7 @@ LibreTime uses [Github pull requests to manage changes](https://docs.github.com/ - Lint and test the codebase, for example using the `make lint` or `make test` commands inside the app folder you want to check. - Push your branch. - Create a pull request in Github. -- We'll review your request and provide feed back. +- Your request will be reviewed and feedback provided. ## Project layout diff --git a/docs/contributor-manual/releases.md b/docs/contributor-manual/releases.md index e1969406d..b2c309981 100644 --- a/docs/contributor-manual/releases.md +++ b/docs/contributor-manual/releases.md @@ -48,7 +48,7 @@ git commit -m "docs: add release note" ### 4. Merge the release pull request -Push any changes that we previously made to the release branch: +Push any changes that were previously made to the release branch: ```bash git push diff --git a/docs/releases/3.0.0-alpha.11.mdx b/docs/releases/3.0.0-alpha.11.mdx index 70bd72179..a70f59ba3 100644 --- a/docs/releases/3.0.0-alpha.11.mdx +++ b/docs/releases/3.0.0-alpha.11.mdx @@ -13,7 +13,7 @@ The LibreTime project wants to thank the following contributors for authoring PR - @jooola - @paddatrapper - +{/* vale off */} ## :rocket: Features @@ -118,7 +118,7 @@ The LibreTime project wants to thank the following contributors for authoring PR - **installer:** remove /var/tmp/airtime reference - **worker:** drop logfile reference until environment variable expansion works correctly - +{/* vale on */} ## :arrow_up: Upgrading diff --git a/docs/releases/3.0.0-alpha.13.mdx b/docs/releases/3.0.0-alpha.13.mdx index 7e16a8bf3..920743136 100644 --- a/docs/releases/3.0.0-alpha.13.mdx +++ b/docs/releases/3.0.0-alpha.13.mdx @@ -16,7 +16,7 @@ The LibreTime project wants to thank the following contributors for authoring PR - Maxime Leroy - Mykola - +{/* vale off */} ## :rocket: Features @@ -102,7 +102,7 @@ The LibreTime project wants to thank the following contributors for authoring PR - use track_type_id in smartblock criteria - **legacy:** no invalid track type in smartblock criteria - +{/* vale on */} ## :fire: Deprecation and removal diff --git a/docs/releases/3.0.0-beta.0.mdx b/docs/releases/3.0.0-beta.0.mdx index 66e3fac09..6516e237e 100644 --- a/docs/releases/3.0.0-beta.0.mdx +++ b/docs/releases/3.0.0-beta.0.mdx @@ -14,7 +14,7 @@ The LibreTime project wants to thank the following contributors for authoring PR - @paddatrapper - Milo Ivir - +{/* vale off */} ## :rocket: Features @@ -103,7 +103,7 @@ The LibreTime project wants to thank the following contributors for authoring PR - nginx depends on legacy in docker-compose ([#2147](https://github.com/libretime/libretime/issues/2147)) - **playout:** remove shutdown_handler - +{/* vale on */} ## :fire: Deprecation and removal diff --git a/docs/releases/unreleased.mdx b/docs/releases/unreleased.mdx index b06a8c0da..53cfa6c4e 100644 --- a/docs/releases/unreleased.mdx +++ b/docs/releases/unreleased.mdx @@ -4,7 +4,7 @@ title: Unreleased import ReleaseHead from "./_release-head.mdx"; - +{/* */} ## :sparkling_heart: Contributors