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

Documentation and example on how to create custom rules #261

Closed
floroz opened this issue Apr 2, 2021 · 2 comments · Fixed by #262
Closed

Documentation and example on how to create custom rules #261

floroz opened this issue Apr 2, 2021 · 2 comments · Fixed by #262
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done

Comments

@floroz
Copy link
Contributor

floroz commented Apr 2, 2021

Subject of the feature

Documentation and example to help developers understand how to create custom rules as part of remark-lint plugin system.

Problem

As I have started creating custom rules for our content writers who edit markdown/mdx on a daily basis, I've come across the absence of some practical examples and walkthrough, which I think would be extremely beneficial if immediately available as part of the documentation of this repo.

If these examples are already available, and I have missed them, I apologise and would be glad if you can point me in the right direction.

Solution

If you feel this type of documentation is currently missing, or could benefit from some additional example or walkthrough, I'd be happy to contribute with a PR submitting a new section in the README Creating your custom rule.

I can use a real-world example of a rule I've written and also add a quick overview on how to unit test such feature.

@floroz floroz added 🙉 open/needs-info This needs some more info 🦋 type/enhancement This is great to have labels Apr 2, 2021
@wooorm
Copy link
Member

wooorm commented Apr 2, 2021

Hi there! Good idea.

This example is close to the essence of a remark lint rule: https://unifiedjs.com/learn/guide/create-a-plugin/.
As you’re offering though, a similar guide “Create a remark lint rule”, would indeed be useful to have. It could be linked to from this repo.

@floroz
Copy link
Contributor Author

floroz commented Apr 2, 2021

Hi there! Good idea.

This example is close to the essence of a remark lint rule: https://unifiedjs.com/learn/guide/create-a-plugin/.
As you’re offering though, a similar guide “Create a remark lint rule”, would indeed be useful to have. It could be linked to from this repo.

Nice!

If that works for you, I can put together a PR with a small section in the repo readme.md with a small guide in thedoc/ folder (i.e /doc/create-custom-rule.md)

wooorm pushed a commit that referenced this issue Apr 7, 2021
Closes GH-261.
Closes GH-262.

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
@wooorm wooorm added ⛵️ status/released 📚 area/docs This affects documentation and removed 🙉 open/needs-info This needs some more info 🦋 type/enhancement This is great to have labels Apr 12, 2021
@wooorm wooorm added the 💪 phase/solved Post is done label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done
Development

Successfully merging a pull request may close this issue.

2 participants