Skip to content

#9: init eslint template exempts test files from size rules - #28

Merged
devill merged 1 commit into
mainfrom
issue-9-init-test-file-override
Jun 17, 2026
Merged

#9: init eslint template exempts test files from size rules#28
devill merged 1 commit into
mainfrom
issue-9-init-test-file-override

Conversation

@devill

@devill devill commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #9.

The bundled ESLINT_CONFIG_TEMPLATE turned on max-lines-per-function and max-lines for every file, so a freshly scaffolded consumer's eslint . / pnpm lint fired on test files that habit-hooks itself exempts via TEST_FILE_EXCLUDE.

Change

Append a test-file override block to the template using the same glob list as TEST_FILE_EXCLUDE (['**/*.test.ts', '**/*.spec.ts', 'tests/**']), turning the two size rules off so the init layer and the habit-hooks rule layer agree.

Atomic commits

  • #9: exempt test files from size rules in init eslint template — adds the override block and a test asserting the template embeds the glob list and the two off rules.

Gates

  • pnpm build, pnpm lint (eslint .) — clean
  • pnpm test — 386 passed (+1 new)

🤖 Generated with Claude Code


Generated by Claude Code

Mirror TEST_FILE_EXCLUDE so a freshly scaffolded consumer's `pnpm lint`
does not fire max-lines / max-lines-per-function on test files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
@devill
devill marked this pull request as ready for review June 17, 2026 14:37
@devill
devill merged commit ba35ac1 into main Jun 17, 2026
2 checks passed
@devill
devill deleted the issue-9-init-test-file-override 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.

init template missing test-file override → consumers' tests trip size rules under pnpm lint

2 participants