Skip to content

feat: support Next.js/Nuxt.js-style dynamic route parameters in patterns #44

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

Conversation

azhukov-gyg
Copy link

This PR adds support for Next.js/Nuxt.js-style dynamic route parameters in CODEOWNERS patterns, addressing issue #42.

Modern web frameworks like Next.js and Nuxt.js use square brackets [paramName] in file and directory names to denote dynamic route parameters. This is a fundamental pattern in these frameworks' file-based routing systems.
Examples:

/pages/users/[userId].js              # Dynamic user page
/pages/[category]/[productId].js      # Dynamic product in category
/api/[supplierId]/performance/*.ts    # API endpoints with supplier context

Currently, CODEOWNERS rejects such patterns with an error:

unexpected character '[' at position X

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.

1 participant