@atlaskit/eslint-plugin-design-system 13.35.0 → 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 +15 -1
- package/dist/cjs/common/token-maps.partial.js +2 -2
- package/dist/cjs/rules/lozenge-badge-tag-labelling-system-migration/index.js +6 -1
- package/dist/es2019/common/token-maps.partial.js +2 -2
- package/dist/es2019/rules/lozenge-badge-tag-labelling-system-migration/index.js +6 -1
- package/dist/esm/common/token-maps.partial.js +2 -2
- package/dist/esm/rules/lozenge-badge-tag-labelling-system-migration/index.js +6 -1
- package/dist/types/common/token-maps.partial.d.ts +2 -2
- package/dist/types/rules/use-tokens-typography/utils.d.ts +2 -0
- package/dist/types-ts4.5/common/token-maps.partial.d.ts +2 -2
- package/dist/types-ts4.5/rules/use-tokens-typography/utils.d.ts +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
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
|
+
|
|
11
|
+
## 13.35.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 13.35.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
6
20
|
|
|
7
21
|
- [`0a325377cc8bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a325377cc8bf) -
|
|
8
|
-
`use-primitives-text` will autofix `<Text size="UNSAFE_small">` to `<Text size="small"
|
|
22
|
+
`use-primitives-text` will autofix `<Text size="UNSAFE_small">` to `<Text size="small">`.
|
|
9
23
|
|
|
10
24
|
## 13.34.1
|
|
11
25
|
|
|
@@ -10,10 +10,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
/**
|
|
12
12
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
13
|
-
* @codegen <<SignedSource::
|
|
13
|
+
* @codegen <<SignedSource::8d2e42e9308a5216d1de97408fbb692d>>
|
|
14
14
|
* @codegenId spacing
|
|
15
15
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
16
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
16
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
|
|
17
17
|
*/
|
|
18
18
|
var positiveSpaceMap = exports.positiveSpaceMap = {
|
|
19
19
|
'0px': 'space.0',
|
|
@@ -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';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::8d2e42e9308a5216d1de97408fbb692d>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
6
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
|
|
7
7
|
*/
|
|
8
8
|
export const positiveSpaceMap = {
|
|
9
9
|
'0px': 'space.0',
|
|
@@ -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';
|
|
@@ -3,10 +3,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
/**
|
|
5
5
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::8d2e42e9308a5216d1de97408fbb692d>>
|
|
7
7
|
* @codegenId spacing
|
|
8
8
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
9
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
9
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
|
|
10
10
|
*/
|
|
11
11
|
export var positiveSpaceMap = {
|
|
12
12
|
'0px': 'space.0',
|
|
@@ -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';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::8d2e42e9308a5216d1de97408fbb692d>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
6
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
|
|
7
7
|
*/
|
|
8
8
|
export declare const positiveSpaceMap: {
|
|
9
9
|
'0px': 'space.0';
|
|
@@ -28,6 +28,7 @@ export declare function isValidTypographyToken(tokenName: string): {
|
|
|
28
28
|
description: string;
|
|
29
29
|
suggest?: string[];
|
|
30
30
|
deprecated?: string;
|
|
31
|
+
replacement?: string;
|
|
31
32
|
};
|
|
32
33
|
original: {
|
|
33
34
|
value: string | {
|
|
@@ -45,6 +46,7 @@ export declare function isValidTypographyToken(tokenName: string): {
|
|
|
45
46
|
description: string;
|
|
46
47
|
suggest?: string[];
|
|
47
48
|
deprecated?: string;
|
|
49
|
+
replacement?: string;
|
|
48
50
|
};
|
|
49
51
|
};
|
|
50
52
|
name: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::8d2e42e9308a5216d1de97408fbb692d>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
6
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::535518e7add48ef24f526d0904f70060>>
|
|
7
7
|
*/
|
|
8
8
|
export declare const positiveSpaceMap: {
|
|
9
9
|
'0px': 'space.0';
|
|
@@ -28,6 +28,7 @@ export declare function isValidTypographyToken(tokenName: string): {
|
|
|
28
28
|
description: string;
|
|
29
29
|
suggest?: string[];
|
|
30
30
|
deprecated?: string;
|
|
31
|
+
replacement?: string;
|
|
31
32
|
};
|
|
32
33
|
original: {
|
|
33
34
|
value: string | {
|
|
@@ -45,6 +46,7 @@ export declare function isValidTypographyToken(tokenName: string): {
|
|
|
45
46
|
description: string;
|
|
46
47
|
suggest?: string[];
|
|
47
48
|
deprecated?: string;
|
|
49
|
+
replacement?: string;
|
|
48
50
|
};
|
|
49
51
|
};
|
|
50
52
|
name: string;
|
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.
|
|
4
|
+
"version": "13.36.0",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/eslint-utils": "^2.0.0",
|
|
42
|
-
"@atlaskit/icon": "^
|
|
42
|
+
"@atlaskit/icon": "^30.0.0",
|
|
43
43
|
"@atlaskit/icon-lab": "^5.14.0",
|
|
44
|
-
"@atlaskit/tokens": "^10.
|
|
44
|
+
"@atlaskit/tokens": "^10.1.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@typescript-eslint/utils": "^7.1.0",
|
|
47
47
|
"ajv": "^6.12.6",
|