Enable custom mdx formatting options #1835
w-a-t-s-o-n
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
One thing I've noticed since using Mintlify is that if I want to set specific linting/formatting rules for my
mdxfiles in the repo, I don't have a way to propagate that to the web editor.For example, I use
mdxlintin my monorepo for all*.mdxfiles (not just Mintlify app). I then uselint-stagedto ensure that before a commit goes through, it is properly linted/formatted using mymdxlintconfig settings.However, if I go to the web editor and make changes to a file that aren't the correct format, those will go through to the PR since I can't tell it to run my format script or use
lint-staged. Currently, I've set up a GitHub Action workflow in my repo to detect commits from the Mintlify web editor, then run my format script and push up another commit. Which is fine, but it would be so much better to just supply a script or config to Mintlify so that it would handle that before committing to the branch.The two avenues that make the most sense to me:
format:mdxscript which runsmdxlint . --output. I'm not familiar enough with the Mintlify build process to know if it would be able to install the dependencies in my repo before running, so that could be a hurdle.mdxlint(or a similar tool, but not Prettier since the mdx support is poor), then either detect a config in the repo connected to the app, or allow me to enter in a config in the settings.Beta Was this translation helpful? Give feedback.
All reactions