Skip to content
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

Merged
merged 3 commits into from
Sep 25, 2017
Merged

Add @example for defaultConfig #261

merged 3 commits into from
Sep 25, 2017

Conversation

JasonEtco
Copy link
Member

Fixes #256 - add a JSDoc @example for using the context.config() method with a defaultConfig object. I did build the docs locally, LGTM but feel free to check it out yourself.

🐟

@JasonEtco JasonEtco requested a review from a team September 20, 2017 12:40
Copy link
Contributor

@anglinb anglinb left a 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.'});
Copy link
Contributor

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 🤔

Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Contributor

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants