[GH-ISSUE #593] Docs: document how to extend from a built-in style #467

Closed
opened 2026-03-03 01:27:11 +03:00 by kerem · 1 comment
Owner

Originally created by @JoshuaKGoldberg on GitHub (Oct 2, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/593

Following #592: https://github.com/DavidAnson/markdownlint#optionsconfig mentions that you can extend from premade styles and includes an example of how to do so with a CommonJS require(). But, the docs don't show:

For example, I tried this in a JSON config file:

{
  "extends": "markdownlint/style/all.json"
}

...but that didn't do anything.

Could this be documented, please? I'm happy to send in docs myself... if someone tells me how to do these things 😄

Originally created by @JoshuaKGoldberg on GitHub (Oct 2, 2022). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/593 Following #592: https://github.com/DavidAnson/markdownlint#optionsconfig mentions that you can extend from premade styles and includes an example of how to do so with a CommonJS `require()`. But, the docs don't show: * How to do so in a JSON file * How to extend from one of the prebuilt styles in https://github.com/DavidAnson/markdownlint/blob/main/style For example, I tried this in a JSON config file: ```json { "extends": "markdownlint/style/all.json" } ``` ...but that didn't do anything. Could this be documented, please? I'm happy to send in docs myself... if someone tells me how to do these things 😄
kerem 2026-03-03 01:27:11 +03:00
Author
Owner

@DavidAnson commented on GitHub (Oct 2, 2022):

In general, an explicit path or a module identifier can be specified. In this case, the somewhat recent addition of package.json/exports may block the syntax you show. Module resolution will also depend on the context in which it is invoked. The most reliable mechanism, may be to copy one of the example styles into your project and reference it from there.

<!-- gh-comment-id:1264574514 --> @DavidAnson commented on GitHub (Oct 2, 2022): In general, an explicit path or a module identifier can be specified. In this case, the somewhat recent addition of `package.json/exports` may block the syntax you show. Module resolution will also depend on the context in which it is invoked. The most reliable mechanism, may be to copy one of the example styles into your project and reference it from there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#467
No description provided.