-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
base: main
Are you sure you want to change the base?
fix: lint-snippets glob #7686
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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 ReportAll modified and coverable lines are covered by tests ✅
✅ 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. 🚀 New features to boost your workflow:
|
Description
The
lint-snippets
script wasn't detecting JavaScript syntax errors due to an incorrect glob pattern, so I fixed thecwd
and added logging for the number of Markdown files found.Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.