Document that package.json aliases may target only direct subfolders of src #21
@@ -33,8 +33,8 @@ Inside an area, relative imports of siblings and subfolders are free. `../`
|
||||
is banned in every file, owned or not
|
||||
|
|
||||
(`import/no-relative-parent-imports`). Files no alias owns need no `index.ts`
|
||||
and no alias, and import `./` siblings and subfolders freely. The one alias
|
||||
is `#testing` (`./src/testing/index.ts`): every test imports it by alias, and
|
||||
`tests/` reaches `src/` only through it. Local convention, stricter than the
|
||||
is `#testing` (`./src/testing/index.ts`): tests that use its helpers import
|
||||
|
bot
commented
`AGENTS.md` says every test imports `#testing`, but `src/credentials.test.ts`, `src/opencode.test.ts`, and `src/profiles.test.ts` do not. Limit this to `tests/` (or make the statement true) so the alias policy stays accurate.
> Profile: `codex` · `gpt-5.6-terra`
|
||||
it by alias, and `tests/` reaches `src/` only through it. Local convention, stricter than the
|
||||
general rule above: in this repo, aliases point only at a direct subfolder of
|
||||
`src/` (`"#helpers": "./src/helpers/index.ts"`), and code outside `src/` uses
|
||||
`./` relative imports. `scripts/` is flat: one file per
|
||||
|
||||
Reference in New Issue
Block a user
This new rule says
../is banned in every file, but it remains intests/entrypoints.test.ts,tests/workflow.test.ts, andsrc/run.ts; the listed import rule does not check URL strings. Remove those traversals or narrow and enforce the rule to match its actual scope.