Skip to content

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

Merged
magurotuna merged 23 commits into
denoland:mainfrom
magurotuna:magurotuna/frontmatter-doc
May 28, 2024
Merged

magurotuna merged 23 commits into
denoland:mainfrom
magurotuna:magurotuna/frontmatter-doc

Conversation

@magurotuna

@magurotuna magurotuna commented May 21, 2024 •

Copy link
Copy Markdown
Member

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

CLAassistant commented May 21, 2024 •

Copy link
Copy Markdown

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
@codecov

codecov Bot commented May 21, 2024 •

Copy link
Copy Markdown

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.

@iuioiua iuioiua left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread front_matter/create_extractor.ts Resolved
Comment thread front_matter/create_extractor.ts Resolved
Comment thread front_matter/create_extractor.ts Resolved
Comment thread front_matter/create_extractor.ts Resolved
Comment thread front_matter/test.ts Resolved
Comment thread front_matter/test.ts Resolved
@kt3k kt3k mentioned this pull request May 23, 2024
37 of 38 tasks
@magurotuna
magurotuna requested a review from iuioiua May 24, 2024 14:36
Comment thread front_matter/mod.ts
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
Copy Markdown
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.

@iuioiua iuioiua left a comment

Copy link
Copy Markdown
Contributor

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.

@kt3k kt3k left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@iuioiua iuioiua left a comment

Copy link
Copy Markdown
Contributor

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
@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.

5 participants