From d782a93e653305a3e1e16c3429bce9b15f899715 Mon Sep 17 00:00:00 2001 From: Jasper Smet Date: Tue, 27 Jan 2026 15:44:48 +0100 Subject: [PATCH 1/3] Add markdownlint, cspell, jslint and json-lint jobs --- .github/cspell.json | 109 ++++++++++++++++++++++++++ .github/markdownlint.json | 51 ++++++++++++ .github/workflows/docs-validation.yml | 69 ++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 .github/cspell.json create mode 100644 .github/markdownlint.json create mode 100644 .github/workflows/docs-validation.yml diff --git a/.github/cspell.json b/.github/cspell.json new file mode 100644 index 0000000000..37cac06085 --- /dev/null +++ b/.github/cspell.json @@ -0,0 +1,109 @@ +{ + "version": "0.2", + "language": "en", + "caseSensitive": false, + "words": [ + "CakePHP", + "VitePress", + "php", + "datetime", + "varchar", + "postgresql", + "mysql", + "sqlite", + "webroot", + "csrf", + "xss", + "cakephp", + "bake", + "phinx", + "hasher", + "middlewares", + "namespaced", + "phpunit", + "composable", + "autowiring", + "stringable", + "arrayable", + "timestampable", + "paginator", + "Enqueue", + "dequeue", + "nullable", + "accessor", + "mutator", + "minphpversion", + "phpversion", + "XAMPP", + "WAMP", + "MAMP", + "controllername", + "actionname", + "Datamapper", + "webservices", + "nginx", + "apache", + "httpd", + "lighttpd", + "mbstring", + "simplexml", + "Laragon", + "composer", + "phar", + "paginate", + "startup", + "endfor", + "endwhile", + "sidebar", + "blocks", + "rewrite", + "before", + "called", + "sites", + "example", + "Classes", + "Redirect", + "Layout" + ], + "ignoreRegExpList": [ + "/\\$[a-zA-Z_][a-zA-Z0-9_]*/g", + "/[a-zA-Z]+::[a-zA-Z]+/g", + "/<[^>]+>/g", + "/`[^`]+`/g", + "/```[\\s\\S]*?```/g", + "/\\b[A-Z][a-z]+(?:[A-Z][a-z]+)+\\b/g", + "/\\b[a-z]+_[a-z_]+\\b/g", + "/\\bhttps?:\\/\\/[^\\s]+/g", + "/\\[[a-z]\\][a-z]+/g", + "/\\b[A-Z][a-z]+\\b/g", + "/\\b(true|false|null|while|for|if|else)\\b/g" + ], + "languageSettings": [ + { + "languageId": "*", + "locale": "en", + "dictionaries": ["en", "softwareTerms", "php"] + }, + { + "languageId": "*", + "locale": "ja", + "allowCompoundWords": true + } + ], + "overrides": [ + { + "filename": "**/docs/ja/**/*.md", + "language": "ja", + "ignoreRegExpList": [ + "/[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]+/gu" + ] + } + ], + "ignorePaths": [ + "node_modules/**", + ".temp/**", + "dist/**", + "**/*.min.js", + "**/*.lock" + ] +} diff --git a/.github/markdownlint.json b/.github/markdownlint.json new file mode 100644 index 0000000000..7229966049 --- /dev/null +++ b/.github/markdownlint.json @@ -0,0 +1,51 @@ +{ + "default": true, + "MD013": false, + "MD033": false, + "MD041": false, + "MD024": false, + "MD025": false, + "MD034": false, + "MD040": false, + "MD010": false, + "MD012": false, + "MD022": false, + "MD031": false, + "MD032": false, + "MD028": false, + "MD046": false, + "MD030": false, + "line-length": false, + "no-inline-html": { + "allowed_elements": [ + "Badge", + "div", + "span", + "br", + "style", + "details", + "summary", + "table", + "thead", + "tbody", + "tr", + "th", + "td", + "img", + "a" + ] + }, + "no-duplicate-heading": false, + "single-h1": false, + "no-bare-urls": false, + "fenced-code-language": false, + "no-hard-tabs": false, + "no-multiple-blanks": false, + "blanks-around-headings": false, + "blanks-around-fences": false, + "blanks-around-lists": false, + "no-blanks-blockquote": false, + "code-block-style": false, + "list-marker-space": false, + "commands-show-output": false +} diff --git a/.github/workflows/docs-validation.yml b/.github/workflows/docs-validation.yml new file mode 100644 index 0000000000..5f6c49e96c --- /dev/null +++ b/.github/workflows/docs-validation.yml @@ -0,0 +1,69 @@ +name: Documentation Validation + +on: + pull_request: + paths: + - 'docs/**' + - '.github/**' + - 'toc_*.json' + - 'config.js' + +jobs: + js-lint: + name: Validate JavaScript Files + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Validate config.js syntax + run: node --check config.js + + json-lint: + name: Validate JSON Files + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Validate JSON syntax + run: | + for file in toc_*.json; do + if ! jq empty "$file" 2>/dev/null; then + echo "Invalid JSON: $file" + exit 1 + fi + echo "✅ Valid: $file" + done + + markdown-lint: + name: Lint Markdown + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Lint markdown files + uses: articulate/actions-markdownlint@v1 + with: + config: .github/markdownlint.json + files: 'docs/**/*.md' + ignore: 'node_modules' + + spell-check: + name: Spell Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check spelling + uses: streetsidesoftware/cspell-action@v5 + with: + files: 'docs/**/*.md' + config: '.github/cspell.json' + incremental_files_only: true From 46006971796fa8f3f5ded2389a7dd5637326149b Mon Sep 17 00:00:00 2001 From: Jasper Smet Date: Tue, 27 Jan 2026 15:47:33 +0100 Subject: [PATCH 2/3] Make markdownlint config more lenient --- .github/markdownlint.json | 42 +++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/markdownlint.json b/.github/markdownlint.json index 7229966049..57a30dfb6f 100644 --- a/.github/markdownlint.json +++ b/.github/markdownlint.json @@ -1,20 +1,28 @@ { "default": true, - "MD013": false, - "MD033": false, - "MD041": false, - "MD024": false, - "MD025": false, - "MD034": false, - "MD040": false, + "MD001": false, "MD010": false, "MD012": false, + "MD013": false, "MD022": false, + "MD024": false, + "MD025": false, + "MD026": false, + "MD028": false, + "MD030": false, "MD031": false, "MD032": false, - "MD028": false, + "MD033": false, + "MD034": false, + "MD040": false, + "MD041": false, "MD046": false, - "MD030": false, + "MD047": false, + "MD051": false, + "MD055": false, + "MD056": false, + "MD059": false, + "MD060": false, "line-length": false, "no-inline-html": { "allowed_elements": [ @@ -32,7 +40,11 @@ "th", "td", "img", - "a" + "a", + "svg", + "path", + "figure", + "p" ] }, "no-duplicate-heading": false, @@ -47,5 +59,13 @@ "no-blanks-blockquote": false, "code-block-style": false, "list-marker-space": false, - "commands-show-output": false + "commands-show-output": false, + "heading-increment": false, + "no-trailing-punctuation": false, + "single-trailing-newline": false, + "link-fragments": false, + "table-pipe-style": false, + "table-column-count": false, + "descriptive-link-text": false, + "table-column-style": false } From 8a1a55bf88a1d03e13b2cf7655482823f8eafcc1 Mon Sep 17 00:00:00 2001 From: Jasper Smet Date: Tue, 27 Jan 2026 15:54:35 +0100 Subject: [PATCH 3/3] copilot review fixes --- .github/cspell.json | 24 ++++++------ .github/markdownlint.json | 53 ++++++++------------------- .github/workflows/docs-validation.yml | 8 ++-- 3 files changed, 32 insertions(+), 53 deletions(-) diff --git a/.github/cspell.json b/.github/cspell.json index 37cac06085..0c872cb3c3 100644 --- a/.github/cspell.json +++ b/.github/cspell.json @@ -66,17 +66,17 @@ "Layout" ], "ignoreRegExpList": [ - "/\\$[a-zA-Z_][a-zA-Z0-9_]*/g", - "/[a-zA-Z]+::[a-zA-Z]+/g", - "/<[^>]+>/g", - "/`[^`]+`/g", - "/```[\\s\\S]*?```/g", - "/\\b[A-Z][a-z]+(?:[A-Z][a-z]+)+\\b/g", - "/\\b[a-z]+_[a-z_]+\\b/g", - "/\\bhttps?:\\/\\/[^\\s]+/g", - "/\\[[a-z]\\][a-z]+/g", - "/\\b[A-Z][a-z]+\\b/g", - "/\\b(true|false|null|while|for|if|else)\\b/g" + "\\$[a-zA-Z_][a-zA-Z0-9_]*", + "[a-zA-Z]+::[a-zA-Z]+", + "<[^>]+>", + "`[^`]+`", + "```[\\s\\S]*?```", + "\\b[A-Z][a-z]+(?:[A-Z][a-z]+)+\\b", + "\\b[a-z]+_[a-z_]+\\b", + "\\bhttps?:\\/\\/[^\\s]+", + "\\[[a-z]\\][a-z]+", + "\\b[A-Z][a-z]+\\b", + "\\b(true|false|null|while|for|if|else)\\b" ], "languageSettings": [ { @@ -95,7 +95,7 @@ "filename": "**/docs/ja/**/*.md", "language": "ja", "ignoreRegExpList": [ - "/[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]+/gu" + "[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]+" ] } ], diff --git a/.github/markdownlint.json b/.github/markdownlint.json index 57a30dfb6f..4327587dbf 100644 --- a/.github/markdownlint.json +++ b/.github/markdownlint.json @@ -1,29 +1,18 @@ { "default": true, - "MD001": false, - "MD010": false, - "MD012": false, - "MD013": false, - "MD022": false, - "MD024": false, - "MD025": false, - "MD026": false, - "MD028": false, - "MD030": false, - "MD031": false, - "MD032": false, - "MD033": false, - "MD034": false, - "MD040": false, - "MD041": false, - "MD046": false, - "MD047": false, - "MD051": false, - "MD055": false, - "MD056": false, - "MD059": false, - "MD060": false, + "heading-increment": false, + "no-hard-tabs": false, + "no-multiple-blanks": false, "line-length": false, + "commands-show-output": false, + "blanks-around-headings": false, + "no-duplicate-heading": false, + "single-h1": false, + "no-trailing-punctuation": false, + "no-blanks-blockquote": false, + "list-marker-space": false, + "blanks-around-fences": false, + "blanks-around-lists": false, "no-inline-html": { "allowed_elements": [ "Badge", @@ -47,25 +36,15 @@ "p" ] }, - "no-duplicate-heading": false, - "single-h1": false, "no-bare-urls": false, "fenced-code-language": false, - "no-hard-tabs": false, - "no-multiple-blanks": false, - "blanks-around-headings": false, - "blanks-around-fences": false, - "blanks-around-lists": false, - "no-blanks-blockquote": false, + "first-line-heading": false, "code-block-style": false, - "list-marker-space": false, - "commands-show-output": false, - "heading-increment": false, - "no-trailing-punctuation": false, "single-trailing-newline": false, "link-fragments": false, "table-pipe-style": false, "table-column-count": false, - "descriptive-link-text": false, - "table-column-style": false + "emphasis-style": false, + "table-column-style": false, + "descriptive-link-text": false } diff --git a/.github/workflows/docs-validation.yml b/.github/workflows/docs-validation.yml index 5f6c49e96c..a995ef186d 100644 --- a/.github/workflows/docs-validation.yml +++ b/.github/workflows/docs-validation.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Validate config.js syntax run: node --check config.js @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Validate JSON syntax run: | @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Lint markdown files uses: articulate/actions-markdownlint@v1 @@ -59,7 +59,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Check spelling uses: streetsidesoftware/cspell-action@v5