@atlaskit/eslint-plugin-design-system 13.19.1 → 13.19.2
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 +10 -0
- package/dist/cjs/rules/no-emotion-primitives/index.js +1 -1
- package/dist/cjs/rules/no-legacy-icons/helpers.js +7 -3
- package/dist/es2019/rules/no-emotion-primitives/index.js +1 -1
- package/dist/es2019/rules/no-legacy-icons/helpers.js +7 -3
- package/dist/esm/rules/no-emotion-primitives/index.js +1 -1
- package/dist/esm/rules/no-legacy-icons/helpers.js +7 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 13.19.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#192592](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/192592)
|
|
8
|
+
[`558893bdbc7c3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/558893bdbc7c3) -
|
|
9
|
+
Fixed no-legacy-icons auto fixer to retain size prop when migrating from migration to final core
|
|
10
|
+
entry point
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 13.19.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -40,7 +40,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
|
|
|
40
40
|
recommended: false
|
|
41
41
|
},
|
|
42
42
|
messages: {
|
|
43
|
-
'no-emotion-primitives': 'Use @atlaskit/primitives/compiled instead of @atlaskit/primitives'
|
|
43
|
+
'no-emotion-primitives': 'Use @atlaskit/primitives/compiled instead of @atlaskit/primitives. Refer to go/akcss for more information.'
|
|
44
44
|
},
|
|
45
45
|
schema: schema
|
|
46
46
|
},
|
|
@@ -536,7 +536,8 @@ var createPropFixes = function createPropFixes(_ref7) {
|
|
|
536
536
|
newIconName = _ref7.newIconName;
|
|
537
537
|
var fixes = [];
|
|
538
538
|
var spacing = metadata.spacing,
|
|
539
|
-
size = metadata.size
|
|
539
|
+
size = metadata.size,
|
|
540
|
+
importSource = metadata.importSource;
|
|
540
541
|
if (shouldUseMigrationPath && !legacyImportNode) {
|
|
541
542
|
return fixes;
|
|
542
543
|
}
|
|
@@ -565,8 +566,11 @@ var createPropFixes = function createPropFixes(_ref7) {
|
|
|
565
566
|
if (size && sizeProp.value) {
|
|
566
567
|
// update size prop with new replacement size
|
|
567
568
|
fixes.push(fixer.replaceText(sizeProp.value, "\"".concat(size, "\"")));
|
|
568
|
-
} else {
|
|
569
|
-
// remove size prop if no new replacement size is specified
|
|
569
|
+
} else if (importSource.startsWith('@atlaskit/icon/glyph/')) {
|
|
570
|
+
// only remove size prop for glyph entry points if no new replacement size is specified
|
|
571
|
+
fixes.push(fixer.remove(sizeProp));
|
|
572
|
+
} else if (sizeProp.value && sizeProp.value.type === 'Literal' && typeof sizeProp.value.value === 'string' && sizeProp.value.value === 'medium') {
|
|
573
|
+
// if size is medium, we can remove it as it is the default size
|
|
570
574
|
fixes.push(fixer.remove(sizeProp));
|
|
571
575
|
}
|
|
572
576
|
}
|
|
@@ -30,7 +30,7 @@ export const rule = createLintRule({
|
|
|
30
30
|
recommended: false
|
|
31
31
|
},
|
|
32
32
|
messages: {
|
|
33
|
-
'no-emotion-primitives': 'Use @atlaskit/primitives/compiled instead of @atlaskit/primitives'
|
|
33
|
+
'no-emotion-primitives': 'Use @atlaskit/primitives/compiled instead of @atlaskit/primitives. Refer to go/akcss for more information.'
|
|
34
34
|
},
|
|
35
35
|
schema
|
|
36
36
|
},
|
|
@@ -517,7 +517,8 @@ const createPropFixes = ({
|
|
|
517
517
|
const fixes = [];
|
|
518
518
|
const {
|
|
519
519
|
spacing,
|
|
520
|
-
size
|
|
520
|
+
size,
|
|
521
|
+
importSource
|
|
521
522
|
} = metadata;
|
|
522
523
|
if (shouldUseMigrationPath && !legacyImportNode) {
|
|
523
524
|
return fixes;
|
|
@@ -551,8 +552,11 @@ const createPropFixes = ({
|
|
|
551
552
|
if (size && sizeProp.value) {
|
|
552
553
|
// update size prop with new replacement size
|
|
553
554
|
fixes.push(fixer.replaceText(sizeProp.value, `"${size}"`));
|
|
554
|
-
} else {
|
|
555
|
-
// remove size prop if no new replacement size is specified
|
|
555
|
+
} else if (importSource.startsWith('@atlaskit/icon/glyph/')) {
|
|
556
|
+
// only remove size prop for glyph entry points if no new replacement size is specified
|
|
557
|
+
fixes.push(fixer.remove(sizeProp));
|
|
558
|
+
} else if (sizeProp.value && sizeProp.value.type === 'Literal' && typeof sizeProp.value.value === 'string' && sizeProp.value.value === 'medium') {
|
|
559
|
+
// if size is medium, we can remove it as it is the default size
|
|
556
560
|
fixes.push(fixer.remove(sizeProp));
|
|
557
561
|
}
|
|
558
562
|
}
|
|
@@ -33,7 +33,7 @@ export var rule = createLintRule({
|
|
|
33
33
|
recommended: false
|
|
34
34
|
},
|
|
35
35
|
messages: {
|
|
36
|
-
'no-emotion-primitives': 'Use @atlaskit/primitives/compiled instead of @atlaskit/primitives'
|
|
36
|
+
'no-emotion-primitives': 'Use @atlaskit/primitives/compiled instead of @atlaskit/primitives. Refer to go/akcss for more information.'
|
|
37
37
|
},
|
|
38
38
|
schema: schema
|
|
39
39
|
},
|
|
@@ -527,7 +527,8 @@ var createPropFixes = function createPropFixes(_ref7) {
|
|
|
527
527
|
newIconName = _ref7.newIconName;
|
|
528
528
|
var fixes = [];
|
|
529
529
|
var spacing = metadata.spacing,
|
|
530
|
-
size = metadata.size
|
|
530
|
+
size = metadata.size,
|
|
531
|
+
importSource = metadata.importSource;
|
|
531
532
|
if (shouldUseMigrationPath && !legacyImportNode) {
|
|
532
533
|
return fixes;
|
|
533
534
|
}
|
|
@@ -556,8 +557,11 @@ var createPropFixes = function createPropFixes(_ref7) {
|
|
|
556
557
|
if (size && sizeProp.value) {
|
|
557
558
|
// update size prop with new replacement size
|
|
558
559
|
fixes.push(fixer.replaceText(sizeProp.value, "\"".concat(size, "\"")));
|
|
559
|
-
} else {
|
|
560
|
-
// remove size prop if no new replacement size is specified
|
|
560
|
+
} else if (importSource.startsWith('@atlaskit/icon/glyph/')) {
|
|
561
|
+
// only remove size prop for glyph entry points if no new replacement size is specified
|
|
562
|
+
fixes.push(fixer.remove(sizeProp));
|
|
563
|
+
} else if (sizeProp.value && sizeProp.value.type === 'Literal' && typeof sizeProp.value.value === 'string' && sizeProp.value.value === 'medium') {
|
|
564
|
+
// if size is medium, we can remove it as it is the default size
|
|
561
565
|
fixes.push(fixer.remove(sizeProp));
|
|
562
566
|
}
|
|
563
567
|
}
|
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.19.
|
|
4
|
+
"version": "13.19.2",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@atlaskit/eslint-utils": "^2.0.0",
|
|
46
|
-
"@atlaskit/icon": "^27.
|
|
46
|
+
"@atlaskit/icon": "^27.8.0",
|
|
47
47
|
"@atlaskit/icon-lab": "^5.2.0",
|
|
48
48
|
"@atlaskit/tokens": "^5.6.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@af/formatting": "workspace:^",
|
|
61
|
-
"@atlaskit/ds-lib": "^
|
|
61
|
+
"@atlaskit/ds-lib": "^5.0.0",
|
|
62
62
|
"@atlaskit/theme": "^19.0.0",
|
|
63
63
|
"@atlassian/codegen": "^0.1.0",
|
|
64
64
|
"@atlassian/eslint-utils": "^0.5.0",
|