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

docs(front-matter): improve docs for stabilization #4789

Merged
merged 23 commits into from
May 28, 2024

Conversation

magurotuna
Copy link
Member

@magurotuna magurotuna commented May 21, 2024

This commit improves docs of the front-matter module.

Specifically, the following things are done:

  • Use @example where appropriate to render the examples more beautifully
  • Split the big example attached to createExtractor function into smaller pieces so that each one has minimal yet meaningful example
  • Add @returns to the test function
  • Deduplicate Format type definition
  • Add a brief description to Format type

Towards #3764

@magurotuna magurotuna requested a review from kt3k as a code owner May 21, 2024 07:04
@CLAassistant
Copy link

CLAassistant commented May 21, 2024

CLA assistant check
All committers have signed the CLA.

@magurotuna magurotuna changed the title docs(front_matter): improve docs for stabilization docs(front-matter): improve docs for stabilization May 21, 2024
Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.35%. Comparing base (083b63f) to head (d919f94).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4789      +/-   ##
==========================================
- Coverage   92.36%   92.35%   -0.01%     
==========================================
  Files         487      487              
  Lines       41539    41539              
  Branches     5405     5405              
==========================================
- Hits        38366    38364       -2     
- Misses       3117     3119       +2     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Few nits. Could you please also rebase? We just added support for checking class docs.

front_matter/create_extractor.ts Show resolved Hide resolved
front_matter/create_extractor.ts Outdated Show resolved Hide resolved
front_matter/create_extractor.ts Outdated Show resolved Hide resolved
front_matter/create_extractor.ts Outdated Show resolved Hide resolved
front_matter/test.ts Outdated Show resolved Hide resolved
front_matter/test.ts Outdated Show resolved Hide resolved
@kt3k kt3k mentioned this pull request May 23, 2024
38 tasks
@magurotuna magurotuna requested a review from iuioiua May 24, 2024 14:36
Comment on lines +117 to +124
import { extract as extractJson } from "./json.ts";
import { extract as extractToml } from "./toml.ts";
import { extract as extractYaml } from "./yaml.ts";

export * from "./create_extractor.ts";
export * from "./test.ts";

export { extractJson, extractToml, extractYaml };
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: it looks like exporting these is needed to get the links like {@linkcode extractJson | extract} used in the module level doc to work correctly.

Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Few suggestions. I realise we need tweak the Super Linter to check code snippets in non-@example JSDocs. I'll do that then update this PR.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I won't block this PR. LGMT!

@magurotuna magurotuna merged commit d13ef17 into denoland:main May 28, 2024
12 checks passed
@magurotuna magurotuna deleted the magurotuna/frontmatter-doc branch May 28, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants