Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add Markdownlint support #250

Closed
wants to merge 1 commit into from
Closed

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Apr 11, 2022

Changes

Caution: I'm doing this PR as "Erika the person doing a fun weekend project" and not as "Erika the Astro employee doing a serious, approved endeavor", this could very much never get merged if we deem that it's outside what we want to support / we prefer doing it another way

This adds support for linting Markdown component block using markdownlint.

Unlike other tools such as stylelint, Prettier or ESLint, markdownlint does not support formats other than the one it was intended for (.md) nor is it possible to write custom parsers for it nor does its VS Code extension support linting Markdown blocks in other files

So, my first thought was that we needed to reimplement some parts of their VS Code extension into our language-server so I went ahead with that, but it turns out that we don't need that many code changes apart from a few things such as support for indented text

So, I'm thinking that instead of doing all this, we could probably contribute to markdownlint (at least its VS Code extension) and add support for linting blocks that are detected as markdown by VS Code (which is the case of our Markdown component)? Probably? However, that'll be for another fun weekend

Result

image

Testing

WIP

Docs

WIP

@changeset-bot
Copy link

changeset-bot bot commented Apr 11, 2022

⚠️ No Changeset found

Latest commit: 65809a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Princesseuh
Copy link
Member Author

The Markdown component is planned to be removed from Astro

This feature could be supported in the future by adding support to Markdownlint itself or through another mechanism but since this project is not responsible for this anymore, I'm closing this PR

@Princesseuh Princesseuh deleted the markdownlint-support branch May 10, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant