@atlaskit/eslint-plugin-design-system 13.23.3 → 13.24.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 +17 -0
- package/README.md +1 -0
- package/dist/cjs/presets/all-flat.codegen.js +2 -1
- package/dist/cjs/presets/all.codegen.js +2 -1
- package/dist/cjs/presets/recommended-flat.codegen.js +2 -1
- package/dist/cjs/presets/recommended.codegen.js +2 -1
- package/dist/cjs/rules/index.codegen.js +3 -1
- package/dist/cjs/rules/lozenge-appearance-and-isbold-migration/index.js +267 -0
- package/dist/cjs/rules/no-deprecated-imports/handlers/icon.js +13 -14
- package/dist/cjs/rules/no-legacy-icons/helpers.js +2 -2
- package/dist/cjs/rules/utils/get-deprecated-config.js +1 -1
- package/dist/es2019/presets/all-flat.codegen.js +2 -1
- package/dist/es2019/presets/all.codegen.js +2 -1
- package/dist/es2019/presets/recommended-flat.codegen.js +2 -1
- package/dist/es2019/presets/recommended.codegen.js +2 -1
- package/dist/es2019/rules/index.codegen.js +3 -1
- package/dist/es2019/rules/lozenge-appearance-and-isbold-migration/index.js +261 -0
- package/dist/es2019/rules/no-deprecated-imports/handlers/icon.js +8 -9
- package/dist/es2019/rules/no-legacy-icons/helpers.js +2 -2
- package/dist/es2019/rules/utils/get-deprecated-config.js +1 -2
- package/dist/esm/presets/all-flat.codegen.js +2 -1
- package/dist/esm/presets/all.codegen.js +2 -1
- package/dist/esm/presets/recommended-flat.codegen.js +2 -1
- package/dist/esm/presets/recommended.codegen.js +2 -1
- package/dist/esm/rules/index.codegen.js +3 -1
- package/dist/esm/rules/lozenge-appearance-and-isbold-migration/index.js +261 -0
- package/dist/esm/rules/no-deprecated-imports/handlers/icon.js +12 -13
- package/dist/esm/rules/no-legacy-icons/helpers.js +2 -2
- package/dist/esm/rules/utils/get-deprecated-config.js +2 -2
- package/dist/types/presets/all-flat.codegen.d.ts +1 -1
- package/dist/types/presets/all.codegen.d.ts +1 -1
- package/dist/types/presets/recommended-flat.codegen.d.ts +1 -1
- package/dist/types/presets/recommended.codegen.d.ts +1 -1
- package/dist/types/rules/index.codegen.d.ts +1 -1
- package/dist/types/rules/lozenge-appearance-and-isbold-migration/index.d.ts +2 -0
- package/dist/types/rules/no-legacy-icons/helpers.d.ts +0 -2
- package/dist/types-ts4.5/presets/all-flat.codegen.d.ts +1 -1
- package/dist/types-ts4.5/presets/all.codegen.d.ts +1 -1
- package/dist/types-ts4.5/presets/recommended-flat.codegen.d.ts +1 -1
- package/dist/types-ts4.5/presets/recommended.codegen.d.ts +1 -1
- package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -1
- package/dist/types-ts4.5/rules/lozenge-appearance-and-isbold-migration/index.d.ts +2 -0
- package/dist/types-ts4.5/rules/no-legacy-icons/helpers.d.ts +0 -2
- package/package.json +3 -3
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
2
|
+
import { createLintRule } from '../utils/create-rule';
|
|
3
|
+
var rule = createLintRule({
|
|
4
|
+
meta: {
|
|
5
|
+
name: 'lozenge-appearance-and-isbold-migration',
|
|
6
|
+
fixable: 'code',
|
|
7
|
+
type: 'suggestion',
|
|
8
|
+
docs: {
|
|
9
|
+
description: 'Helps migrate deprecated Lozenge usages to the new API or Tag component as part of the Labelling System Phase 1 migration.',
|
|
10
|
+
recommended: true,
|
|
11
|
+
severity: 'warn'
|
|
12
|
+
},
|
|
13
|
+
messages: {
|
|
14
|
+
replaceAppearance: "'appearance' prop on <Lozenge> is deprecated — use 'color' instead.",
|
|
15
|
+
migrateTag: 'Non-bold <Lozenge> variants should migrate to <Tag> component.',
|
|
16
|
+
manualReview: "Dynamic 'isBold' props require manual review before migration."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
create: function create(context) {
|
|
20
|
+
/**
|
|
21
|
+
* Contains a map of imported Lozenge components.
|
|
22
|
+
*/
|
|
23
|
+
var lozengeImports = {}; // local name -> import source
|
|
24
|
+
var tagImports = {}; // local name -> import source
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Check if a JSX attribute value is a literal false
|
|
28
|
+
*/
|
|
29
|
+
function isLiteralFalse(node) {
|
|
30
|
+
return node && node.type === 'JSXExpressionContainer' && node.expression && node.expression.type === 'Literal' && node.expression.value === false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Check if a JSX attribute value is dynamic (not a literal boolean)
|
|
35
|
+
*/
|
|
36
|
+
function isDynamicExpression(node) {
|
|
37
|
+
if (!node || node.type !== 'JSXExpressionContainer') {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
var expr = node.expression;
|
|
41
|
+
return expr && !(expr.type === 'Literal' && typeof expr.value === 'boolean');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get all attributes as an object for easier manipulation
|
|
46
|
+
*/
|
|
47
|
+
function getAttributesMap(attributes) {
|
|
48
|
+
var map = {};
|
|
49
|
+
attributes.forEach(function (attr) {
|
|
50
|
+
if (attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier') {
|
|
51
|
+
map[attr.name.name] = attr;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return map;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Map Lozenge appearance values to Tag color values
|
|
59
|
+
*/
|
|
60
|
+
function mapAppearanceToTagColor(appearanceValue) {
|
|
61
|
+
var mapping = {
|
|
62
|
+
success: 'lime',
|
|
63
|
+
default: 'standard',
|
|
64
|
+
removed: 'red',
|
|
65
|
+
inprogress: 'blue',
|
|
66
|
+
new: 'purple',
|
|
67
|
+
moved: 'orange'
|
|
68
|
+
};
|
|
69
|
+
return mapping[appearanceValue] || appearanceValue;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Map Lozenge appearance values to Lozenge color values
|
|
74
|
+
*/
|
|
75
|
+
function mapAppearanceToLozengeColor(appearanceValue) {
|
|
76
|
+
var mapping = {
|
|
77
|
+
default: 'neutral',
|
|
78
|
+
inprogress: 'information',
|
|
79
|
+
moved: 'warning',
|
|
80
|
+
new: 'discovery',
|
|
81
|
+
removed: 'danger',
|
|
82
|
+
success: 'success'
|
|
83
|
+
};
|
|
84
|
+
return mapping[appearanceValue] || appearanceValue;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Extract the string value from a JSX attribute value
|
|
89
|
+
*/
|
|
90
|
+
function extractStringValue(attrValue) {
|
|
91
|
+
if (!attrValue) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
if (attrValue.type === 'Literal') {
|
|
95
|
+
return attrValue.value;
|
|
96
|
+
}
|
|
97
|
+
if (attrValue.type === 'JSXExpressionContainer' && attrValue.expression && attrValue.expression.type === 'Literal') {
|
|
98
|
+
return attrValue.expression.value;
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Generate the replacement JSX element text
|
|
105
|
+
*/
|
|
106
|
+
function generateTagReplacement(node, lozengeLocalName) {
|
|
107
|
+
var sourceCode = context.getSourceCode();
|
|
108
|
+
var attributes = node.openingElement.attributes;
|
|
109
|
+
|
|
110
|
+
// Build new attributes array, excluding isBold and mapping appearance to color
|
|
111
|
+
var newAttributes = [];
|
|
112
|
+
attributes.forEach(function (attr) {
|
|
113
|
+
if (attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier') {
|
|
114
|
+
var attrName = attr.name.name;
|
|
115
|
+
if (attrName === 'isBold') {
|
|
116
|
+
// Skip isBold attribute
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (attrName === 'appearance') {
|
|
120
|
+
// Map appearance to color with value transformation
|
|
121
|
+
var stringValue = extractStringValue(attr.value);
|
|
122
|
+
if (stringValue && typeof stringValue === 'string') {
|
|
123
|
+
var mappedColor = mapAppearanceToTagColor(stringValue);
|
|
124
|
+
newAttributes.push("color=\"".concat(mappedColor, "\""));
|
|
125
|
+
} else {
|
|
126
|
+
// If we can't extract the string value, keep as-is but rename to color
|
|
127
|
+
var value = attr.value ? sourceCode.getText(attr.value) : '';
|
|
128
|
+
newAttributes.push("color".concat(value ? "=".concat(value) : ''));
|
|
129
|
+
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Keep all other attributes
|
|
134
|
+
newAttributes.push(sourceCode.getText(attr));
|
|
135
|
+
} else if (attr.type === 'JSXSpreadAttribute') {
|
|
136
|
+
// Keep spread attributes
|
|
137
|
+
newAttributes.push(sourceCode.getText(attr));
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var attributesText = newAttributes.length > 0 ? " ".concat(newAttributes.join(' ')) : '';
|
|
141
|
+
var children = node.children.length > 0 ? sourceCode.getText().slice(node.openingElement.range[1], node.closingElement ? node.closingElement.range[0] : node.range[1]) : '';
|
|
142
|
+
if (node.closingElement) {
|
|
143
|
+
return "<Tag".concat(attributesText, ">").concat(children, "</Tag>");
|
|
144
|
+
} else {
|
|
145
|
+
return "<Tag".concat(attributesText, " />");
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
ImportDeclaration: function ImportDeclaration(node) {
|
|
150
|
+
var moduleSource = node.source.value;
|
|
151
|
+
if (typeof moduleSource === 'string') {
|
|
152
|
+
// Track Lozenge imports
|
|
153
|
+
if (moduleSource === '@atlaskit/lozenge' || moduleSource.startsWith('@atlaskit/lozenge')) {
|
|
154
|
+
node.specifiers.forEach(function (spec) {
|
|
155
|
+
if (spec.type === 'ImportDefaultSpecifier') {
|
|
156
|
+
lozengeImports[spec.local.name] = moduleSource;
|
|
157
|
+
} else if (spec.type === 'ImportSpecifier' && spec.imported.type === 'Identifier') {
|
|
158
|
+
if (spec.imported.name === 'Lozenge') {
|
|
159
|
+
lozengeImports[spec.local.name] = moduleSource;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// Track Tag imports
|
|
165
|
+
if (moduleSource === '@atlaskit/tag' || moduleSource.startsWith('@atlaskit/tag/')) {
|
|
166
|
+
node.specifiers.forEach(function (spec) {
|
|
167
|
+
if (spec.type === 'ImportDefaultSpecifier') {
|
|
168
|
+
tagImports[spec.local.name] = moduleSource;
|
|
169
|
+
} else if (spec.type === 'ImportSpecifier' && spec.imported.type === 'Identifier') {
|
|
170
|
+
if (spec.imported.name === 'Tag') {
|
|
171
|
+
tagImports[spec.local.name] = moduleSource;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
JSXElement: function JSXElement(node) {
|
|
179
|
+
if (!isNodeOfType(node, 'JSXElement')) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (!isNodeOfType(node.openingElement.name, 'JSXIdentifier')) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
var elementName = node.openingElement.name.name;
|
|
186
|
+
|
|
187
|
+
// Only process if this is a Lozenge component we've imported
|
|
188
|
+
if (!lozengeImports[elementName]) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
var attributesMap = getAttributesMap(node.openingElement.attributes);
|
|
192
|
+
var appearanceProp = attributesMap.appearance;
|
|
193
|
+
var isBoldProp = attributesMap.isBold;
|
|
194
|
+
|
|
195
|
+
// Handle appearance prop migration
|
|
196
|
+
if (appearanceProp) {
|
|
197
|
+
context.report({
|
|
198
|
+
node: appearanceProp,
|
|
199
|
+
messageId: 'replaceAppearance',
|
|
200
|
+
fix: function fix(fixer) {
|
|
201
|
+
var fixes = [];
|
|
202
|
+
// Always rename the prop name
|
|
203
|
+
fixes.push(fixer.replaceText(appearanceProp.name, 'color'));
|
|
204
|
+
|
|
205
|
+
// Also map the value if it's a string literal and we're not migrating to Tag
|
|
206
|
+
var shouldMigrateToTag = !isBoldProp || isLiteralFalse(isBoldProp.value);
|
|
207
|
+
if (!shouldMigrateToTag) {
|
|
208
|
+
var stringValue = extractStringValue(appearanceProp.value);
|
|
209
|
+
if (stringValue && typeof stringValue === 'string') {
|
|
210
|
+
var mappedColor = mapAppearanceToLozengeColor(stringValue);
|
|
211
|
+
if (mappedColor !== stringValue) {
|
|
212
|
+
// Update the value if it changed
|
|
213
|
+
if (appearanceProp.value.type === 'Literal') {
|
|
214
|
+
fixes.push(fixer.replaceText(appearanceProp.value, "\"".concat(mappedColor, "\"")));
|
|
215
|
+
} else if (appearanceProp.value.type === 'JSXExpressionContainer' && appearanceProp.value.expression && appearanceProp.value.expression.type === 'Literal') {
|
|
216
|
+
fixes.push(fixer.replaceText(appearanceProp.value.expression, "\"".concat(mappedColor, "\"")));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return fixes;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Handle isBold prop and Tag migration
|
|
227
|
+
if (isBoldProp) {
|
|
228
|
+
if (isLiteralFalse(isBoldProp.value)) {
|
|
229
|
+
// isBold={false} should migrate to Tag
|
|
230
|
+
context.report({
|
|
231
|
+
node: node,
|
|
232
|
+
messageId: 'migrateTag',
|
|
233
|
+
fix: function fix(fixer) {
|
|
234
|
+
var replacement = generateTagReplacement(node, elementName);
|
|
235
|
+
return fixer.replaceText(node, replacement);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
} else if (isDynamicExpression(isBoldProp.value)) {
|
|
239
|
+
// Dynamic isBold requires manual review
|
|
240
|
+
context.report({
|
|
241
|
+
node: isBoldProp,
|
|
242
|
+
messageId: 'manualReview'
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
// isBold={true} or isBold (implicit true) - no action needed
|
|
246
|
+
} else {
|
|
247
|
+
// No isBold prop means implicit false, should migrate to Tag
|
|
248
|
+
context.report({
|
|
249
|
+
node: node,
|
|
250
|
+
messageId: 'migrateTag',
|
|
251
|
+
fix: function fix(fixer) {
|
|
252
|
+
var replacement = generateTagReplacement(node, elementName);
|
|
253
|
+
return fixer.replaceText(node, replacement);
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
export default rule;
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
import { isNodeOfType, literal } from 'eslint-codemod-utils';
|
|
6
6
|
import coreIconLabMetadata from '@atlaskit/icon-lab/metadata';
|
|
7
|
-
import { coreIconMetadata
|
|
7
|
+
import { coreIconMetadata } from '@atlaskit/icon/metadata';
|
|
8
8
|
import { pathWithCustomMessageId } from '../constants';
|
|
9
9
|
/**
|
|
10
10
|
* __Deprecation icon handler__
|
|
@@ -68,43 +68,42 @@ export var getDeprecationIconHandler = function getDeprecationIconHandler(contex
|
|
|
68
68
|
importSource = _Object$entries$_i[0],
|
|
69
69
|
error = _Object$entries$_i[1];
|
|
70
70
|
if (importSource.includes('/migration/')) {
|
|
71
|
-
var
|
|
71
|
+
var _coreIconMetadata$dep, _error$data;
|
|
72
72
|
var _importSource$split$s = importSource.split('/').slice(1),
|
|
73
73
|
_importSource$split$s2 = _slicedToArray(_importSource$split$s, 4),
|
|
74
74
|
_location = _importSource$split$s2[0],
|
|
75
|
-
|
|
75
|
+
_ = _importSource$split$s2[1],
|
|
76
76
|
_migration = _importSource$split$s2[2],
|
|
77
77
|
name = _importSource$split$s2[3];
|
|
78
|
-
var metadata = type === 'core' ? coreIconMetadata : utilityIconMetadata;
|
|
79
78
|
var _name$split = name.split('--'),
|
|
80
79
|
_name$split2 = _slicedToArray(_name$split, 2),
|
|
81
80
|
deprecatedIconName = _name$split2[0],
|
|
82
81
|
legacyIconName = _name$split2[1];
|
|
83
|
-
var replacement =
|
|
82
|
+
var replacement = (_coreIconMetadata$dep = coreIconMetadata[deprecatedIconName]) === null || _coreIconMetadata$dep === void 0 ? void 0 : _coreIconMetadata$dep.replacement;
|
|
84
83
|
if (replacement && ((_error$data = error.data) === null || _error$data === void 0 ? void 0 : _error$data.unfixable) === 'false') {
|
|
85
84
|
var newIconName = getIconComponentName(replacement.name);
|
|
86
85
|
if (!shouldTurnOffAutoFixer) {
|
|
87
|
-
addAutoFix(error, importSource, "".concat(replacement.location, "/
|
|
86
|
+
addAutoFix(error, importSource, "".concat(replacement.location, "/core/migration/").concat(replacement.name, "--").concat(legacyIconName), newIconName);
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
} else {
|
|
91
|
-
var
|
|
90
|
+
var _metadata;
|
|
92
91
|
var _importSource$split$s3 = importSource.split('/').slice(1),
|
|
93
92
|
_importSource$split$s4 = _slicedToArray(_importSource$split$s3, 3),
|
|
94
93
|
location = _importSource$split$s4[0],
|
|
95
|
-
|
|
94
|
+
_2 = _importSource$split$s4[1],
|
|
96
95
|
_name = _importSource$split$s4[2];
|
|
97
|
-
var
|
|
96
|
+
var metadata = void 0;
|
|
98
97
|
if (location === 'icon') {
|
|
99
|
-
|
|
98
|
+
metadata = coreIconMetadata;
|
|
100
99
|
} else if (location === 'icon-lab') {
|
|
101
|
-
|
|
100
|
+
metadata = coreIconLabMetadata;
|
|
102
101
|
}
|
|
103
|
-
var _replacement = (
|
|
102
|
+
var _replacement = (_metadata = metadata) === null || _metadata === void 0 || (_metadata = _metadata[_name]) === null || _metadata === void 0 ? void 0 : _metadata.replacement;
|
|
104
103
|
if (_replacement) {
|
|
105
104
|
var _newIconName = getIconComponentName(_replacement.name);
|
|
106
105
|
if (!shouldTurnOffAutoFixer) {
|
|
107
|
-
addAutoFix(error, importSource, "".concat(_replacement.location, "/
|
|
106
|
+
addAutoFix(error, importSource, "".concat(_replacement.location, "/core/").concat(_replacement.name), _newIconName);
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
}
|
|
@@ -71,10 +71,10 @@ var getNewIconNameAndImportPath = function getNewIconNameAndImportPath(iconPacka
|
|
|
71
71
|
return {};
|
|
72
72
|
}
|
|
73
73
|
var newIcon = migrationMapObject.newIcon;
|
|
74
|
-
var migrationPath = newIcon.name === legacyIconName ? "".concat(newIcon.package, "/
|
|
74
|
+
var migrationPath = newIcon.name === legacyIconName ? "".concat(newIcon.package, "/core/migration/").concat(newIcon.name) : "".concat(newIcon.package, "/core/migration/").concat(newIcon.name, "--").concat(legacyIconName.replaceAll('/', '-'));
|
|
75
75
|
return {
|
|
76
76
|
iconName: newIcon.name,
|
|
77
|
-
importPath: shouldUseMigrationPath ? migrationPath : "".concat(newIcon.package, "/
|
|
77
|
+
importPath: shouldUseMigrationPath ? migrationPath : "".concat(newIcon.package, "/core/").concat(newIcon.name)
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -4,13 +4,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { deprecatedCore as deprecatedIconLabCore, deprecatedUtility as deprecatedIconLabUtility } from '@atlaskit/icon-lab/deprecated-map';
|
|
7
|
-
import { deprecatedCore as deprecatedIconCore
|
|
7
|
+
import { deprecatedCore as deprecatedIconCore } from '@atlaskit/icon/deprecated-map';
|
|
8
8
|
export var getConfig = function getConfig(specifier) {
|
|
9
9
|
var configPath = path.resolve(__dirname, '..', '..', '..', 'configs', 'deprecated.json');
|
|
10
10
|
var source = fs.readFileSync(configPath, 'utf8');
|
|
11
11
|
var parsedConfig = JSON.parse(source);
|
|
12
12
|
var combinedConfig = _objectSpread(_objectSpread({}, parsedConfig), {}, {
|
|
13
|
-
imports: _objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
13
|
+
imports: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, parsedConfig.imports), deprecatedIconCore), deprecatedIconLabCore), deprecatedIconLabUtility)
|
|
14
14
|
});
|
|
15
15
|
return combinedConfig[specifier];
|
|
16
16
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::7fae089db9d7d7153fea58c673bd56af>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Linter } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::655d7f24171da0dff60003d0f235e48a>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { ESLint } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::44a03b30a12e3b52d720c16785c9c649>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Linter } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::0311febdad396820af1b01dd2825b63f>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { ESLint } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::75f94fc6b6fa998eed54b610e41bb9b1>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Rule } from 'eslint';
|
|
@@ -46,14 +46,12 @@ export declare const isSize: (size: any) => size is Size;
|
|
|
46
46
|
export declare const getMigrationMapObject: (iconPackage: string) => {
|
|
47
47
|
newIcon?: {
|
|
48
48
|
name: string;
|
|
49
|
-
type: string;
|
|
50
49
|
package: string;
|
|
51
50
|
isMigrationUnsafe?: boolean;
|
|
52
51
|
shouldForceSmallIcon?: boolean;
|
|
53
52
|
};
|
|
54
53
|
additionalIcons?: {
|
|
55
54
|
name: string;
|
|
56
|
-
type: string;
|
|
57
55
|
package: string;
|
|
58
56
|
}[];
|
|
59
57
|
sizeGuidance: Record<import("@atlaskit/icon").Size, IconMigrationSizeGuidance>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::7fae089db9d7d7153fea58c673bd56af>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Linter } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::655d7f24171da0dff60003d0f235e48a>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { ESLint } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::44a03b30a12e3b52d720c16785c9c649>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Linter } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::0311febdad396820af1b01dd2825b63f>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { ESLint } from 'eslint';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::75f94fc6b6fa998eed54b610e41bb9b1>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Rule } from 'eslint';
|
|
@@ -51,14 +51,12 @@ export declare const isSize: (size: any) => size is Size;
|
|
|
51
51
|
export declare const getMigrationMapObject: (iconPackage: string) => {
|
|
52
52
|
newIcon?: {
|
|
53
53
|
name: string;
|
|
54
|
-
type: string;
|
|
55
54
|
package: string;
|
|
56
55
|
isMigrationUnsafe?: boolean;
|
|
57
56
|
shouldForceSmallIcon?: boolean;
|
|
58
57
|
};
|
|
59
58
|
additionalIcons?: {
|
|
60
59
|
name: string;
|
|
61
|
-
type: string;
|
|
62
60
|
package: string;
|
|
63
61
|
}[];
|
|
64
62
|
sizeGuidance: Record<import("@atlaskit/icon").Size, IconMigrationSizeGuidance>;
|
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.24.0",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/eslint-utils": "^2.0.0",
|
|
42
|
-
"@atlaskit/icon": "^
|
|
43
|
-
"@atlaskit/icon-lab": "^5.
|
|
42
|
+
"@atlaskit/icon": "^29.0.0",
|
|
43
|
+
"@atlaskit/icon-lab": "^5.12.0",
|
|
44
44
|
"@atlaskit/tokens": "^8.0.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@typescript-eslint/utils": "^7.1.0",
|