How to use a custom reporter #1173
-
I would like to use remark-lint to lint markdown files in my repo, both in vscode and on CI.
What I want is:
Then I can command-click to open the correct file at the correct line. Currently vscode will sometimes open the wrong file, as there's no absolute path; and it can't go to the correct line.
As a general comment, I find the whole remark-lint ecosystem very confusing to navigate. It seems like the documentation is very fragmented, with little guidance on how to do simple tasks. Anyway, hopefully I can get an answer here. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
If you use remark with VS Code, I recommend https://github.com/remarkjs/vscode-remark. As for how to use remark-cli, use
That means you can do for example |
Beta Was this translation helpful? Give feedback.
-
Thanks @wooorm ! I somehow missed the --report CLI option. How can I specify the reporter in the .remarkrc? I'd prefer to do this in one place, rather than add the CLI argument to ~100 package.jsons. So I have tried these .remarkrcs, referring to https://github.com/unifiedjs/unified-engine/blob/main/doc/options.md#optionsreporter:
I know the .reportrc is being used, because the plugins take effect. But the reporter doesn't. |
Beta Was this translation helpful? Give feedback.
No worries!
You cannot specify reporters in
.remarkrc
Those config files are files on the file system. Different files could have different configuration.
But we can’t use some formatter for this file and some other formatter for some other file.
Why do you have 100
package.json
s?! 🤔🤯