[GH-ISSUE #112] shareable config from an npm package #1944

Closed
opened 2026-03-07 20:02:59 +03:00 by kerem · 7 comments
Owner

Originally created by @travi on GitHub (Mar 18, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/112

if this is already supported, sorry for the noise, but from the docs and the code that i've looked through, it appears that the current shareable config capability assumes that the config file to be extended is a local file.

i'd like to put together an npm package that i use across my projects, but i'm just wanting to confirm support before i put in the effort. ideally, i'd love for support to follow the conventions that have emerged in projects like eslint, commitlint, semantic-release, and others where a package named <tool-name>-config-<config-name> could be extended by using "extends": "<config-name>". for a concrete example, i'd like to publish markdownlint-config-travi and use it in my .markdownlintrc as "extends": "travi"

is this possible today? if not, would it be an enhancement that you'd consider?

Originally created by @travi on GitHub (Mar 18, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/112 if this is already supported, sorry for the noise, but from the docs and the code that i've looked through, it appears that the current shareable config capability assumes that the config file to be extended is a local file. i'd like to put together an npm package that i use across my projects, but i'm just wanting to confirm support before i put in the effort. ideally, i'd love for support to follow the conventions that have emerged in projects like eslint, commitlint, semantic-release, and others where a package named `<tool-name>-config-<config-name>` could be extended by using `"extends": "<config-name>"`. for a concrete example, i'd like to publish `markdownlint-config-travi` and use it in my [`.markdownlintrc`](https://github.com/igorshubovych/markdownlint-cli#configuration) as `"extends": "travi"` is this possible today? if not, would it be an enhancement that you'd consider?
kerem 2026-03-07 20:02:59 +03:00
Author
Owner

@DavidAnson commented on GitHub (Mar 18, 2018):

This is not possible today, but makes sense to investigate. I haven’t decided if it belongs here or in the CLI project, so I will leave it here for now.

If you are impatient, you can probably approximate this today with a relative path into the config project in the node_modules folder.

For future reference: https://eslint.org/docs/developer-guide/shareable-configs

<!-- gh-comment-id:373971515 --> @DavidAnson commented on GitHub (Mar 18, 2018): This is not possible today, but makes sense to investigate. I haven’t decided if it belongs here or in the CLI project, so I will leave it here for now. If you are impatient, you can probably approximate this today with a relative path into the config project in the `node_modules` folder. For future reference: https://eslint.org/docs/developer-guide/shareable-configs
Author
Owner

@travi commented on GitHub (Mar 18, 2018):

thanks for being open to considering it. i'm not incredibly impatient around this, but i wanted to at least get it on the radar. i might be able to find time to help out if you'd want a contribution for this.

<!-- gh-comment-id:373971922 --> @travi commented on GitHub (Mar 18, 2018): thanks for being open to considering it. i'm not incredibly impatient around this, but i wanted to at least get it on the radar. i might be able to find time to help out if you'd want a contribution for this.
Author
Owner

@DavidAnson commented on GitHub (Mar 18, 2018):

Cool. I just need to think about it first. Most of my time recently went towards adding custom rule support.

<!-- gh-comment-id:373972154 --> @DavidAnson commented on GitHub (Mar 18, 2018): Cool. I just need to think about it first. Most of my time recently went towards adding custom rule support.
Author
Owner

@travi commented on GitHub (Apr 4, 2018):

in case it is helpful, i've noticed several packages that i use are using cosmicconfig to handle pulling in config from various optional locations. i've also run across ex-config that is intended to work with cosmicconfig for extending other config.

<!-- gh-comment-id:378707726 --> @travi commented on GitHub (Apr 4, 2018): in case it is helpful, i've noticed several packages that i use are using [cosmicconfig](https://github.com/davidtheclark/cosmiconfig) to handle pulling in config from various optional locations. i've also run across [ex-config](https://github.com/chrisblossom/ex-config) that is intended to work with `cosmicconfig` for extending other config.
Author
Owner

@DavidAnson commented on GitHub (Apr 4, 2018):

Appreciate it, I’ll look at this when the time comes!

<!-- gh-comment-id:378729869 --> @DavidAnson commented on GitHub (Apr 4, 2018): Appreciate it, I’ll look at this when the time comes!
Author
Owner

@travi commented on GitHub (Oct 24, 2018):

my needs ended up becoming more complex, so i ended up switching to remark. i'll close since i wont need this anymore, but certainly feel free to reopen if you still think this will be useful for the project.

<!-- gh-comment-id:432494949 --> @travi commented on GitHub (Oct 24, 2018): my needs ended up becoming more complex, so i ended up switching to remark. i'll close since i wont need this anymore, but certainly feel free to reopen if you still think this will be useful for the project.
Author
Owner

@DavidAnson commented on GitHub (Oct 24, 2018):

Okay, thanks. Glad you found something that suits your needs!

<!-- gh-comment-id:432496510 --> @DavidAnson commented on GitHub (Oct 24, 2018): Okay, thanks. Glad you found something that suits your needs!
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#1944
No description provided.