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 }}
This repository was archived by the owner on Aug 20, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: eslint.config.ts
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,31 @@
1
1
importjsfrom'@eslint/js';
2
2
importtseslintfrom'typescript-eslint';
3
3
importglobalsfrom'globals';
4
+
importtype{Rule}from'eslint';
5
+
6
+
// Forward guard: only src/index.ts may use an index.* basename. Any future module named index.ts/cts/mts/js/cjs/mjs outside the public convenience barrel is a mistake (a hidden entry point the exports map does not advertise). ESLint 9+ guarantees context.filename; the optional getFilename fallback covers an older runtime only.
7
+
constnoNonBarrelIndex: Rule.RuleModule={
8
+
meta: {
9
+
type: 'problem',
10
+
schema: [],
11
+
messages: {
12
+
barrel:
13
+
'Only src/index.ts may be named index.* (the public convenience barrel); give any other module a descriptive filename.',
0 commit comments