Skip to content

#21: deprecation warning for the rules config alias - #36

Merged
devill merged 2 commits into
mainfrom
issue-21-rules-deprecation
Jun 17, 2026
Merged

#21: deprecation warning for the rules config alias#36
devill merged 2 commits into
mainfrom
issue-21-rules-deprecation

Conversation

@devill

@devill devill commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #21.

Phase 3a introduced the canonical smells config field but kept the old rules field as a transitional alias. Per the locked migration plan, this is the one-release deprecation step — not the hard removal.

Locked decision — option (a)

  • rules is still accepted (schema + merge unchanged; smells still wins on conflict).
  • A config using rules now emits a clear deprecation warning on stderr (RULES_DEPRECATION), detected in buildContext and surfaced via RunResult.stderr (the CLI prints stderr).
  • Internal incidental test configs migrated to smells; the alias-behavior tests (registry precedence, load.test loading/validation) intentionally keep rules.
  • Hard removal scheduled as a later issue (noted in DECISIONS.md).

Atomic commits

  1. #21: migrate internal test configs from rules to smells — behaviour-preserving renames of the incidental writeConfig setups (eslint-config rules left untouched).
  2. #21: warn when a config uses the deprecated rules field — the warning + a dedicated test asserting it fires for rules and not for smells, plus the DECISIONS note.

Gates

  • pnpm build, pnpm lint — clean (runner.ts at the 200 cap)
  • pnpm test — 387 passed (+2)

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits June 16, 2026 23:08
Rename the incidental habit-hooks config setups (the writeConfig helpers
that disable/override smells) from the deprecated `rules` alias to the
canonical `smells` field. Behaviour-preserving; the only remaining
`rules` usages are the tests that intentionally cover the alias.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
A config using `rules` still works (it folds with `smells` winning), but
now emits a one-line deprecation warning on stderr so consumers know to
rename it. Detected in buildContext and surfaced via RunResult.stderr.
Hard removal of `rules` is a scheduled follow-up (DECISIONS.md).

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:39
@devill
devill merged commit 14848ab into main Jun 17, 2026
2 checks passed
@devill
devill deleted the issue-21-rules-deprecation 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.

Remove the transitional 'rules' config alias (canonical field is 'smells')

2 participants