DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
897 stars 166 forks source link

Make markdownlint lib available for require() in custom rules #253

Closed NomarCub closed 1 year ago

NomarCub commented 1 year ago

It would make custom rules from local files more portable if you can depend on the helpers, which you can with the normal cli, if you have it as a global npm package.

See more about the rationale in this issue: https://github.com/DavidAnson/markdownlint/issues/576

DavidAnson commented 1 year ago

My relevant comment from the linked issue:

Yes. Go ahead and open an issue, though I'm still not sure how it would be addressed. Without a versioning story, exposing the helpers library to custom rules in VS Code extension context could lead to breaks any time a new extension is released. (The custom rules API is deliberately simple and static to try to avoid problems around versioning.) I don't want to try to reimplement a package manager for this scenario when it's pretty straightforward to bundle helpers.js alongside the rule implementation.