Skip to content

Commit d782a93

Browse files
committed
Add markdownlint, cspell, jslint and json-lint jobs
1 parent 75f33cf commit d782a93

3 files changed

Lines changed: 229 additions & 0 deletions

File tree

.github/cspell.json

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"caseSensitive": false,
5+
"words": [
6+
"CakePHP",
7+
"VitePress",
8+
"php",
9+
"datetime",
10+
"varchar",
11+
"postgresql",
12+
"mysql",
13+
"sqlite",
14+
"webroot",
15+
"csrf",
16+
"xss",
17+
"cakephp",
18+
"bake",
19+
"phinx",
20+
"hasher",
21+
"middlewares",
22+
"namespaced",
23+
"phpunit",
24+
"composable",
25+
"autowiring",
26+
"stringable",
27+
"arrayable",
28+
"timestampable",
29+
"paginator",
30+
"Enqueue",
31+
"dequeue",
32+
"nullable",
33+
"accessor",
34+
"mutator",
35+
"minphpversion",
36+
"phpversion",
37+
"XAMPP",
38+
"WAMP",
39+
"MAMP",
40+
"controllername",
41+
"actionname",
42+
"Datamapper",
43+
"webservices",
44+
"nginx",
45+
"apache",
46+
"httpd",
47+
"lighttpd",
48+
"mbstring",
49+
"simplexml",
50+
"Laragon",
51+
"composer",
52+
"phar",
53+
"paginate",
54+
"startup",
55+
"endfor",
56+
"endwhile",
57+
"sidebar",
58+
"blocks",
59+
"rewrite",
60+
"before",
61+
"called",
62+
"sites",
63+
"example",
64+
"Classes",
65+
"Redirect",
66+
"Layout"
67+
],
68+
"ignoreRegExpList": [
69+
"/\\$[a-zA-Z_][a-zA-Z0-9_]*/g",
70+
"/[a-zA-Z]+::[a-zA-Z]+/g",
71+
"/<[^>]+>/g",
72+
"/`[^`]+`/g",
73+
"/```[\\s\\S]*?```/g",
74+
"/\\b[A-Z][a-z]+(?:[A-Z][a-z]+)+\\b/g",
75+
"/\\b[a-z]+_[a-z_]+\\b/g",
76+
"/\\bhttps?:\\/\\/[^\\s]+/g",
77+
"/\\[[a-z]\\][a-z]+/g",
78+
"/\\b[A-Z][a-z]+\\b/g",
79+
"/\\b(true|false|null|while|for|if|else)\\b/g"
80+
],
81+
"languageSettings": [
82+
{
83+
"languageId": "*",
84+
"locale": "en",
85+
"dictionaries": ["en", "softwareTerms", "php"]
86+
},
87+
{
88+
"languageId": "*",
89+
"locale": "ja",
90+
"allowCompoundWords": true
91+
}
92+
],
93+
"overrides": [
94+
{
95+
"filename": "**/docs/ja/**/*.md",
96+
"language": "ja",
97+
"ignoreRegExpList": [
98+
"/[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]+/gu"
99+
]
100+
}
101+
],
102+
"ignorePaths": [
103+
"node_modules/**",
104+
".temp/**",
105+
"dist/**",
106+
"**/*.min.js",
107+
"**/*.lock"
108+
]
109+
}

.github/markdownlint.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD033": false,
5+
"MD041": false,
6+
"MD024": false,
7+
"MD025": false,
8+
"MD034": false,
9+
"MD040": false,
10+
"MD010": false,
11+
"MD012": false,
12+
"MD022": false,
13+
"MD031": false,
14+
"MD032": false,
15+
"MD028": false,
16+
"MD046": false,
17+
"MD030": false,
18+
"line-length": false,
19+
"no-inline-html": {
20+
"allowed_elements": [
21+
"Badge",
22+
"div",
23+
"span",
24+
"br",
25+
"style",
26+
"details",
27+
"summary",
28+
"table",
29+
"thead",
30+
"tbody",
31+
"tr",
32+
"th",
33+
"td",
34+
"img",
35+
"a"
36+
]
37+
},
38+
"no-duplicate-heading": false,
39+
"single-h1": false,
40+
"no-bare-urls": false,
41+
"fenced-code-language": false,
42+
"no-hard-tabs": false,
43+
"no-multiple-blanks": false,
44+
"blanks-around-headings": false,
45+
"blanks-around-fences": false,
46+
"blanks-around-lists": false,
47+
"no-blanks-blockquote": false,
48+
"code-block-style": false,
49+
"list-marker-space": false,
50+
"commands-show-output": false
51+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Documentation Validation
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs/**'
7+
- '.github/**'
8+
- 'toc_*.json'
9+
- 'config.js'
10+
11+
jobs:
12+
js-lint:
13+
name: Validate JavaScript Files
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Validate config.js syntax
21+
run: node --check config.js
22+
23+
json-lint:
24+
name: Validate JSON Files
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Validate JSON syntax
32+
run: |
33+
for file in toc_*.json; do
34+
if ! jq empty "$file" 2>/dev/null; then
35+
echo "Invalid JSON: $file"
36+
exit 1
37+
fi
38+
echo "✅ Valid: $file"
39+
done
40+
41+
markdown-lint:
42+
name: Lint Markdown
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v4
48+
49+
- name: Lint markdown files
50+
uses: articulate/actions-markdownlint@v1
51+
with:
52+
config: .github/markdownlint.json
53+
files: 'docs/**/*.md'
54+
ignore: 'node_modules'
55+
56+
spell-check:
57+
name: Spell Check
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v4
63+
64+
- name: Check spelling
65+
uses: streetsidesoftware/cspell-action@v5
66+
with:
67+
files: 'docs/**/*.md'
68+
config: '.github/cspell.json'
69+
incremental_files_only: true

0 commit comments

Comments
 (0)