Skip to content

Commit

Permalink
Merge branch 'main' into zh-cn/prettier/web/css/2
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored Jul 29, 2023
2 parents cd546ad + a4e5c12 commit a522e01
Show file tree
Hide file tree
Showing 2,360 changed files with 30,771 additions and 23,952 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: reviewdog

on:
- pull_request

jobs:
prettier:
# do not run on forks
if: github.repository == 'mdn/translated-content'
name: prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get changed files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
# Use the GitHub API to get the list of changed files
# documenation: https://docs.github.com/rest/commits/commits#compare-two-commits
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} --jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename' | xargs)
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Install all yarn packages
run: yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Perform linting
run: yarn prettier --ignore-unknown --write ${{ env.DIFF_DOCUMENTS }}

- name: Submit suggestion
uses: reviewdog/action-suggester@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tool_name: prettier
13 changes: 4 additions & 9 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ build/
/files/fr/web/css/justify-content/index.md
/files/fr/web/css/place-items/index.md
/files/fr/web/css/place-self/index.md
/files/fr/web/javascript/reference/global_objects/array/includes/index.md
/files/fr/web/javascript/reference/global_objects/intl/displaynames/of/index.md
/files/pt-br/learn/server-side/django/forms/index.md
/files/ru/learn/server-side/django/forms/index.md
/files/ru/learn/server-side/django/introduction/index.md
/files/ru/learn/html/introduction_to_html/the_head_metadata_in_html/index.md
/files/zh-cn/learn/css/howto/css_faq/index.md
/files/zh-cn/learn/server-side/django/forms/index.md
/files/zh-cn/web/javascript/reference/operators/exponentiation/index.md
/files/zh-cn/web/javascript/reference/operators/exponentiation_assignment/index.md

# A full pass on all Markdown files is being performed.
# The following folders still need a full pass:
Expand All @@ -38,11 +41,7 @@ build/
/files/es/web/css/**/*.md
/files/es/web/javascript/reference/**/*.md

# fr
/files/fr/web/javascript/**/*.md

# ja
/files/ja/learn/javascript/**/*.md
/files/ja/mozilla/**/*.md
/files/ja/mdn/**/*.md
/files/ja/mozilla/add-ons/**/*.md
Expand Down Expand Up @@ -93,7 +92,3 @@ build/
# zh-cn
/files/zh-cn/web/api/**/*.md
/files/zh-cn/web/css/**/*.md
/files/zh-cn/web/html/**/*.md
/files/zh-cn/web/http/**/*.md
/files/zh-cn/web/javascript/reference/**/*.md
/files/zh-cn/web/svg/**/*.md
305 changes: 179 additions & 126 deletions files/fr/web/css/shorthand_properties/index.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 55 additions & 59 deletions files/fr/web/http/content_negotiation/index.md

Large diffs are not rendered by default.

Loading

0 comments on commit a522e01

Please sign in to comment.