Skip to content

Commit 6d024d1

Browse files
committed
test(lint): drop the cycle-guard test; a disabled rule is a review question
The test linted a fixture to prove import-x/no-cycle was still effective. Whether the rule is on is visible in the eslint.config.js diff and belongs in code review, not in a test that builds a TS program on every run and writes into packages/cli/src while other tests read it.
1 parent 9795359 commit 6d024d1

3 files changed

Lines changed: 2 additions & 118 deletions

File tree

‎.gitignore‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,3 @@ __pycache__/
4646

4747
# Agent and manual git worktrees (full second checkouts; see worktrees-pnpm skill)
4848
worktrees/
49-
50-
# Scratch fixture written by `packages/cli/test/import-cycle-lint.test.ts`. That
51-
# test writes a real a.ts <-> b.ts cycle INSIDE `packages/cli/src` and asserts
52-
# `import-x/no-cycle` reports it. The location is forced, not a convenience: the
53-
# rule only sees files the flat config matches, and the type-aware block needs
54-
# the file inside a tsconfig (`packages/cli/tsconfig.json` includes `src`) — a
55-
# fixture in the OS temp dir is refused as outside the config base path, and one
56-
# elsewhere in the repo fails to parse and reports zero cycles, which is the
57-
# vacuous green the test exists to rule out. Cleanup runs in `afterAll`, so a
58-
# killed run (Ctrl+C, OOM, CI cancellation) can strand a live cycle in the
59-
# source tree. This keeps that debris out of commits; delete the directory, not
60-
# this line.
61-
/packages/cli/src/__cycle-guard-*/

‎eslint.config.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ export default tseslint.config(
123123
// the rule resolves our files correctly, walks into them, finds nothing,
124124
// and reports no cycles — on a tree that provably contains one. A lint
125125
// run that is green because the rule is inert looks exactly like a lint
126-
// run that is green because the code is clean, which is why the
127-
// reintroduced-cycle check in this PR's description exists.
126+
// run that is green because the code is clean, so treat a change to
127+
// this list as a change to whether the rule runs at all.
128128
"import-x/extensions": [
129129
".ts",
130130
".tsx",

‎packages/cli/test/import-cycle-lint.test.ts‎

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)