Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github/ @TanStack/tanstack-core
.nx/ @TanStack/tanstack-core
nx.json @TanStack/tanstack-core
.changeset/config.json @TanStack/tanstack-core
scripts/ @TanStack/tanstack-core
.npmrc @TanStack/tanstack-core
Comment on lines +1 to +6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

GitHub Codeowners unanchored directory pattern matches directories at all levels leading slash root only

💡 Result:

GitHub CODEOWNERS patterns follow most rules used in gitignore files, but their directory matching behavior depends on how they are anchored and whether wildcards are used [1][2][3]. A pattern is anchored to the root of the repository if it starts with a leading slash (/) [3]. Patterns without a leading slash are unanchored and match at any depth in the repository [3][4]. Regarding directory matching: 1. Unanchored directory patterns: A pattern like dir/ (without a leading slash) matches a directory named dir at any level in the repository hierarchy [3][4]. 2. The * wildcard limit: A pattern using a single asterisk, such as docs/*, matches files directly within the specified directory but does not recursively match files in nested subdirectories [1][5]. This is consistent with how gitignore handles single-level globbing [6]. 3. Recursive matching: To match all files and subdirectories within a directory at any depth, you must use the double asterisk syntax (e.g., docs/) [6][3][5]. In summary, an unanchored pattern does not restrict matching to the root; it matches anywhere in the repository [3]. However, simply naming a directory followed by /* will not provide the recursive matching behavior that users often expect for directory trees; for that, / is required [1][6][3][5].

Citations:


Anchor repository-root paths.

If these rules target only root-level configuration and tooling, add / before each rooted path. Unanchored directory patterns match the same directory name anywhere in the repository.

Proposed fix
-.github/ `@TanStack/tanstack-core`
-.nx/ `@TanStack/tanstack-core`
-nx.json `@TanStack/tanstack-core`
-.changeset/config.json `@TanStack/tanstack-core`
-scripts/ `@TanStack/tanstack-core`
-.npmrc `@TanStack/tanstack-core`
+/.github/ `@TanStack/tanstack-core`
+/.nx/ `@TanStack/tanstack-core`
+/nx.json `@TanStack/tanstack-core`
+/.changeset/config.json `@TanStack/tanstack-core`
+/.npmrc `@TanStack/tanstack-core`
+/scripts/ `@TanStack/tanstack-core`
/.changeset/config.json `@TanStack/tanstack-core`
/.npmrc `@TanStack/tanstack-core`
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/CODEOWNERS around lines 1 - 6, Anchor each repository-root
CODEOWNERS pattern by adding a leading slash to the entries for .github, .nx,
nx.json, .changeset/config.json, scripts, and .npmrc, so they match only those
root-level paths.

Loading