From 4bbb20395e511a517318b748af52b5d044fa6b25 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 19 May 2023 19:43:37 -0400 Subject: [PATCH] Add Prettier to lint command (#20674) * chore: Opt-in cleaned folders and CI for Prettier * Format remaining files * Format remaining file --------- Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu --- .github/workflows/markdown-lint.yml | 1 + .github/workflows/pr-check_markdownlint.yml | 5 + .../en-us/web/api/storage_access_api/index.md | 5 +- .../web/api/storage_access_api/using/index.md | 18 +- .../getstats/index.md | 2 +- .../web/css/@counter-style/symbols/index.md | 4 +- .../css_scroll_snap/basic_concepts/index.md | 2 +- .../attribute/preserveaspectratio/index.md | 215 +++++++++--------- package.json | 4 +- 9 files changed, 132 insertions(+), 124 deletions(-) diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index 3f9704d355475fb..fee9351f939bf2f 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -7,6 +7,7 @@ on: paths: - .markdownlint-cli2.jsonc - .nvmrc + - .prettier* - package.json - yarn.lock - .github/workflows/markdown-lint.yml diff --git a/.github/workflows/pr-check_markdownlint.yml b/.github/workflows/pr-check_markdownlint.yml index ec21082e0b97b32..b1beaae2c76c048 100644 --- a/.github/workflows/pr-check_markdownlint.yml +++ b/.github/workflows/pr-check_markdownlint.yml @@ -45,3 +45,8 @@ jobs: yarn markdownlint-cli2 ${files_to_lint} echo "Linting front-matter" node scripts/front-matter_linter.js ${files_to_lint} + + - name: Prettier markdown files + run: | + files_to_lint="${{ env.DIFF_DOCUMENTS }}" + yarn prettier -c ${files_to_lint} diff --git a/files/en-us/web/api/storage_access_api/index.md b/files/en-us/web/api/storage_access_api/index.md index 05e2ec6ad01586a..678b338c54a370a 100644 --- a/files/en-us/web/api/storage_access_api/index.md +++ b/files/en-us/web/api/storage_access_api/index.md @@ -64,10 +64,11 @@ Several different security measures could cause a {{domxref("Document.requestSto 5. Sandboxed {{htmlelement("iframe")}}s cannot be granted storage access by default for security reasons. The API therefore also adds the `allow-storage-access-by-user-activation` [sandbox token](/en-US/docs/Web/HTML/Element/iframe#sandbox). The embedding website needs to add this to allow storage access requests to be successful, along with `allow-scripts` and `allow-same-origin` to allow it to execute a script to call the API and execute it in an origin that can have cookies: ```html - ``` diff --git a/files/en-us/web/api/storage_access_api/using/index.md b/files/en-us/web/api/storage_access_api/using/index.md index f1161ae55bff796..bf0d21a3262dff8 100644 --- a/files/en-us/web/api/storage_access_api/using/index.md +++ b/files/en-us/web/api/storage_access_api/using/index.md @@ -19,7 +19,8 @@ In the example below, we show how an embedded cross-site {{htmlelement("iframe") First of all, if the `