Skip to content

Commit b4110d2

Browse files
authored
Replace remark-cli with mdxlint for MDX files
This provides an editor integration and doesn’t rely on the use of CLI flags. Closes GH-2667. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 5a65105 commit b4110d2

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

package-lock.json

Lines changed: 22 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"hastscript": "^9.0.0",
7676
"ink": "^6.0.0",
7777
"lz-string": "^1.0.0",
78+
"mdxlint": "^1.0.0",
7879
"p-all": "^5.0.0",
7980
"postcss": "^8.0.0",
8081
"postcss-cli": "^11.0.0",
@@ -144,7 +145,7 @@
144145
"docs-js-editor": "esbuild --bundle --conditions=browser,production --define:process.env.NODE_ENV=\\\"production\\\" --log-level=warning --minify --outfile=public/editor.js --target=es2020 docs/_asset/editor.jsx",
145146
"docs-post": "node website/post.js",
146147
"docs-prep": "node website/prep.js && npm run docs-js && npm run docs-css",
147-
"format": "remark --frail --output --quiet -- . && remark --ext mdx --frail --output --quiet --use remark-mdx -- . && prettier . --log-level warn --write && xo --fix",
148+
"format": "remark --frail --output --quiet -- . && mdxlint --frail --output --quiet -- . && prettier . --log-level warn --write && xo --fix",
148149
"test": "npm run build && npm run format && npm run test-coverage",
149150
"test-api": "npm run test-api --workspaces --if-present",
150151
"test-coverage": "npm run test-coverage --workspaces --if-present"
@@ -169,6 +170,11 @@
169170
"trailingComma": "none",
170171
"useTabs": false
171172
},
173+
"mdxlint": {
174+
"plugins": [
175+
"./docs/.remarkrc.js"
176+
]
177+
},
172178
"remarkConfig": {
173179
"plugins": [
174180
"remark-preset-wooorm",

0 commit comments

Comments
 (0)