Skip to content

fix: lint-snippets glob #7686

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

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

Conversation

araujogui
Copy link
Member

Description

The lint-snippets script wasn't detecting JavaScript syntax errors due to an incorrect glob pattern, so I fixed the cwd and added logging for the number of Markdown files found.

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.

@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 02:31
@araujogui araujogui requested a review from a team as a code owner April 25, 2025 02:31
Copy link

vercel bot commented Apr 25, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Apr 25, 2025 2:32am

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with the lint-snippets script by correcting the glob pattern for identifying markdown files and updating a loop in a test runner markdown file.

  • Updated the cwd parameter in the glob query and added logging for the number of markdown files found.
  • Fixed the iteration syntax in the test-runner markdown file by replacing the incorrect “from” with “of”.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/site/scripts/lint-snippets/index.mjs Updated cwd parameter for glob and added a logging statement.
apps/site/pages/en/learn/test-runner/using-test-runner.md Fixed destructuring syntax in the for-loop for iterating userAgents.
Comments suppressed due to low confidence (2)

apps/site/scripts/lint-snippets/index.mjs:82

  • Ensure that the updated cwd path 'pages/en/learn/' is intended and correctly reflects the directory structure relative to process.cwd().
cwd: 'pages/en/learn/',

apps/site/pages/en/learn/test-runner/using-test-runner.md:88

  • The change from 'from' to 'of' fixes the iteration over the userAgents array. Confirm that this correction aligns with the intended behavior for traversing the array.
for (const { os, ua } of userAgents) {

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.80%. Comparing base (12e56df) to head (a1a2300).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7686      +/-   ##
==========================================
+ Coverage   74.78%   74.80%   +0.02%     
==========================================
  Files          98       98              
  Lines        7840     7840              
  Branches      197      197              
==========================================
+ Hits         5863     5865       +2     
+ Misses       1975     1973       -2     
  Partials        2        2              

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

5 participants