$ npm list -g
~/.config/nvm/versions/node/v18.12.1/lib
├── markdown-it-admon@1.0.0
Next I specify `.markdownlint-cli2.yaml
markdownItPlugins:
-
- "markdown-it-admon"
But this merely results in the error
[15:31:22] ERROR: Exception while linting with markdownlint-cli2:
AggregateError: Unable to require or import module 'markdown-it-admon'.
at w (~/.vscode/extensions/davidanson.vscode-markdownlint-0.51.0/bundle.js:37:6909)
at async Promise.all (index 0)
at async A (~/.vscode/extensions/davidanson.vscode-markdownlint-0.51.0/bundle.js:37:7092)
at async Promise.all (index 1)
at async L (~/.vscode/extensions/davidanson.vscode-markdownlint-0.51.0/bundle.js:37:9738)
at async D (~/.vscode/extensions/davidanson.vscode-markdownlint-0.51.0/bundle.js:37:14195)
A workaround is to use the absolute or relative path to the module directory, which in above case looks something like
Since Admonitions are not supported (https://github.com/DavidAnson/markdownlint/issues/207, https://github.com/DavidAnson/markdownlint/issues/512) one needs to resort to plugins.
I globally installed the plugin
markdown-it-admon
(https://github.com/commenthol/markdown-it-admon) viawhich installed to
Next I specify `.markdownlint-cli2.yaml
But this merely results in the error
A workaround is to use the absolute or relative path to the module directory, which in above case looks something like
This however is not very portable.
Similarly for the use of custom rules
does not work, while
does.
So how do I make the extension aware of my plugin installations by no using something fairly machine specific like a path?