go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.43k stars 5.34k forks source link

Add MDX linter for docs directory. #30743

Open lunny opened 3 months ago

lunny commented 3 months ago

Since Gitea's documentation are now building with docusaurus v3 which support MDX syntax. So some wrong syntax will break the documentation building. Maybe https://npmjs.org/eslint-plugin-mdx is a good choice.

silverwind commented 3 months ago

Would mdx files be named .mdx? If so, we can distinguish by file extension for which linters run on what. Would not recommend putting MDX content into .md.

Also I think that eslint plugin runs based on remark, not markdownlint which we currently use. Maybe we should migrate to remark so linting of mdx and md is similar.