[GH-ISSUE #825] [Feature] Global config #2389

Closed
opened 2026-03-07 20:07:20 +03:00 by kerem · 3 comments
Owner

Originally created by @TheElegantCoding on GitHub (May 20, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/825

it will be nice to have a global configuration and then a locla configuration for a project, this method is common in eslitn when you set a config file in your root or home direcory of the machine like ~/ for linux and C:\Users\{ user } for windows, here we can have a file for .markdownlint.json and have a global config for all the repos, if for some reason i need to change in a repo the rules, i just create another config file in the root of the directory and this rules are overrired

Originally created by @TheElegantCoding on GitHub (May 20, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/825 it will be nice to have a global configuration and then a locla configuration for a project, this method is common in eslitn when you set a config file in your root or home direcory of the machine like `~/` for linux and `C:\Users\{ user }` for windows, here we can have a file for `.markdownlint.json` and have a global config for all the repos, if for some reason i need to change in a repo the rules, i just create another config file in the root of the directory and this rules are overrired
kerem 2026-03-07 20:07:20 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (May 20, 2023):

As a library, you can fetch configuration from wherever you want when calling the API. If you are using one of the CLIs, .markdownlint.json supports "~" in extends paths which can be used to reference the user's home directory in the usual manner. This should allow the behavior you describe.

<!-- gh-comment-id:1555945370 --> @DavidAnson commented on GitHub (May 20, 2023): As a library, you can fetch configuration from wherever you want when calling the API. If you are using one of the CLIs, `.markdownlint.json` supports "~" in `extends` paths which can be used to reference the user's home directory in the usual manner. This should allow the behavior you describe.
Author
Owner

@TheElegantCoding commented on GitHub (May 26, 2023):

Thanks, yes this works, still I have to create a file in every project but for now works, it will be nice to avoid that and also there can be problems in a team when a new member download the repo he will no have the file in his home directory, is there a way to create a repo with a custom config and extended ?

<!-- gh-comment-id:1563784205 --> @TheElegantCoding commented on GitHub (May 26, 2023): Thanks, yes this works, still I have to create a file in every project but for now works, it will be nice to avoid that and also there can be problems in a team when a new member download the repo he will no have the file in his home directory, is there a way to create a repo with a custom config and extended ?
Author
Owner

@DavidAnson commented on GitHub (May 26, 2023):

You may be able to use a template in GitHub or scaffold with something like Yeoman. Anything like that would be out of scope for this project, though.

<!-- gh-comment-id:1563806936 --> @DavidAnson commented on GitHub (May 26, 2023): You may be able to use a template in GitHub or scaffold with something like Yeoman. Anything like that would be out of scope for this project, though.
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#2389
No description provided.