You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 37736dd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ Path-shape regexps and their helpers live in `lib/util/identifier.js`: **import
111
111
112
112
> [!REQUIRED]
113
113
114
-
**Never add a `_`-prefixed export** (`module.exports._foo`), in a `syntax-parser.js` or anywhere in `lib/`, to share an internal helper with a sibling file: every export is reachable from the package, so other developers come to depend on it and it can't change freely. Keep the helper in the one file that uses it, or move the logic so one file owns it. The exception is a helper useful in its own right, exported under a public name with full JSDoc, as the HTML and CSS `escape*` / `decode*` helpers are.
114
+
**Never add a `_`-prefixed export** (`module.exports._foo`) to any file in the project to share an internal helper with another file: every export is reachable, so other developers come to depend on it and it can't change freely. Keep the helper in the one file that uses it, or move the logic so one file owns it; a helper useful in its own right is exported under a public name with full JSDoc instead, as the HTML and CSS `escape*` / `decode*` helpers are. **The only exception is testing**: a private export a test needs to reach code no public entry point can.
0 commit comments