Skip to content

Commit

Permalink
Merge branch 'main' into extend-the-developer-tools-updatee
Browse files Browse the repository at this point in the history
  • Loading branch information
rebloor authored Sep 2, 2024
2 parents a5b9bc3 + b25d877 commit 77f4c99
Show file tree
Hide file tree
Showing 2,210 changed files with 26,030 additions and 7,125 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Content:Other:
- files/en-us/web/exslt/**
- files/en-us/web/opensearch/**
- files/en-us/web/privacy/**
- files/en-us/web/text_fragments/**
- files/en-us/web/uri/**
- files/en-us/web/xml/**
- files/en-us/web/xpath/**
- files/en-us/web/xslt/**
8 changes: 4 additions & 4 deletions .github/workflows/pr-check-lint_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
EOF="$(openssl rand -hex 8)"
files_to_lint="${{ env.DIFF_DOCUMENTS }}"
files_to_lint="$DIFF_DOCUMENTS"
echo "Running markdownlint --fix"
MD_LINT_FAILED=false
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "${{ env.MD_LINT_LOG }}" | \
echo "${MD_LINT_LOG}" | \
reviewdog \
-efm="%f:%l:%c %m" \
-efm="%f:%l %m" \
Expand All @@ -150,8 +150,8 @@ jobs:
if: env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true' || env.FM_LINT_FAILED == 'true'
run: |
echo -e "\nLogs from markdownlint:"
echo "${{ env.MD_LINT_LOG }}"
echo "${MD_LINT_LOG}"
echo -e "\nLogs from front-matter linter:"
echo "${{ env.FM_LINT_LOG }}"
echo "${FM_LINT_LOG}"
echo -e "\nPlease fix all the linting issues mentioned in above logs and in the review comments."
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Install Python poetry
if: ${{ env.HAS_ARTIFACT }}
uses: snok/install-poetry@v1.3
uses: snok/install-poetry@v1.4
with:
virtualenvs-create: true
virtualenvs-in-project: true
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/spelling-check-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Create an issue to report typos

on:
schedule:
- cron: "0 0 * * mon"
workflow_dispatch:

jobs:
sync:
if: github.repository == 'mdn/content'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Run scripts
run: |
npm install
echo Running spelling check...
output=$(npx cspell --no-progress --gitignore --config .vscode/cspell.json "**/*.md" || exit 0)
echo "$output"
echo "OUTPUT<<EOF" >> $GITHUB_ENV
echo "$output" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create an issue
if: env.OUTPUT != ''
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Weekly spelling check
body: |
Typos and unknown words:
```
${{ env.OUTPUT }}
```
> [!TIP]
> To exclude words from the spellchecker, you can add valid words (web technology terms or abbreviations) to the [terms-abbreviations.txt](https://github.com/mdn/content/blob/main/.vscode/terms-abbreviations.txt) dictionary for IDE autocompletion. To ignore strings that are not words (`AABBCC` in code, for instance), you can add them to [ignore-list.txt](https://github.com/mdn/content/blob/main/.vscode/ignore-list.txt).
env:
OUTPUT: ${{ env.OUTPUT }}
12 changes: 9 additions & 3 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

{
"default": true,
// Disabled, as some callouts include headings.
"heading-increment": false,
"heading-increment": true,
"ul-style": {
"style": "dash",
},
Expand Down Expand Up @@ -220,11 +219,18 @@
"searchScope": "text",
},
{
"name": "gfm-blockquote",
"name": "gfm-alert",
"message": "Use the GFM syntax: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN#notes_warnings_and_callouts",
"searchPattern": "/^ *> \\*\\*(Note|Warning|Callout):\\*\\*(?! [[{`_*])/gm",
"searchScope": "text",
},
{
"name": "bad-gfm-alert",
"message": "Use the correct GFM syntax: `> [!NOTE]`",
// TODO this should use the modifier syntax; until it has better Node support
"searchPattern": "/^ *> !?\\[!?((?!NOTE)[Nn][Oo][Tt][Ee]|(?!WARNING)[Ww][Aa][Rr][Nn][Ii][Nn][Gg]|(?!CALLOUT)[Cc][Aa][Ll][Ll][Oo][Uu][Tt])\\]\\n|^ *> (?!\\[!)!?\\[!?(NOTE|WARNING|CALLOUT)\\]\\n/gm",
"searchScope": "text",
},
],
},
}
23 changes: 16 additions & 7 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"version": "0.2",
"language": "en-US",
"languageId": "*",
"useGitignore": true,
"dictionaries": [
"terms-abbreviations",
"ignore-list",
"bash",
"css",
"cpp",
Expand All @@ -17,7 +20,6 @@
"markdown",
"node",
"npm",
"project-words",
"python",
"softwareTerms",
"svelte",
Expand All @@ -37,10 +39,9 @@
// TODO - add some details what these match
"\\(#\\w*\\)",
"\\]\\(\\S*\\)",
"\\]\\(\\S*\\)",
"\\*\\*\\w\\*\\*\\w*",
"\\*\\w\\*\\w*",
"#[\\w-]*",
"#[À-ž\\w-]*",
"aria-activedescendant=\"(?:[^\\\"]+|\\.)*\"",
"aria-controls=\"(?:[^\\\"]+|\\.)*\"",
"aria-describedby=\"(?:[^\\\"]+|\\.)*\"",
Expand All @@ -55,18 +56,26 @@
"for=\"(?:[^\\\"]+|\\.)*\"",
"HexValues",
"href=\"(?:[^\\\"]+|\\.)*\"",
"id=\"(?:[^\\\"]+|\\.)*\"",
"(?<=id)=\"(?:[^\\\"]+|\\.)*\"",
"lang=\".*\">.*</",
"src=\"(?:[^\\\"]+|\\.)*\"",
"url\\(\"data\\:image/svg\\+xml.*\"\\)[,;]",
"Urls"
"Urls",
"favourite-colour",
"ucaf:.*\""
],
"allowCompoundWords": true,
"dictionaryDefinitions": [
{
"name": "project-words",
"path": "./project-words.txt",
"name": "terms-abbreviations",
"path": "./terms-abbreviations.txt",
"addWords": true
},
{
"name": "ignore-list",
"path": "./ignore-list.txt",
"addWords": false,
"noSuggest": true
}
],
"enableFiletypes": ["xml"]
Expand Down
Loading

0 comments on commit 77f4c99

Please sign in to comment.