Skip to content

#8: scope.exclude config knob for discoverFiles#31

Merged
devill merged 3 commits into
mainfrom
issue-8-scope-exclude
Jun 17, 2026
Merged

#8: scope.exclude config knob for discoverFiles#31
devill merged 3 commits into
mainfrom
issue-8-scope-exclude

Conversation

@devill

@devill devill commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #8.

discoverFiles used a hardcoded ignore set (node_modules, dist, coverage) and swept tests/fixtures/**, so a self-run tripped 26 eslint:fatal violations on the fixture subtree (which has its own tsconfig).

Fix (locked decision — option b)

Add an explicit scope.exclude: string[] config knob, unioned onto the built-in ignore set in discoverFiles. Not .gitignore-based. Default behaviour unchanged when unset. The repo's own config now sets scope.exclude: ['tests/fixtures/**'], and node dist/cli.js --all reports 0 fixture violations.

Atomic commits

  1. #8: extract file discovery into its own module — pure move of FILE_GLOBS + discoverFiles from runner.ts (which was at the max-lines: 200 limit) into src/discover.ts. No behaviour change.
  2. #8: add scope.exclude knob honored by discoverFiles — schema field + validation + exclude param unioned onto the ignore set + wiring + repo config + a test pinning both the exclude and the unchanged default.
  3. #8: record file-discovery extraction in DECISIONS.md

Gates

  • pnpm build, pnpm lint — clean (runner.ts back under 200 lines)
  • pnpm test — 387 passed (+2 new)
  • Self-run node dist/cli.js --all — 0 tests/fixtures violations

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits June 17, 2026 16:47
verbatim. Pure relocation, no behaviour change; runner.ts was at the
200-line limit, and discovery is a distinct responsibility.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
Union an optional scope.exclude glob array onto the built-in ignore set
so consumers can keep fixture/sample subtrees out of discovery. Default
behaviour is unchanged when unset. This repo excludes tests/fixtures/**
so a self-run stops tripping eslint:fatal on the fixture subtree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
@devill
devill force-pushed the issue-8-scope-exclude branch from 2b52bb8 to 03da486 Compare June 17, 2026 14:48
@devill
devill marked this pull request as ready for review June 17, 2026 14:49
@devill
devill merged commit 6e5ede3 into main Jun 17, 2026
2 checks passed
@devill
devill deleted the issue-8-scope-exclude branch June 19, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

discoverFiles sweeps tests/fixtures/** → eslint:fatal on consumer's own habit-hooks run

2 participants