mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 10:18:24 +02:00
* chore: upgrade eslint to v9 latest with compatible lint deps Agent-Logs-Url: https://github.com/lucide-icons/lucide/sessions/f7c1f1b5-d213-4afa-91a8-b799a16397ec * Fix eslint config * Fix a lot of eslint errors * Fix eslint * Fix eslint errors * Fix eslint errors * Fix types * Fix eslint warning * Format code * Add eslint 10 * Remove unused vars * Update pnpm * Update deps --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
23 lines
829 B
TypeScript
23 lines
829 B
TypeScript
import type { AliasDeprecationReason, IconDeprecationReason } from '../types.ts';
|
|
|
|
export default function deprecationReasonTemplate(
|
|
deprecationReason: AliasDeprecationReason | IconDeprecationReason,
|
|
{
|
|
componentName,
|
|
}: {
|
|
componentName: string;
|
|
iconName: string;
|
|
},
|
|
) {
|
|
switch (deprecationReason) {
|
|
case 'alias.typo':
|
|
return `Renamed because of typo, use {@link ${componentName}} instead.`;
|
|
case 'alias.duplicate':
|
|
return `The icon was combined with another icon that shares the same use case, use {@link ${componentName}} instead.`;
|
|
case 'alias.name':
|
|
return `The name of this icon was changed because it didn't meet our guidelines anymore, use {@link ${componentName}} instead.`;
|
|
default:
|
|
throw new Error(`Unknown deprecation reason: ${deprecationReason}`);
|
|
}
|
|
}
|