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

ci: typecheck code samples in docs #25777

Merged
merged 8 commits into from Feb 15, 2024
Merged

ci: typecheck code samples in docs #25777

merged 8 commits into from Feb 15, 2024

Conversation

antfu
Copy link
Member

@antfu antfu commented Feb 13, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR adds typecheck for TwoSlash blocks in our docs Markdown. Follow up on #25679 to make it easier to work with without linking to nuxt.com repo. This would help us provide code examples that are type-safe in the future.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented Feb 13, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

nuxt-studio bot commented Feb 13, 2024

βœ… Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio β†—οΈŽ View Live Preview 66149b1

.nuxtrc Show resolved Hide resolved
@antfu antfu changed the title docs: CI for verify types in docs docs: enable CI for verifing types in docs Feb 14, 2024
Comment on lines +35 to +40

- name: Build Nuxt
run: pnpm build

- name: Typecheck (docs)
run: pnpm typecheck:docs
Copy link
Member

Choose a reason for hiding this comment

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

Maybe there is an opportunity here to move docs workflow back into main ci.yml but use tj-actions/changed-files instead to granularly enable workflows.

@danielroe danielroe changed the title docs: enable CI for verifing types in docs ci: typecheck code samples in docs Feb 15, 2024
@danielroe danielroe merged commit 3f882c9 into main Feb 15, 2024
36 of 37 checks passed
@danielroe danielroe deleted the docs/twoslash-verify branch February 15, 2024 10:07
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
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

2 participants