@atlaskit/ads-mcp 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ exports.lintRulesMcpStructuredContent = void 0;
9
9
  *
10
10
  * Structured content for MCP (JSON) for ESLint rule docs from constellation.
11
11
  *
12
- * @codegen <<SignedSource::ef9c19eed4e720ce7570ee24935c3476>>
12
+ * @codegen <<SignedSource::70c36a35137c1dd6f1a626ad947c0f42>>
13
13
  * @codegenCommand yarn build structured-docs
14
14
  */
15
15
  /* eslint-disable no-template-curly-in-string */
@@ -47,7 +47,7 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
47
47
  ruleName: 'ensure-proper-xcss-usage',
48
48
  description: 'This ESLint rule enforces proper usage of the `xcss` prop with compiled Primitives from'
49
49
  }, {
50
- content: "{\"ruleName\":\"expand-motion-shorthand\",\"description\":\"This rule expands `transition` and `animation` CSS shorthand properties into their individual\",\"content\":\"# expand-motion-shorthand\\n\\n## Examples\\n\\nThis rule expands `transition` and `animation` CSS shorthand properties into their individual\\nsub-properties. Expanding shorthands enables the\\n[`use-tokens-motion`](/components/eslint-plugin-design-system/use-tokens-motion/usage)\\nrule to target `transitionDuration`, `transitionTimingFunction`, `animationDuration`, and\\n`animationTimingFunction` individually. This rule auto-fixes the expansion.\\n\\n### Incorrect\\n\\n```jsx\\nconst styles = css({\\n transition: 'opacity 200ms cubic-bezier(0.4, 0, 0, 1) 0ms',\\n ^^^^^^^^^^^\\n animation: 'fade 150ms ease-in 0ms 1 normal none running',\\n ^^^^^^^^^^\\n});\\n```\\n\\n### Correct\\n\\n```jsx\\nconst styles = css({\\n\\ttransitionProperty: 'opacity',\\n\\ttransitionDuration: '200ms',\\n\\ttransitionTimingFunction: 'cubic-bezier(0.4, 0, 0, 1)',\\n\\ttransitionDelay: '0ms',\\n\\tanimationName: 'fade',\\n\\tanimationDuration: '150ms',\\n\\tanimationTimingFunction: 'ease-in',\\n\\tanimationDelay: '0ms',\\n\\tanimationIterationCount: '1',\\n\\tanimationDirection: 'normal',\\n\\tanimationFillMode: 'none',\\n\\tanimationPlayState: 'running',\\n});\\n```\\n\"}",
50
+ content: "{\"ruleName\":\"expand-motion-shorthand\",\"description\":\"This rule expands `transition` and `animation` CSS shorthand properties into their individual\",\"content\":\"# expand-motion-shorthand\\n\\n## Examples\\n\\nThis rule expands `transition` and `animation` CSS shorthand properties into their individual\\nsub-properties. Expanding shorthands enables the\\n[`use-tokens-motion`](/components/eslint-plugin-design-system/use-tokens-motion/usage) rule to\\ntarget `transitionDuration`, `transitionTimingFunction`, `animationDuration`, and\\n`animationTimingFunction` individually. This rule auto-fixes the expansion.\\n\\n### Incorrect\\n\\n```jsx\\nconst styles = css({\\n transition: 'opacity 200ms cubic-bezier(0.4, 0, 0, 1) 0ms',\\n ^^^^^^^^^^^\\n animation: 'fade 150ms ease-in 0ms 1 normal none running',\\n ^^^^^^^^^^\\n});\\n```\\n\\n### Correct\\n\\n```jsx\\nconst styles = css({\\n\\ttransitionProperty: 'opacity',\\n\\ttransitionDuration: '200ms',\\n\\ttransitionTimingFunction: 'cubic-bezier(0.4, 0, 0, 1)',\\n\\ttransitionDelay: '0ms',\\n\\tanimationName: 'fade',\\n\\tanimationDuration: '150ms',\\n\\tanimationTimingFunction: 'ease-in',\\n\\tanimationDelay: '0ms',\\n\\tanimationIterationCount: '1',\\n\\tanimationDirection: 'normal',\\n\\tanimationFillMode: 'none',\\n\\tanimationPlayState: 'running',\\n});\\n```\\n\"}",
51
51
  ruleName: 'expand-motion-shorthand',
52
52
  description: 'This rule expands `transition` and `animation` CSS shorthand properties into their individual'
53
53
  }, {
@@ -67,9 +67,9 @@ var lintRulesMcpStructuredContent = exports.lintRulesMcpStructuredContent = [{
67
67
  ruleName: 'lozenge-badge-appearance-migration',
68
68
  description: 'This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, and'
69
69
  }, {
70
- content: '{"ruleName":"lozenge-badge-tag-labelling-system-migration","description":"This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, migrate","content":"# lozenge-badge-tag-labelling-system-migration\\n\\nThis rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, migrate\\n`<Badge>` component appearance prop to new semantic values, and migrate `<SimpleTag>` and\\n`<RemovableTag>` components to the new `<Tag>` or `<avatarTag>` components as part of the Labelling\\nSystem Phase 1 migration.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\n// Non-bold Lozenge variants should migrate to Tag\\n<Lozenge isBold={false} />\\n<Lozenge /> // no isBold means implicit false\\n\\n// Dynamic isBold expressions require manual review\\n<Lozenge isBold={someVariable} />\\n<Lozenge isBold={condition ? true : false} />\\n\\n// Badge: Old appearance values that need migration\\n<Badge appearance=\\"added\\">{5}</Badge>\\n<Badge appearance=\\"removed\\">{10}</Badge>\\n<Badge appearance=\\"default\\">{3}</Badge>\\n<Badge appearance=\\"primary\\">{7}</Badge>\\n<Badge appearance=\\"primaryInverted\\">{2}</Badge>\\n<Badge appearance=\\"important\\">{99}</Badge>\\n\\n// Badge: Dynamic appearance expressions require manual review\\n<Badge appearance={getStatus()}>{count}</Badge>\\n<Badge appearance={condition ? \'added\' : \'removed\'}>{num}</Badge>\\n\\n// SimpleTag/RemovableTag: Old tag components that need migration\\n<SimpleTag>Hello</SimpleTag>\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n<SimpleTag elemBefore={<Avatar src=\\"x\\" />}>Hello</SimpleTag>\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n<RemovableTag elemBefore={<Avatar />}>Hello</RemovableTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also need migration\\nimport SimpleTag from \'@atlaskit/tag/simple-tag\';\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n\\nimport RemovableTag from \'@atlaskit/tag/removable-tag\';\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n```\\n\\n### Correct\\n\\n```tsx\\n// Non-bold variants should use Tag component with migration_fallback for safe rollout\\n// migration_fallback=\\"lozenge\\" renders as Lozenge when feature flag is off\\n<Tag text=\\"Label\\" color=\\"lime\\" isRemovable={false} migration_fallback=\\"lozenge\\" />\\n<Tag text=\\"Status\\" color=\\"gray\\" isRemovable={false} migration_fallback=\\"lozenge\\" />\\n\\n// Bold Lozenge variants can stay as Lozenge\\n<Lozenge isBold />\\n<Lozenge isBold={true} />\\n<Lozenge appearance=\\"success\\" isBold />\\n\\n// Badge: New semantic appearance values\\n<Badge appearance=\\"success\\">{5}</Badge>\\n<Badge appearance=\\"danger\\">{10}</Badge>\\n<Badge appearance=\\"neutral\\">{3}</Badge>\\n<Badge appearance=\\"information\\">{7}</Badge>\\n<Badge appearance=\\"inverse\\">{2}</Badge>\\n<Badge appearance=\\"danger\\">{99}</Badge>\\n\\n// Badge: Already using semantic values\\n<Badge appearance=\\"success\\">{42}</Badge>\\n\\n// SimpleTag/RemovableTag: Migrate to Tag component\\nimport Tag from \'@atlaskit/tag\';\\n<Tag>Hello</Tag>\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n\\n// SimpleTag/RemovableTag: Migrate to AvatarTag with render props\\nimport { AvatarTag } from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<AvatarTag avatar={(props) => <Avatar {...props} src=\\"x\\" />}>Hello</AvatarTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also migrate to main module\\nimport Tag from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n<AvatarTag avatar={(props) => <Avatar {...props} />}>Hello</AvatarTag>\\n```\\n\\n## Rule Details\\n\\nThis rule enforces multiple migration patterns:\\n\\n1. **Migrate `isBold={false}` or missing `isBold` → `<Tag />`**: Detects non-bold Lozenge variants\\n and suggests migrating to the Tag component, preserving other props including the `appearance`\\n prop with its value.\\n\\n2. **Warn on dynamic `isBold` expressions**: Detects dynamic `isBold` props that cannot be safely\\n auto-fixed and require manual review.\\n\\n3. **Migrate Badge appearance values**: Detects Badge components using old appearance values and\\n migrates them to new semantic values.\\n\\n4. **Warn on dynamic Badge appearance expressions**: Detects dynamic `appearance` props on Badge\\n components that cannot be safely auto-fixed and require manual review.\\n\\n5. **Migrate SimpleTag/RemovableTag to Tag**: Detects SimpleTag and RemovableTag components (from\\n named imports or subpaths) and migrates them to the new Tag component, updating imports and\\n handling color prop mapping.\\n\\n6. **Migrate SimpleTag/RemovableTag with Avatar to AvatarTag**: Detects SimpleTag and RemovableTag\\n components that use an Avatar component in the `elemBefore` prop and migrates them to the new\\n `AvatarTag` component with render props pattern: `avatar={(props) => <Avatar {...props} />}`.\\n Removes `appearance` and `color` props from AvatarTag migrations.\\n\\n7. **Handle subpath imports**: Detects default imports from `@atlaskit/tag/simple-tag` and\\n `@atlaskit/tag/removable-tag` and migrates them to the main `@atlaskit/tag` module with the\\n appropriate component (Tag or AvatarTag).\\n\\n8. **Handle default Tag imports**: Detects default imports from `@atlaskit/tag` (old RemovableTag)\\n and checks if they need migration. If nothing needs migration, treats them as the new Tag\\n component.\\n\\n## Flowcharts\\n\\n### Tag Migration Flowchart (SimpleTag/RemovableTag/Tag)\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Tag Migration (SimpleTag/RemovableTag/Tag) │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Is default │\\n │ Tag import │\\n │ from │\\n │ @atlaskit/ │\\n │ tag? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ │\\n ┌───────────────┐ │\\n │ Check if │ │\\n │ already new │ │\\n │ Tag (nothing │ │\\n │ to migrate) │ │\\n └───────┬───────┘ │\\n │ │\\n ┌───────┴───────┐ │\\n │ │ │\\n YES │ │ NO │\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ SKIP │ │ Check │\\n│ (Already │ │ elemBefore │\\n│ migrated) │ │ for Avatar │\\n└───────────────┘ └───────┬───────┘\\n │\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Migrate to │ │ Migrate to │\\n │ AvatarTag │ │ Tag │\\n │ - Convert │ │ - Map colors │\\n │ elemBefore │ │ - Add │\\n │ to avatar │ │ isRemovable │\\n │ render prop │ │ ={false} │\\n │ - Remove │ │ (if │\\n │ appearance/ │ │ SimpleTag) │\\n │ color │ │ - Update │\\n │ │ │ imports │\\n └───────────────┘ └───────────────┘\\n```\\n\\n### Badge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Badge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Has │\\n │ appearance │\\n │ prop? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───────────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Is dynamic? │ │ SKIP │\\n │ (variable/ │ │ (no │\\n │ expression) │ │ migration │\\n └───────┬───────┘ │ needed) │\\n │ └───────────────┘\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Map & fix │\\n│ warning │ │ appearance │\\n│ (manual │ │ value: │\\n│ review) │ │ - added → │\\n│ │ │ success │\\n│ │ │ - removed → │\\n│ │ │ danger │\\n│ │ │ - default → │\\n│ │ │ neutral │\\n│ │ │ - primary → │\\n│ │ │ information │\\n│ │ │ - primaryIn │\\n│ │ │ verted → │\\n│ │ │ inverse │\\n│ │ │ - important → │\\n│ │ │ danger │\\n└───────────────┘ └───────────────┘\\n```\\n\\n### Lozenge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Lozenge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Check isBold │\\n │ prop │\\n └───────┬───────┘\\n │\\n ┌───────────────────┼───────────────────┐\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌────────────────┐ ┌───────────────┐\\n│ isBold={false}│ │ No isBold prop │ │ isBold={true} │\\n│ │ │ (implicit │ │ OR │\\n│ │ │ false) │ │ isBold │\\n│ │ │ │ │ (implicit) │\\n└───────┬───────┘ └───────┬────────┘ └───────┬───────┘\\n │ │ │\\n │ │ │\\n ▼ ▼ ▼\\n┌────────────────────────────┐ ┌───────────────┐\\n│ Check if │ │ Stay as │\\n│ appearance is │ │ Lozenge │\\n│ dynamic | │ - Update │\\n└───────┬────────────────────┘ │ appearance │\\n │ │ if needed │\\n┌───────┴─────────────────┐ └───────────────┘\\n│ │\\n│ DYNAMIC │ NOT DYNAMIC\\n│ │\\n▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Migrate to │\\n│ warning │ │ Tag │\\n│ (manual │ │ - appearance │\\n│ review) │ │ → color │\\n│ │ │ - Map values: │\\n│ │ │ success → │\\n│ │ │ lime │\\n│ │ │ default → │\\n│ │ │ gray │\\n│ │ │ removed → │\\n│ │ │ red │\\n│ │ │ inprogress │\\n│ │ │ → blue │\\n│ │ │ new → │\\n│ │ │ purple │\\n│ │ │ moved → │\\n│ │ │ yellow │\\n│ │ │ - Remove │\\n│ │ │ isBold │\\n│ │ │ - Add │\\n│ │ │ isRemov │\\n│ │ │ able= │\\n│ │ │ {false} │\\n│ │ │ - Add │\\n│ │ │ migration_ │\\n│ │ │ fallback= │\\n│ │ │ \\"lozenge\\" │\\n└───────────────┘ └───────────────┘\\n```\\n\\n## Appearance Prop Handling\\n\\n### Lozenge → Tag Migration\\n\\nWhen migrating `<Lozenge>` to `<Tag>`, the `appearance` prop is converted to `color` prop with value\\nmapping.\\n\\n### Lozenge Appearance → Tag Color Mapping\\n\\nWhen migrating Lozenge to Tag, appearance values are mapped to color values:\\n\\n| Lozenge Appearance | Tag Color |\\n| ------------------ | --------- |\\n| `success` | `lime` |\\n| `default` | `gray` |\\n| `removed` | `red` |\\n| `inprogress` | `blue` |\\n| `new` | `purple` |\\n| `moved` | `yellow` |\\n\\n**Note**: Dynamic appearance values in Lozenge components require manual review before migration.\\n\\n### Migration Fallback Prop\\n\\nFor safe, staged rollout when migrating from Lozenge to Tag, use the `migration_fallback=\\"lozenge\\"`\\nprop:\\n\\n```tsx\\n// Before (Lozenge)\\n<Lozenge appearance=\\"success\\">{data.label}</Lozenge>\\n\\n// After (Tag with migration_fallback for safe rollout)\\n<Tag\\n text={data.label}\\n color=\\"lime\\"\\n isRemovable={false}\\n migration_fallback=\\"lozenge\\"\\n/>\\n```\\n\\nWhen `migration_fallback=\\"lozenge\\"` is set and the feature flag\\n`platform-dst-lozenge-tag-badge-visual-uplifts` is **OFF**, the Tag component renders as a Lozenge\\nwith `isBold={false}`. When the feature flag is **ON**, it renders as the new Tag component.\\n\\nThis prop is:\\n\\n- **Temporary**: Should be cleaned up via codemod after migration is complete\\n- **Internal**: Intended for staged rollout to support large consumers (like Jira)\\n- **Safe**: Prevents visual regressions during migration\\n\\nThe `migration_fallback` prop will be automatically added by the ESLint auto-fix when migrating from\\nLozenge to Tag.\\n\\n### Badge Appearance Value Mapping\\n\\nBadge components use the following appearance value mapping:\\n\\n| Old Appearance | New Appearance |\\n| ----------------- | -------------- |\\n| `added` | `success` |\\n| `removed` | `danger` |\\n| `default` | `neutral` |\\n| `primary` | `information` |\\n| `primaryInverted` | `inverse` |\\n| `important` | `danger` |\\n\\n### Tag Color Mapping\\n\\nSimpleTag and RemovableTag color props are mapped to new semantic color values when migrating to\\nTag:\\n\\n| Old Color | New Color |\\n| -------------- | --------- |\\n| `limeLight` | `lime` |\\n| `orangeLight` | `orange` |\\n| `magentaLight` | `magenta` |\\n| `greenLight` | `green` |\\n| `blueLight` | `blue` |\\n| `redLight` | `red` |\\n| `purpleLight` | `purple` |\\n| `greyLight` | `gray` |\\n| `tealLight` | `teal` |\\n| `yellowLight` | `yellow` |\\n| `grey` | `gray` |\\n\\n## Auto-fixes\\n\\n- ✅ `isBold={false}` and missing `isBold` migration to `<Tag>` with `migration_fallback=\\"lozenge\\"`\\n for safe rollout\\n- ✅ Static Badge appearance prop values (e.g., `appearance=\\"added\\"` → `appearance=\\"success\\"`)\\n- ✅ SimpleTag/RemovableTag migration to `<Tag>` with color mapping and import updates\\n- ✅ SimpleTag/RemovableTag from subpaths (e.g., `@atlaskit/tag/simple-tag`) migration to main\\n module\\n- ✅ SimpleTag/RemovableTag with Avatar migration to `<AvatarTag>` with render props pattern\\n- ✅ Static Tag color prop mapping (e.g., `color=\\"blueLight\\"` → `color=\\"blue\\"`)\\n- ✅ SimpleTag `isRemovable={false}` prop addition when migrating to Tag\\n- ✅ Subpath import conversion to main `@atlaskit/tag` module\\n- ✅ Lozenge to Tag migration adds `migration_fallback=\\"lozenge\\"` for safe staged rollout\\n- ❌ Dynamic `isBold` expressions (warning only)\\n- ❌ Dynamic Badge appearance expressions (warning only - requires manual review)\\n"}',
70
+ content: '{"ruleName":"lozenge-badge-tag-labelling-system-migration","description":"This rule helps migrate deprecated `<Lozenge>` props and appearance values to the new API, migrate","content":"# lozenge-badge-tag-labelling-system-migration\\n\\nThis rule helps migrate deprecated `<Lozenge>` props and appearance values to the new API, migrate\\n`<Badge>` component appearance prop to new semantic values, and migrate `<SimpleTag>` and\\n`<RemovableTag>` components to the new `<Tag>` or `<AvatarTag>` components as part of the Labelling\\nSystem Phase 1 migration.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\n// Lozenge: isBold is deprecated — remove it regardless of value\\n<Lozenge isBold={false} appearance=\\"success\\" />\\n<Lozenge isBold={true} appearance=\\"success\\" />\\n<Lozenge isBold appearance=\\"success\\" />\\n<Lozenge isBold={someVariable} />\\n\\n// Lozenge: Old appearance values that need migration to new semantic values\\n<Lozenge appearance=\\"default\\">Default</Lozenge>\\n<Lozenge appearance=\\"inprogress\\">In Progress</Lozenge>\\n<Lozenge appearance=\\"moved\\">Moved</Lozenge>\\n<Lozenge appearance=\\"removed\\">Removed</Lozenge>\\n<Lozenge appearance=\\"new\\">New</Lozenge>\\n\\n// Badge: Old appearance values that need migration\\n<Badge appearance=\\"added\\">{5}</Badge>\\n<Badge appearance=\\"removed\\">{10}</Badge>\\n<Badge appearance=\\"default\\">{3}</Badge>\\n<Badge appearance=\\"primary\\">{7}</Badge>\\n<Badge appearance=\\"primaryInverted\\">{2}</Badge>\\n<Badge appearance=\\"important\\">{99}</Badge>\\n\\n// Badge: Dynamic appearance expressions require manual review\\n<Badge appearance={getStatus()}>{count}</Badge>\\n<Badge appearance={condition ? \'added\' : \'removed\'}>{num}</Badge>\\n\\n// SimpleTag/RemovableTag: Old tag components that need migration\\n<SimpleTag>Hello</SimpleTag>\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n<SimpleTag elemBefore={<Avatar src=\\"x\\" />}>Hello</SimpleTag>\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n<RemovableTag elemBefore={<Avatar />}>Hello</RemovableTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also need migration\\nimport SimpleTag from \'@atlaskit/tag/simple-tag\';\\n<SimpleTag color=\\"blueLight\\">Hello</SimpleTag>\\n\\nimport RemovableTag from \'@atlaskit/tag/removable-tag\';\\n<RemovableTag color=\\"redLight\\">Hello</RemovableTag>\\n```\\n\\n### Correct\\n\\n```tsx\\n// Lozenge: Use new semantic appearance values (no isBold prop)\\n<Lozenge appearance=\\"success\\">Success</Lozenge>\\n<Lozenge appearance=\\"neutral\\">Default</Lozenge>\\n<Lozenge appearance=\\"information\\">In Progress</Lozenge>\\n<Lozenge appearance=\\"warning\\">Moved</Lozenge>\\n<Lozenge appearance=\\"danger\\">Removed</Lozenge>\\n<Lozenge appearance=\\"discovery\\">New</Lozenge>\\n\\n// Badge: New semantic appearance values\\n<Badge appearance=\\"success\\">{5}</Badge>\\n<Badge appearance=\\"danger\\">{10}</Badge>\\n<Badge appearance=\\"neutral\\">{3}</Badge>\\n<Badge appearance=\\"information\\">{7}</Badge>\\n<Badge appearance=\\"inverse\\">{2}</Badge>\\n<Badge appearance=\\"danger\\">{99}</Badge>\\n\\n// SimpleTag/RemovableTag: Migrate to Tag component\\nimport Tag from \'@atlaskit/tag\';\\n<Tag>Hello</Tag>\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n\\n// SimpleTag/RemovableTag: Migrate to AvatarTag with render props\\nimport { AvatarTag } from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<AvatarTag avatar={(props) => <Avatar {...props} src=\\"x\\" />}>Hello</AvatarTag>\\n\\n// SimpleTag/RemovableTag from subpaths: Also migrate to main module\\nimport Tag from \'@atlaskit/tag\';\\nimport Avatar from \'@atlaskit/avatar\';\\n<Tag color=\\"blue\\" isRemovable={false}>Hello</Tag>\\n<AvatarTag avatar={(props) => <Avatar {...props} />}>Hello</AvatarTag>\\n```\\n\\n## Rule Details\\n\\nThis rule enforces multiple migration patterns:\\n\\n1. **Remove deprecated `isBold` prop from `<Lozenge>`**: The `isBold` prop is deprecated in the new\\n Lozenge API. The rule warns and auto-removes it regardless of value (true, false, or dynamic).\\n Both bold and subtle variants are now expressed via the `appearance` prop alone.\\n\\n2. **Migrate Lozenge appearance values to new semantic values**: Detects old appearance values\\n (`default`, `inprogress`, `moved`, `removed`, `new`) and auto-fixes them to new semantic values\\n (`neutral`, `information`, `warning`, `danger`, `discovery`). The value `success` is unchanged.\\n\\n3. **Migrate Badge appearance values**: Detects Badge components using old appearance values and\\n migrates them to new semantic values.\\n\\n4. **Warn on dynamic Badge appearance expressions**: Detects dynamic `appearance` props on Badge\\n components that cannot be safely auto-fixed and require manual review.\\n\\n5. **Migrate SimpleTag/RemovableTag to Tag**: Detects SimpleTag and RemovableTag components (from\\n named imports or subpaths) and migrates them to the new Tag component, updating imports and\\n handling color prop mapping.\\n\\n6. **Migrate SimpleTag/RemovableTag with Avatar to AvatarTag**: Detects SimpleTag and RemovableTag\\n components that use an Avatar component in the `elemBefore` prop and migrates them to the new\\n `AvatarTag` component with render props pattern: `avatar={(props) => <Avatar {...props} />}`.\\n Removes `appearance` and `color` props from AvatarTag migrations.\\n\\n7. **Handle subpath imports**: Detects default imports from `@atlaskit/tag/simple-tag` and\\n `@atlaskit/tag/removable-tag` and migrates them to the main `@atlaskit/tag` module with the\\n appropriate component (Tag or AvatarTag).\\n\\n8. **Handle default Tag imports**: Detects default imports from `@atlaskit/tag` (old RemovableTag)\\n and checks if they need migration. If nothing needs migration, treats them as the new Tag\\n component.\\n\\n## Flowcharts\\n\\n### Tag Migration Flowchart (SimpleTag/RemovableTag/Tag)\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Tag Migration (SimpleTag/RemovableTag/Tag) │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Is default │\\n │ Tag import │\\n │ from │\\n │ @atlaskit/ │\\n │ tag? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ │\\n ┌───────────────┐ │\\n │ Check if │ │\\n │ already new │ │\\n │ Tag (nothing │ │\\n │ to migrate) │ │\\n └───────┬───────┘ │\\n │ │\\n ┌───────┴───────┐ │\\n │ │ │\\n YES │ │ NO │\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ SKIP │ │ Check │\\n│ (Already │ │ elemBefore │\\n│ migrated) │ │ for Avatar │\\n└───────────────┘ └───────┬───────┘\\n │\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Migrate to │ │ Migrate to │\\n │ AvatarTag │ │ Tag │\\n │ - Convert │ │ - Map colors │\\n │ elemBefore │ │ - Add │\\n │ to avatar │ │ isRemovable │\\n │ render prop │ │ ={false} │\\n │ - Remove │ │ (if │\\n │ appearance/ │ │ SimpleTag) │\\n │ color │ │ - Update │\\n │ │ │ imports │\\n └───────────────┘ └───────────────┘\\n```\\n\\n### Badge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Badge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Has │\\n │ appearance │\\n │ prop? │\\n └───────┬───────┘\\n │\\n ┌───────────┴───────────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n ┌───────────────┐ ┌───────────────┐\\n │ Is dynamic? │ │ SKIP │\\n │ (variable/ │ │ (no │\\n │ expression) │ │ migration │\\n └───────┬───────┘ │ needed) │\\n │ └───────────────┘\\n ┌───────┴───────┐\\n │ │\\n YES │ │ NO\\n │ │\\n ▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Map & fix │\\n│ warning │ │ appearance │\\n│ (manual │ │ value: │\\n│ review) │ │ - added → │\\n│ │ │ success │\\n│ │ │ - removed → │\\n│ │ │ danger │\\n│ │ │ - default → │\\n│ │ │ neutral │\\n│ │ │ - primary → │\\n│ │ │ information │\\n│ │ │ - primaryIn │\\n│ │ │ verted → │\\n│ │ │ inverse │\\n│ │ │ - important → │\\n│ │ │ danger │\\n└───────────────┘ └───────────────┘\\n```\\n\\n### Lozenge Migration Flowchart\\n\\n```\\n┌─────────────────────────────────────────────────────────────┐\\n│ Lozenge Migration │\\n└─────────────────────────────────────────────────────────────┘\\n │\\n ▼\\n ┌───────────────┐\\n │ Check isBold │\\n │ prop │\\n └───────┬───────┘\\n │\\n ┌───────────────────┼───────────────────┐\\n │ │ │\\n ▼ ▼ ▼\\n┌───────────────┐ ┌────────────────┐ ┌───────────────┐\\n│ isBold={false}│ │ No isBold prop │ │ isBold={true} │\\n│ │ │ (implicit │ │ OR │\\n│ │ │ false) │ │ isBold │\\n│ │ │ │ │ (implicit) │\\n└───────┬───────┘ └───────┬────────┘ └───────┬───────┘\\n │ │ │\\n │ │ │\\n ▼ ▼ ▼\\n┌────────────────────────────┐ ┌───────────────┐\\n│ Check if │ │ Stay as │\\n│ appearance is │ │ Lozenge │\\n│ dynamic | │ - Update │\\n└───────┬────────────────────┘ │ appearance │\\n │ │ if needed │\\n┌───────┴─────────────────┐ └───────────────┘\\n│ │\\n│ DYNAMIC │ NOT DYNAMIC\\n│ │\\n▼ ▼\\n┌───────────────┐ ┌───────────────┐\\n│ Report │ │ Migrate to │\\n│ warning │ │ Tag │\\n│ (manual │ │ - appearance │\\n│ review) │ │ → color │\\n│ │ │ - Map values: │\\n│ │ │ success → │\\n│ │ │ lime │\\n│ │ │ default → │\\n│ │ │ gray │\\n│ │ │ removed → │\\n│ │ │ red │\\n│ │ │ inprogress │\\n│ │ │ → blue │\\n│ │ │ new → │\\n│ │ │ purple │\\n│ │ │ moved → │\\n│ │ │ yellow │\\n│ │ │ - Remove │\\n│ │ │ isBold │\\n│ │ │ - Add │\\n│ │ │ isRemov │\\n│ │ │ able= │\\n│ │ │ {false} │\\n│ │ │ - Add │\\n│ │ │ migration_ │\\n│ │ │ fallback= │\\n│ │ │ \\"lozenge\\" │\\n└───────────────┘ └───────────────┘\\n```\\n\\n## Appearance Prop Handling\\n\\n### Lozenge Appearance Value Migration\\n\\nThe new Lozenge API uses semantic color names. Old legacy appearance values are auto-fixed in-place:\\n\\n| Old Appearance | New Appearance |\\n| -------------- | --------------------- |\\n| `default` | `neutral` |\\n| `inprogress` | `information` |\\n| `moved` | `warning` |\\n| `removed` | `danger` |\\n| `new` | `discovery` |\\n| `success` | `success` (unchanged) |\\n\\nThe `<Lozenge>` component stays as `<Lozenge>` — it no longer migrates to `<Tag>`.\\n\\n### isBold Prop\\n\\nThe `isBold` prop is **not flagged** by this rule. While the feature flag\\n`platform-dst-lozenge-tag-badge-visual-uplifts` is OFF, users still need `isBold` to render subtle\\nLozenges. Removing it prematurely would break subtle Lozenges in those environments.\\n\\nOnce the feature flag is fully rolled out and the new Lozenge (always bold) is the only variant,\\n`isBold` cleanup can be handled in a separate codemod pass.\\n\\n### Badge Appearance Value Mapping\\n\\nBadge components use the following appearance value mapping:\\n\\n| Old Appearance | New Appearance |\\n| ----------------- | -------------- |\\n| `added` | `success` |\\n| `removed` | `danger` |\\n| `default` | `neutral` |\\n| `primary` | `information` |\\n| `primaryInverted` | `inverse` |\\n| `important` | `danger` |\\n\\n### Tag Color Mapping\\n\\nSimpleTag and RemovableTag color props are mapped to new semantic color values when migrating to\\nTag:\\n\\n| Old Color | New Color |\\n| -------------- | --------- |\\n| `limeLight` | `lime` |\\n| `orangeLight` | `orange` |\\n| `magentaLight` | `magenta` |\\n| `greenLight` | `green` |\\n| `blueLight` | `blue` |\\n| `redLight` | `red` |\\n| `purpleLight` | `purple` |\\n| `greyLight` | `gray` |\\n| `tealLight` | `teal` |\\n| `yellowLight` | `yellow` |\\n| `grey` | `gray` |\\n\\n## Auto-fixes\\n\\n- ✅ Lozenge legacy appearance values migrated to new semantic values in-place (e.g.,\\n `appearance=\\"inprogress\\"` → `appearance=\\"information\\"`)\\n- ✅ Static Badge appearance prop values (e.g., `appearance=\\"added\\"` → `appearance=\\"success\\"`)\\n- ✅ SimpleTag/RemovableTag migration to `<Tag>` with color mapping and import updates\\n- ✅ SimpleTag/RemovableTag from subpaths (e.g., `@atlaskit/tag/simple-tag`) migration to main\\n module\\n- ✅ SimpleTag/RemovableTag with Avatar migration to `<AvatarTag>` with render props pattern\\n- ✅ Static Tag color prop mapping (e.g., `color=\\"blueLight\\"` → `color=\\"blue\\"`)\\n- ✅ SimpleTag `isRemovable={false}` prop addition when migrating to Tag\\n- ✅ Subpath import conversion to main `@atlaskit/tag` module\\n- ❌ Dynamic Lozenge `appearance` prop values (warning with FIXME comment only)\\n- ❌ Dynamic Badge appearance expressions (warning only - requires manual review)\\n"}',
71
71
  ruleName: 'lozenge-badge-tag-labelling-system-migration',
72
- description: 'This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, migrate'
72
+ description: 'This rule helps migrate deprecated `<Lozenge>` props and appearance values to the new API, migrate'
73
73
  }, {
74
74
  content: '{"ruleName":"lozenge-isBold-and-lozenge-badge-appearance-migration","description":"This rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, and","content":"# lozenge-isBold-and-lozenge-badge-appearance-migration\\n\\nThis rule helps migrate deprecated `<Lozenge>` usages to the new API or `<Tag>` component, and\\nmigrate `<Badge>` component appearance prop to new semantic values as part of the Labelling System\\nPhase 1 migration.\\n\\n## Examples\\n\\n### Incorrect\\n\\n```tsx\\n// Non-bold Lozenge variants should migrate to Tag\\n<Lozenge isBold={false} />\\n<Lozenge /> // no isBold means implicit false\\n\\n// Dynamic isBold expressions require manual review\\n<Lozenge isBold={someVariable} />\\n<Lozenge isBold={condition ? true : false} />\\n\\n// Badge: Old appearance values that need migration\\n<Badge appearance=\\"added\\">{5}</Badge>\\n<Badge appearance=\\"removed\\">{10}</Badge>\\n<Badge appearance=\\"default\\">{3}</Badge>\\n<Badge appearance=\\"primary\\">{7}</Badge>\\n<Badge appearance=\\"primaryInverted\\">{2}</Badge>\\n<Badge appearance=\\"important\\">{99}</Badge>\\n\\n// Badge: Dynamic appearance expressions require manual review\\n<Badge appearance={getStatus()}>{count}</Badge>\\n<Badge appearance={condition ? \'added\' : \'removed\'}>{num}</Badge>\\n```\\n\\n### Correct\\n\\n```tsx\\n// Non-bold variants should use Tag component with appearance prop\\n<Tag appearance=\\"success\\" />\\n<Tag appearance=\\"default\\" />\\n\\n// Bold Lozenge variants can stay as Lozenge\\n<Lozenge isBold />\\n<Lozenge isBold={true} />\\n<Lozenge appearance=\\"success\\" isBold />\\n\\n// Badge: New semantic appearance values\\n<Badge appearance=\\"success\\">{5}</Badge>\\n<Badge appearance=\\"danger\\">{10}</Badge>\\n<Badge appearance=\\"neutral\\">{3}</Badge>\\n<Badge appearance=\\"information\\">{7}</Badge>\\n<Badge appearance=\\"inverse\\">{2}</Badge>\\n<Badge appearance=\\"danger\\">{99}</Badge>\\n\\n// Badge: Already using semantic values\\n<Badge appearance=\\"success\\">{42}</Badge>\\n```\\n\\n## Rule Details\\n\\nThis rule enforces multiple migration patterns:\\n\\n1. **Migrate `isBold={false}` or missing `isBold` → `<Tag />`**: Detects non-bold Lozenge variants\\n and suggests migrating to the Tag component, preserving other props including the `appearance`\\n prop with its value.\\n\\n2. **Warn on dynamic `isBold` expressions**: Detects dynamic `isBold` props that cannot be safely\\n auto-fixed and require manual review.\\n\\n3. **Migrate Badge appearance values**: Detects Badge components using old appearance values and\\n migrates them to new semantic values.\\n\\n4. **Warn on dynamic Badge appearance expressions**: Detects dynamic `appearance` props on Badge\\n components that cannot be safely auto-fixed and require manual review.\\n\\n## Appearance Prop Handling\\n\\n### Lozenge and Tag\\n\\nBoth `<Lozenge>` and `<Tag>` now use the `appearance` prop with new semantic values. The rule will\\nautomatically map old appearance values to the new semantic values when they differ.\\n\\n### Appearance Value Mapping\\n\\nThe rule includes a mapping function that will update old appearance values to new semantic values:\\n\\n```tsx\\n// Example mappings (to be updated with actual semantic values)\\n\'success\' → \'success\' // or new semantic equivalent\\n\'default\' → \'default\' // or new semantic equivalent\\n\'removed\' → \'removed\' // or new semantic equivalent\\n\'inprogress\' → \'inprogress\' // or new semantic equivalent\\n\'new\' → \'new\' // or new semantic equivalent\\n\'moved\' → \'moved\' // or new semantic equivalent\\n```\\n\\n**Note**: The current implementation preserves existing values. The mapping will be updated once the\\nnew semantic values are finalized.\\n\\n### Badge Appearance Value Mapping\\n\\nBadge components use the following appearance value mapping:\\n\\n| Old Appearance | New Appearance |\\n| ----------------- | -------------- |\\n| `added` | `success` |\\n| `removed` | `danger` |\\n| `default` | `neutral` |\\n| `primary` | `information` |\\n| `primaryInverted` | `inverse` |\\n| `important` | `danger` |\\n\\n## Auto-fixes\\n\\n- ✅ `isBold={false}` and missing `isBold` migration to `<Tag>` with preserved `appearance` prop\\n- ✅ Static Badge appearance prop values (e.g., `appearance=\\"added\\"` → `appearance=\\"success\\"`)\\n- ❌ Dynamic `isBold` expressions (warning only)\\n- ❌ Dynamic Badge appearance expressions (warning only - requires manual review)\\n"}',
75
75
  ruleName: 'lozenge-isBold-and-lozenge-badge-appearance-migration',