vscode-markdownlint icon indicating copy to clipboard operation
vscode-markdownlint copied to clipboard

Allow the extends configuration to use remote files

Open lvlcn-t opened this issue 1 year ago • 2 comments

Issue

Currently, the markdownlint.config.extends configuration only supports local configuration files. This means that if you want to use the same configuration across multiple repositories, you need to copy the configuration file to each repository or rather have it included in the repo templates. This is not ideal as this adds yet another file to the repository and makes it harder to maintain a consistent configuration across multiple repositories.

Proposed Solution

Allow the use of a remote configuration file, like a github repository. This would allow for a centralized configuration file that can be used across multiple repositories.

Example VSCode Configuration

{
  "markdownlint.config": {
    "extends": "https://raw.githubusercontent.com/DavidAnson/vscode-markdownlint/main/.markdownlint.json"
  }
}

lvlcn-t avatar Apr 13 '24 17:04 lvlcn-t

If you want to share a common configuration file, I recommend using ${userHome} or ${workspaceFolder} per the documentation or referencing something like a common npm package from each project and using the same project-relative path from each of them. I do not plan to support dynamic downloads as proposed here, in part because the performance will be unpredictable and error-prone.

DavidAnson avatar Apr 14 '24 01:04 DavidAnson

Thanks for the quick answer, I will look into your suggestions and see if that'll work for me. I understand the performance concerns with dynamic downloads but I think it wouldn't effect the performance too much if it's only done once when the configuration is loaded. I think this is also what the json and yaml parsers do for the schema files and imo it would be a nice feature to have but I understand if you don't want to implement it.

lvlcn-t avatar Apr 14 '24 15:04 lvlcn-t