Skip to content

Commit 094a04a

Browse files
committed
[repo] Bump mdlint
1 parent 0249ebc commit 094a04a

File tree

10 files changed

+152
-96
lines changed

10 files changed

+152
-96
lines changed

.lintstagedrc.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ export default {
2121
'*.css': ['stylelint --allow-empty-input --fix'],
2222
'*.{js,jsx,ts,tsx,mjs}': ['eslint --fix'],
2323
'*.mdx': [
24-
'markdownlint-cli2-config .markdownlint/mdx/fix/.markdownlint-cli2.cjs',
24+
'markdownlint-cli2 --config .markdownlint/mdx/fix/.markdownlint-cli2.cjs',
2525
'cspell --no-must-find-files --no-progress',
2626
],
2727
'*.md': [
28-
'markdownlint-cli2-fix',
28+
'markdownlint-cli2 --fix',
2929
'cspell --no-must-find-files --no-progress',
3030
],
3131
'src/**/*.{js,jsx,ts,tsx,mjs}': [

.markdownlint-cli2.cjs

+7
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ config.MD033 = {
154154
"var",
155155

156156
// These are custom React elements, either from Docusaurus, or our own.
157+
"AcademyLink",
157158
"CodeBlock",
159+
"ComponentFileSummary",
158160
"Tabs",
159161
"TabItem",
160162
"TabItems",
@@ -164,9 +166,14 @@ config.MD033 = {
164166
"InvalidExample",
165167
"ReactPlayer",
166168
"Link",
169+
"ProjectSummary",
167170
"ReleaseNoteIntro",
168171
"ReleaseDate",
169172
"ReleaseVersion",
173+
"VersionPHP",
174+
"Lib",
175+
"Lang",
176+
"DbAccessPHP",
170177
]
171178
};
172179

docs/apis/plugintypes/assign/feedback.md

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ mod/assign/feedback/file
8080

8181
<!-- markdownlint-capture -->
8282
<!-- markdownlint-disable no-space-in-code -->
83+
<!-- markdownlint-disable no-inline-html -->
8384

8485
export const settingsExample = `
8586
$settings->add(
@@ -109,6 +110,7 @@ All feedback plugins should include one setting named 'default' to indicate if t
109110

110111
<!-- markdownlint-save -->
111112
<!-- markdownlint-disable code-block-style -->
113+
<!-- markdownlint-disable no-inline-html -->
112114

113115
<LocalLib
114116
required

docs/apis/plugintypes/assign/submission.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ mod/assign/submission/file
8080
<!-- markdownlint-disable no-space-in-code -->
8181
<!-- markdownlint-disable blanks-around-fences -->
8282
<!-- markdownlint-disable code-block-style -->
83+
<!-- markdownlint-disable no-inline-html -->
8384

8485
import settingsExample from '!!raw-loader!./_files/submission_settings.php';
8586

docs/apis/plugintypes/atto/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Some of the important files for the Atto plugintype are described below. See the
6262

6363
### version.php
6464

65+
<!-- markdownlint-disable no-inline-html -->
66+
6567
<VersionPHP
6668
plugintype="atto"
6769
/>

docs/apis/plugintypes/repository/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ At this point we have created everything necessary for the administration pages.
387387

388388
That's all - the administration part of our Flickr Public plugin is done. For your information, Box.net, Flickr, and Flickr Public all have similar administration APIs.
389389

390+
<!-- markdownlint-disable no-inline-html -->
391+
390392
import FlickPublicLib from '!!raw-loader!./_examples/flickr_public_lib.php';
391393

392394
<Lib

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"mdlint-all": "markdownlint-cli2 '{docs,general}/**/*.md' '*.md'",
2323
"mdfix": "markdownlint-cli2-fix",
2424
"mdfix-all": "markdownlint-cli2-fix '{docs,general}/**/*.md' '*.md'",
25-
"mdxlint": "markdownlint-cli2-config .markdownlint/mdx/.markdownlint-cli2.cjs",
26-
"mdxlint-all": "markdownlint-cli2-config .markdownlint/mdx/.markdownlint-cli2.cjs '{docs,general}/**/*.mdx' '*.mdx'",
27-
"mdxfix": "markdownlint-cli2-config .markdownlint/mdx/fix/.markdownlint-cli2.cjs",
28-
"mdxfix-all": "markdownlint-cli2-config .markdownlint/mdx/fix/.markdownlint-cli2.cjs '{docs,general}/**/*.mdx' '*.mdx'",
25+
"mdxlint": "markdownlint-cli2 --config .markdownlint/mdx/.markdownlint-cli2.cjs",
26+
"mdxlint-all": "markdownlint-cli2 --config .markdownlint/mdx/.markdownlint-cli2.cjs '{docs,general}/**/*.mdx' '*.mdx'",
27+
"mdxfix": "markdownlint-cli2 --config .markdownlint/mdx/fix/.markdownlint-cli2.cjs",
28+
"mdxfix-all": "markdownlint-cli2 --config .markdownlint/mdx/fix/.markdownlint-cli2.cjs '{docs,general}/**/*.mdx' '*.mdx'",
2929
"migrate": "scripts/wikimedia-fetch.mjs migrate",
3030
"lint": "yarn mdlint-all; yarn mdxlint-all; yarn spell",
3131
"prepare": "husky install",
@@ -100,7 +100,7 @@
100100
"jest": "^29.3.1",
101101
"js-yaml": "^4.1.0",
102102
"lint-staged": "^13.0.4",
103-
"markdownlint-cli2": "^0.5.1",
103+
"markdownlint-cli2": "^0.13.0",
104104
"markdownlint-rule-helpers": "^0.17.2",
105105
"node-fetch": "^3.3.0",
106106
"nodemw": "^0.18.0",

scripts/releases/fetchReleaseNotes.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ for file in ${dir}/* ${dir}.md; do
3232
./scripts/releases/stripFullPageName.sh $file
3333
done
3434

35-
yarn markdownlint-cli2-config scripts/migration/phases/12-admonition/.markdownlint-cli2.cjs "${dir}".md
36-
yarn markdownlint-cli2-config scripts/migration/phases/12-admonition/.markdownlint-cli2.cjs "${dir}"/*.md
35+
yarn markdownlint-cli2 --config scripts/migration/phases/12-admonition/.markdownlint-cli2.cjs "${dir}".md
36+
yarn markdownlint-cli2 --config scripts/migration/phases/12-admonition/.markdownlint-cli2.cjs "${dir}"/*.md
3737

3838
yarn mdlint-all
3939

scripts/wikimedia-fetch.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,15 @@ const fetchOneDoc = async (pageTitle, newPath, options) => {
319319
));
320320
logger.info(`=> Running migration phase ${phaseData.path}`);
321321
if (phaseData.type === 'markdownlint') {
322-
// Use markdownlint-cli2-config to specify these as separate phases.
322+
// Use markdownlint-cli2 to specify these as separate phases.
323323
// This is necessary because if two rules operate on the same text, then no fix is made.
324324
// The order of these is important because they often do operate on the same line.
325325
// For example, we *must* convert all numbered lists before converting markup headers to markdown.
326326
const phaseScript = path.join(phasePath, '.markdownlint-cli2.cjs');
327-
logger.debug(`yarn markdownlint-cli2-config ${phaseScript} ${newFile}`);
327+
logger.debug(`yarn markdownlint-cli2 --config ${phaseScript} ${newFile}`);
328328

329329
await new Promise((resolve) => {
330-
exec(`yarn markdownlint-cli2-config ${phaseScript} ${newFile}`, async (error, stdout, stderr) => {
330+
exec(`yarn markdownlint-cli2 --config ${phaseScript} ${newFile}`, async (error, stdout, stderr) => {
331331
if (error) {
332332
logger.warn(
333333
`The '${phaseData.path}' conversion reported warnings `

0 commit comments

Comments
 (0)