feat(eslint-plugin-dialtone): DLT-3314 add deprecated-dialtone-component rule#1200
Conversation
…ent rule Detects imports of deprecated Dialtone components (DtRecipe* and DtIcon) and suggests their replacements.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new ESLint rule that flags deprecated Dialtone components (notably Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/eslint-plugin-dialtone/lib/rules/deprecated-dialtone-component.js`:
- Around line 23-24: The rule's user-facing messages are hardcoded English;
replace the inline strings assigned to deprecatedDialtoneComponent and
deprecatedDtIcon with FTL localization key lookups (e.g., use a localization
helper or constants that reference FTL keys instead of literal English). Update
where the rule emits messages to pass the localization keys (and any
interpolation data like componentName, replacement, package) so message
formatting is done via the existing i18n/localization utility used elsewhere in
the plugin; ensure the keys follow the project's FTL naming convention and that
deprecatedDialtoneComponent and deprecatedDtIcon reference those keys rather
than raw strings.
- Around line 65-67: The current check using importPath.includes(...)
over-matches; update the condition in deprecated-dialtone-component.js to
perform anchored package matching on the importPath variable (e.g. test against
a regex like /^@dialpad\/dialtone(-vue)?(\/|$)/ or compare for exact equality or
startsWith followed by '/' or end-of-string) so only the exact packages
'@dialpad/dialtone-vue' or '@dialpad/dialtone' (and their direct subpaths) are
matched instead of any substring matches like '@dialpad/dialtone-icons/vue3'.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 52d2d191-3afb-4228-ba25-a6ad8426fac2
📒 Files selected for processing (3)
packages/eslint-plugin-dialtone/docs/rules/deprecated-dialtone-component.mdpackages/eslint-plugin-dialtone/lib/rules/deprecated-dialtone-component.jspackages/eslint-plugin-dialtone/tests/lib/rules/deprecated-dialtone-component.js
…component.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
# [1.12.0](eslint-plugin-dialtone/v1.11.2...eslint-plugin-dialtone/v1.12.0) (2026-04-17) ### Features * **Eslint Plugin Dialtone:** DLT-3314 add deprecated-dialtone-component rule ([#1200](#1200)) ([c73b7ee](c73b7ee))
# [9.180.0](dialtone/v9.179.0...dialtone/v9.180.0) (2026-04-17) ### Bug Fixes * **Rich Text Editor:** DP-179947 use URL as display text when inserting link without text ([#1202](#1202)) ([30f2504](30f2504)) ### Documentation * **Modal:** NO-JIRA fix code examples ([#1207](#1207)) ([aedd4a1](aedd4a1)) ### Features * **Eslint Plugin Dialtone:** DLT-3314 add deprecated-dialtone-component rule ([#1200](#1200)) ([c73b7ee](c73b7ee))
Obligatory GIF (super important!)
🛠️ Type Of Change
📖 Jira Ticket
DLT-3314
📖 Description
Adds a new ESLint rule
deprecated-dialtone-componenttoeslint-plugin-dialtonethat detects imports of deprecated Dialtone components and reports the correct replacement.Two categories of deprecations are covered:
DtIcon— the generic icon wrapper component. Should be replaced with a direct named icon import (e.g.DtIconPhoneHangUp) from@dialpad/dialtone-icons/vue3.DtRecipe*components — all recipe components that have been moved to standalone UI-Kit packages (@dialpad/callbarkit,@dialpad/chatkit,@dialpad/navigationkit,@dialpad/workflowkit) or promoted to core Dialtone (@dialpad/dialtone).The rule operates on named
ImportSpecifiernodes (not file paths), so it correctly flags only the deprecated name within a multi-import statement without flagging the whole import.💡 Context
DtRecipe*components were deprecated in favour of UI-Kit packages (see the March 2026 release note).DtIconis being deprecated in favour of direct icon imports for better tree-shaking and static analysability. This rule helps consumers of@dialpad/dialtone-vuecatch usages that need to be migrated.📝 Checklist
For all PRs:
Adds an ESLint rule
deprecated-dialtone-componentthat detects deprecatedDtIconandDtRecipe*imports, reports replacements, and includes implementation, documentation, and tests.