remark-github
remark-github copied to clipboard
Missing or invalid `repository` field in `options`
Initial checklist
- [X] I read the support docs
- [X] I read the contributing guide
- [X] I agree to follow the code of conduct
- [X] I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
latest
Link to runnable example
https://codesandbox.io/s/cool-swirles-vbp4nr?file=/src/index.js
Steps to reproduce
as above in codesandbox
Expected behavior
either the repository
field is optional, in which case it should not error, or the docs and code samples should show that it is required
Actual behavior
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
It seems you waited this repository expression for example #2
Did you add options like this?
.use(remarkGithub, [
{
repository: "your-id/your-repo",
}
])
either the repository field is optional, in which case it should not error, or the docs and code samples should show that it is required
It is optional in some environments (Node.js). (In the future Deno or whatever else has alternatives to node:fs
). It can’t be optional in browsers.
I’m not sure how to handle this other than: type-wise and in the typical-case it is optional. In some cases that doesn‘t work and you get a runtime error ASAP when that’s the case.
What do you suggest to these docs? https://github.com/remarkjs/remark-github#optionsrepository
Closing as options.repository
is in several cases optional. Open to hearing on what language you think would make it more clear in which cases it isn’t
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.