#21: deprecation warning for the rules config alias - #36
Merged
Conversation
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
marked this pull request as ready for review
June 17, 2026 14:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21.
Phase 3a introduced the canonical
smellsconfig field but kept the oldrulesfield as a transitional alias. Per the locked migration plan, this is the one-release deprecation step — not the hard removal.Locked decision — option (a)
rulesis still accepted (schema + merge unchanged;smellsstill wins on conflict).rulesnow emits a clear deprecation warning on stderr (RULES_DEPRECATION), detected inbuildContextand surfaced viaRunResult.stderr(the CLI prints stderr).smells; the alias-behavior tests (registry precedence,load.testloading/validation) intentionally keeprules.DECISIONS.md).Atomic commits
#21: migrate internal test configs from rules to smells— behaviour-preserving renames of the incidentalwriteConfigsetups (eslint-configrulesleft untouched).#21: warn when a config uses the deprecated rules field— the warning + a dedicated test asserting it fires forrulesand not forsmells, 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