-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @example for defaultConfig #261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
lib/context.js
Outdated
* @example <caption>Using a <code>defaultConfig</code> object.</caption> | ||
* | ||
* // Load config from .github/myapp.yml in the repository and combine with default config | ||
* const config = await context.config('myapp.yml', {comment: 'Make sure to check all the specs.'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ;
is ❌ for standard
Also weird there are other places in this file not standard linted 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hiimbex Good catch 👌 I think the reason we're seeing these not get linted is that the example code is actually in a comment instead of just being in the file itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an eslint plugin to check jsdoc comments similar to #252?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkeepers a quick search seems to show plugins for linting JSDoc comments, but not specifically code in JSDoc examples.
I'll remove the ;
in the snippets relevant to this PR, but it should obviously be consistent everywhere. Separate PR or this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having a vision of additional functionality for probot/linter lol. I'd go with separate 👍
Fixes #256 - add a JSDoc
@example
for using thecontext.config()
method with adefaultConfig
object. I did build the docs locally, LGTM but feel free to check it out yourself.🐟