Can this be configured in a .remarkrc file?
ndelangen opened this issue · comments
The documentation mentions how to configure with the programmatic API, but not the config-file api.
How do I configure this in my .remarkrc
file?
Here's my .remarkrc
file:
{
"plugins": [
"remark-preset-lint-recommended",
["remark-toc", {
"tight": true,
}],
["remark-lint-list-item-indent", false],
["remark-lint-code", {"js": {
"module": "node_modules/remark-lint-code-eslint",
"options": {
"fix": true
}
}}]
]
}
You’re already using it right!?
But it's not actually adding the tocs..
What could I be doing wrong?
Here's how I'm calling remark:
https://github.com/storybooks/storybook/blob/ndelangen/dev/package.json#L49
In remark . # -- -o to update
, the #
makes the rest of the line into a comment, if you want to generate files, you do need to pass -o, --output
, like so: remark . -o
!
I know, I'm actually running this:
npm run lint:markdown -- -o
Is any markdown reformatted? Maybe -- -o
isn't the proper way to pass flags?
No it appears no markdown is formatted, strange that was working before..
New npm version? I’m note sure, but I think they switched it around before.
So is it working now?
So it DOES work when I change my npm script like so:
"lint:markdown": "DEBUG=\"*\" remark . -o",
Maybe because of the comment? Maybe npm execs like so: remark . # -- -o to update -o
(where the last -o
is added from outside the npm script).
I guess it could be because of the comment, yeah, I'll reset, and try without 👍
remark-toc
is adding the tocs correctly now, thanks. 😎
I will stop adding comments to my npm script and dislike json for configuring even more 😒