Skip to content

Commit 416ff56

Browse files
authored
chore: add markdownlint and format component changelogs (#3587)
* chore: add markdownlint and format component changelogs
1 parent 7797847 commit 416ff56

File tree

102 files changed

+4923
-28016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4923
-28016
lines changed

.eslintrc

+24
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,30 @@
144144
]
145145
}
146146
},
147+
{
148+
"files": ["tokens/dist/**/*.json"],
149+
"rules": {
150+
"jsonc/sort-keys": [
151+
"warn",
152+
{
153+
"pathPattern": "^$",
154+
"order": { "type": "asc" }
155+
},
156+
{
157+
"pathPattern": ".*",
158+
"order": [
159+
"prop",
160+
"ref",
161+
"value",
162+
"light",
163+
"dark",
164+
"medium",
165+
"large"
166+
]
167+
}
168+
]
169+
}
170+
},
147171
{
148172
"files": [
149173
"components/*/stories/*.js",

.github/workflows/development.yml

+13
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ jobs:
8585
styles_modified_files: ${{ steps.changed-files.outputs.styles_modified_files }}
8686
eslint_added_files: ${{ steps.changed-files.outputs.eslint_added_files }}
8787
eslint_modified_files: ${{ steps.changed-files.outputs.eslint_modified_files }}
88+
mdlint_added_files: ${{ steps.changed-files.outputs.mdlint_added_files }}
89+
mdlint_modified_files: ${{ steps.changed-files.outputs.mdlint_modified_files }}
8890
plugins_modified_files: ${{ steps.changed-files.outputs.plugins_modified_files }}
8991
plugins_added_files: ${{ steps.changed-files.outputs.plugins_added_files }}
9092
permissions:
@@ -102,6 +104,17 @@ jobs:
102104
- components/*/themes/express.css
103105
eslint:
104106
- components/*/stories/*.js
107+
mdlint:
108+
- *.md
109+
- .storybook/*.md
110+
- .storybook/*/*.md
111+
- .storybook/*/*.mdx
112+
- components/*/*.md
113+
- components/*/stories/*.mdx
114+
- plugins/*/*.md
115+
- tokens/*.md
116+
- tools/*/*.md
117+
- ui-icons/*.md
105118
plugins:
106119
- plugins/**/*
107120

.github/workflows/lint.yml

+21
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ on:
1818
eslint_modified_files:
1919
type: string
2020
required: false
21+
mdlint_added_files:
22+
type: string
23+
required: false
24+
mdlint_modified_files:
25+
type: string
26+
required: false
2127
workflow_call:
2228
inputs:
2329
styles_added_files:
@@ -32,6 +38,12 @@ on:
3238
eslint_modified_files:
3339
type: string
3440
required: false
41+
mdlint_added_files:
42+
type: string
43+
required: false
44+
mdlint_modified_files:
45+
type: string
46+
required: false
3547

3648
permissions:
3749
contents: read
@@ -104,3 +116,12 @@ jobs:
104116
filter_mode: diff_context
105117
# eslint_flags: "components/*/stories/*.js"
106118
eslint_flags: "${{ inputs.eslint_added_files }} ${{ inputs.eslint_modified_files }}"
119+
120+
- name: Run markdownlint on documentation
121+
uses: reviewdog/[email protected]
122+
with:
123+
reporter: github-pr-review
124+
filter_mode: diff_context
125+
fail_level: error
126+
markdownlint_config: "${{ github.workspace }}/.markdownlint.json"
127+
markdownlint_input: "${{ inputs.mdlint_added_files }} ${{ inputs.mdlint_modified_files }}"

.markdownlint.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": "markdownlint/style/prettier",
3+
"first-line-h1": false,
4+
"no-inline-html": false,
5+
"no-bare-urls": false,
6+
"no-duplicate-heading": {
7+
"siblings_only": true
8+
},
9+
"code-block-style": {
10+
"style": "fenced"
11+
},
12+
"code-fence-style": {
13+
"style": "backtick"
14+
},
15+
"emphasis-style": {
16+
"style": "underscore"
17+
},
18+
"strong-style": {
19+
"style": "asterisk"
20+
},
21+
"ul-style": {
22+
"style": "dash"
23+
}
24+
}

0 commit comments

Comments
 (0)