-
Notifications
You must be signed in to change notification settings - Fork 422
Redirect and format check fix #2935
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: master
Are you sure you want to change the base?
Conversation
… validation failures
|
Deployment failed with the following error: Learn More: https://vercel.link/invalid-route-source-pattern |
Modified the pre-commit hook to pass only staged markdown files to markdownlint instead of running it on all files in the project. Changes: - Extract staged markdown files excluding docs/sdk/ - Pass filtered list directly to markdownlint via xargs - Consistent with Prettier formatting approach (staged files only) This ensures developers aren't blocked by markdown issues in files they're not modifying, while still validating all committed changes.
…warning TypeScript's tsc command requires full project context for accurate type checking and cannot be limited to only staged files. This change: - Adds SKIP_TS_CHECK environment variable to bypass the check - Warns users that TypeScript checks the entire project - Provides clear instructions when check fails on unrelated errors - Improves error messages to explain the project-wide scope Usage: - One-time skip: SKIP_TS_CHECK=1 git commit - Permanent skip: export SKIP_TS_CHECK=1 (add to shell profile) This prevents blocking commits due to unrelated TypeScript errors while still allowing teams to enforce TypeScript checking when desired.
…e scope warning" This reverts commit 9ca0617.
Vercel uses path-to-regexp v6.1.0 which requires specific syntax: - The ? modifier only applies to parameters (like :param?), not literals - Using /? at the end of paths is invalid syntax - Vercel handles trailing slashes automatically with strict: false Changes: - Removed /? suffix from all 423 redirect source patterns - Pattern /anytrust/? → /anytrust (now matches both /anytrust and /anytrust/) - Follows path-to-regexp v6.1.0 syntax requirements This fixes the error: "Redirect at index 1 has invalid source pattern /anytrust/?" Refs: https://vercel.com/docs/errors/error-list#invalid-route-source-pattern
Fixed 4 additional patterns that had ? suffix without /: - /sdk-docs/dataEntities/networks? → /sdk-docs/dataEntities/networks - /sdk/introduction? → /sdk/introduction - /sdk/utils_multicall? → /sdk/utils_multicall - /stylus/tools/stylus-cli? → /stylus/tools/stylus-cli These patterns were also invalid in path-to-regexp v6.1.0 syntax. Vercel dev now starts without any pattern validation errors.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 redirect patterns in vercel.json and improves pre-commit validation to properly detect formatting errors before commits are finalized.
- Fixed 428 redirect entries by correcting regex syntax from
"/(path/?)"to"/path/?" - Enhanced pre-commit hook to validate only staged files and properly preserve exit codes
- Added format validation step to catch formatting issues before commit completion
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Removed ` |
| docs/launch-arbitrum-chain/05-customize-your-chain/customize-precompile.mdx | Fixed markdown link syntax from (text)[url] to [text](url) format |
| .husky/pre-commit | Added exit code preservation in time_command, staged-files-only format validation, and selective markdown linting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Added "trailingSlash": false to vercel.json to ensure all URLs with trailing slashes are automatically redirected to their non-trailing-slash equivalents. This provides consistent behavior across all 2,000+ redirects without needing individual /? suffixes on each redirect pattern.
Fix vercel.json redirect patterns and pre-commit validation
This PR should properly handle redirects in
vercel.json, it should also properly detect format or redirect errors on commit, and let the user decide before committing.Redirect Pattern Fixes
"/(path/?)"to"/path/?"Pre-commit Hook Improvements