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

feat: check code examples syntax #7396

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

araujogui
Copy link
Member

@araujogui araujogui commented Jan 8, 2025

Description

Check if JavaScript code blocks have valid syntax using the acorn parser. We could use Node's vm module to execute the code, but I feel it would be slower and wouldn't work with incomplete code examples.

Validation

Manually edit any code example to broken code

Related Issues

Fixes #7293

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@araujogui araujogui requested a review from a team as a code owner January 8, 2025 18:47
Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jan 8, 2025 7:09pm

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM just one question

apps/site/next.mdx.shiki.mjs Outdated Show resolved Hide resolved
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.

Make sure all code examples are runnable
3 participants