🚚 Home test helpers behind #test-utils/*
src/util/__tests__/ holds shared test helpers, reached from anywhere in the source tree as `#test-utils/<name>.ts` through package.json#imports. A bare `~/…` is not a valid imports key — Node requires `#` — and a direction-free specifier keeps import/no-relative-parent-imports from ever firing. The `__tests__` folder name is the pattern tsconfig.build.json already excludes, so helpers can never ship. Lint scoping: import/no-nodejs-modules off for the folder (the probe spawns a language server) and typescript/promise-function-async off to match its promise-returning style. The LSP probe moves in from scripts/; a smoke test pins the specifier's resolution and typing without starting a server.
This commit is contained in:
1 parent
ee146ce350
commit
9e5522c131
4 files changed
+398
-1
No files matched your search
@@ -27,6 +27,9 @@
|
||||
],
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"imports": {
|
||||
"#test-utils/*": "./src/util/__tests__/*"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
Reference in new issue
Block a user