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

Add a siteConfig.markdown.onUnusedDirective: 'throw' option #10674

Open
1 of 2 tasks
JLHwung opened this issue Nov 13, 2024 · 2 comments
Open
1 of 2 tasks

Add a siteConfig.markdown.onUnusedDirective: 'throw' option #10674

JLHwung opened this issue Nov 13, 2024 · 2 comments
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Milestone

Comments

@JLHwung
Copy link
Contributor

JLHwung commented Nov 13, 2024

Have you read the Contributing Guidelines on issues?

Description

The siteConfig.markdown.onUnusedDirective: 'throw' option will throw unused markdown directives.

Has this been requested on Canny?

No response

Motivation

In #9394 we have introduced the ability to warn unused markdown directives. This feature is very useful and helps Babel website nailed quite a few markdown directive bugs: babel/website#3013.

Since the warning messages do not fail the build, it would be great to introduce a siteConfig.markdown.onUnusedDirective: 'throw' option so that it can be checked by the website CI.

API design

// docusaurus.config.js
{
  siteConfig: {
    markdown: {
      onUnusedDirective: 'throw'
    }
}

Have you tried building it?

No response

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.
@JLHwung JLHwung added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Nov 13, 2024
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Nov 13, 2024
@slorber slorber added this to the 3.x milestone Nov 18, 2024
@AryanK1511
Copy link

AryanK1511 commented Nov 19, 2024

Hello @slorber ! This issue sounds very interesting to me. Can you assign it to me so that I can start working on it?

@slorber
Copy link
Collaborator

slorber commented Nov 19, 2024

We don't assign issues here because most people claiming issues later ghost us.

If you feel you can handle it on your own, just submit a draft PR directly and we'll give you merge priority and help you bring it to the finish line if your code is not too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

No branches or pull requests

3 participants