@atlaskit/eslint-plugin-design-system 13.35.1 → 13.36.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 13.36.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3147ae92ea7bd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3147ae92ea7bd) -
8
+ Updates lozenge-badge-tag-labelling-system-migration eslint rule to include the migration_fallback
9
+ prop so that teams can adopt the Tag API without triggering an immediate visual change.
10
+
3
11
  ## 13.35.1
4
12
 
5
13
  ### Patch Changes
@@ -22,7 +22,7 @@ var rule = (0, _createRule.createLintRule)({
22
22
  },
23
23
  messages: {
24
24
  updateAppearance: 'Update appearance value to new semantic value.',
25
- migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component.',
25
+ migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component. For safe, staged rollout, use the `migration_fallback="lozenge"` prop which renders as Lozenge when the feature flag is off.',
26
26
  manualReview: "Dynamic 'isBold' props require manual review before migration.",
27
27
  dynamicLozengeAppearance: "Dynamic 'appearance' prop values require manual review before migrating to Tag. Please verify the appearance value and manually convert it to the appropriate color prop value.",
28
28
  updateBadgeAppearance: 'Update Badge appearance value "{{oldValue}}" to new semantic value "{{newValue}}".',
@@ -365,6 +365,11 @@ var rule = (0, _createRule.createLintRule)({
365
365
  if (options.isSimpleTag || options.isLozengeMigration) {
366
366
  newAttributes.push('isRemovable={false}');
367
367
  }
368
+
369
+ // Add migration_fallback="lozenge" for Lozenge migrations to enable safe staged rollout
370
+ if (options.isLozengeMigration) {
371
+ newAttributes.push('migration_fallback="lozenge"');
372
+ }
368
373
  var attributesText = newAttributes.length > 0 ? " ".concat(newAttributes.join(' ')) : '';
369
374
  var children = node.children.length > 0 ? sourceCode.getText().slice(node.openingElement.range[1], node.closingElement ? node.closingElement.range[0] : node.range[1]) : '';
370
375
  var componentName = options.preserveComponentName ? node.openingElement.name.name : options.isAvatarTag ? 'AvatarTag' : 'Tag';
@@ -12,7 +12,7 @@ const rule = createLintRule({
12
12
  },
13
13
  messages: {
14
14
  updateAppearance: 'Update appearance value to new semantic value.',
15
- migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component.',
15
+ migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component. For safe, staged rollout, use the `migration_fallback="lozenge"` prop which renders as Lozenge when the feature flag is off.',
16
16
  manualReview: "Dynamic 'isBold' props require manual review before migration.",
17
17
  dynamicLozengeAppearance: "Dynamic 'appearance' prop values require manual review before migrating to Tag. Please verify the appearance value and manually convert it to the appropriate color prop value.",
18
18
  updateBadgeAppearance: 'Update Badge appearance value "{{oldValue}}" to new semantic value "{{newValue}}".',
@@ -354,6 +354,11 @@ const rule = createLintRule({
354
354
  if (options.isSimpleTag || options.isLozengeMigration) {
355
355
  newAttributes.push('isRemovable={false}');
356
356
  }
357
+
358
+ // Add migration_fallback="lozenge" for Lozenge migrations to enable safe staged rollout
359
+ if (options.isLozengeMigration) {
360
+ newAttributes.push('migration_fallback="lozenge"');
361
+ }
357
362
  const attributesText = newAttributes.length > 0 ? ` ${newAttributes.join(' ')}` : '';
358
363
  const children = node.children.length > 0 ? sourceCode.getText().slice(node.openingElement.range[1], node.closingElement ? node.closingElement.range[0] : node.range[1]) : '';
359
364
  const componentName = options.preserveComponentName ? node.openingElement.name.name : options.isAvatarTag ? 'AvatarTag' : 'Tag';
@@ -15,7 +15,7 @@ var rule = createLintRule({
15
15
  },
16
16
  messages: {
17
17
  updateAppearance: 'Update appearance value to new semantic value.',
18
- migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component.',
18
+ migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component. For safe, staged rollout, use the `migration_fallback="lozenge"` prop which renders as Lozenge when the feature flag is off.',
19
19
  manualReview: "Dynamic 'isBold' props require manual review before migration.",
20
20
  dynamicLozengeAppearance: "Dynamic 'appearance' prop values require manual review before migrating to Tag. Please verify the appearance value and manually convert it to the appropriate color prop value.",
21
21
  updateBadgeAppearance: 'Update Badge appearance value "{{oldValue}}" to new semantic value "{{newValue}}".',
@@ -358,6 +358,11 @@ var rule = createLintRule({
358
358
  if (options.isSimpleTag || options.isLozengeMigration) {
359
359
  newAttributes.push('isRemovable={false}');
360
360
  }
361
+
362
+ // Add migration_fallback="lozenge" for Lozenge migrations to enable safe staged rollout
363
+ if (options.isLozengeMigration) {
364
+ newAttributes.push('migration_fallback="lozenge"');
365
+ }
361
366
  var attributesText = newAttributes.length > 0 ? " ".concat(newAttributes.join(' ')) : '';
362
367
  var children = node.children.length > 0 ? sourceCode.getText().slice(node.openingElement.range[1], node.closingElement ? node.closingElement.range[0] : node.range[1]) : '';
363
368
  var componentName = options.preserveComponentName ? node.openingElement.name.name : options.isAvatarTag ? 'AvatarTag' : 'Tag';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
3
  "description": "The essential plugin for use with the Atlassian Design System.",
4
- "version": "13.35.1",
4
+ "version": "13.36.0",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {