Validate codeblock URLs during build and streamline CI lints#3020
Open
Validate codeblock URLs during build and streamline CI lints#3020
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
In |
a11c901 to
e794dc6
Compare
- Add scripts/check-codeblock-links.ts to validate clerk.com/docs URLs in code block comments against built docs - Fix 4 outdated URLs found by the new checker - Update .github/workflows/lint.yml to run all lint checks after build - Add lint:check-codeblock-links script to package.json Co-Authored-By: Claude Opus 4.5 <[email protected]>
Move codeblock URL validation from standalone script into the existing validateLinks remark plugin. This validates clerk.com/docs URLs in code block comments during the build process. Changes: - Add codeblock URL validation to validateLinks.ts - Detect URLs that redirect and suggest the correct path - Preserve hash fragments in redirect suggestions - Add 'link-redirects' error message - Pass redirects to validateLinks for redirect chain resolution - Remove standalone check-codeblock-links.ts script Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
7bf9d01 to
ae58e94
Compare
Remove build step from lint workflow and run only lints that don't require built artifacts: formatting, frontmatter, duplicate redirects, SVGs, and images. Build-dependent validations (like codeblock URL checking) run as part of the build process itself. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Contributor
Author
Done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
These upstream changes will need to be merged before the build will pass (because they contain broken or out-od-date urls):
chore: Update API ErrorsPR (like this one)Summary
clerk.com/docsURLs found in code block commentsWhat changed?
Build-time codeblock URL validation
Updated
scripts/lib/plugins/validateLinks.tsto validateclerk.com/docsURLs found in code block comments during the build process:https://clerk.com/docs/*CI workflow changes
Updated
.github/workflows/lint.ymlto run all lints that don't require a build:lint:formatting- Prettier checklint:check-frontmatter- Frontmatter validationlint:check-duplicate-redirects- Duplicate redirect checklint:check-svgs- SVG optimization checklint:check-images- Image reference checkLints requiring a build (
lint:check-redirects) are now validated as part of the build process itself.Fixed URLs
Fixed outdated
clerk.com/docsURLs found in code blocks:/docs/quickstarts/nextjs→/docs/nextjs/getting-started/quickstart/docs/custom-flows/error-handling→/docs/guides/development/custom-flows/error-handling/docs/reference/tanstack-react-start/custom-sign-in-or-up-page→/docs/guides/development/custom-sign-in-or-up-page/docs/references/backend/types/auth-object→/docs/reference/backend/types/auth-object/docs/authentication/enterprise-connections/authentication-flows→/docs/guides/configure/auth-strategies/enterprise-connections/authentication-flowsTest plan
pnpm run buildpnpm run lint🤖 Generated with Claude Code