@atlaskit/eslint-plugin-design-system 4.4.5 → 4.6.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 +18 -0
- package/dist/cjs/index.js +8 -4
- package/dist/cjs/rules/icon-label/index.js +134 -0
- package/dist/cjs/rules/no-deprecated-imports/logo-paths.js +61 -0
- package/dist/cjs/rules/no-deprecated-imports/paths.js +9 -0
- package/dist/cjs/rules/utils/jsx.js +13 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +7 -4
- package/dist/es2019/rules/icon-label/index.js +113 -0
- package/dist/es2019/rules/no-deprecated-imports/logo-paths.js +53 -0
- package/dist/es2019/rules/no-deprecated-imports/paths.js +7 -0
- package/dist/es2019/rules/utils/jsx.js +4 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +7 -4
- package/dist/esm/rules/icon-label/index.js +125 -0
- package/dist/esm/rules/no-deprecated-imports/logo-paths.js +53 -0
- package/dist/esm/rules/no-deprecated-imports/paths.js +7 -0
- package/dist/esm/rules/utils/jsx.js +6 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/rules/icon-label/index.d.ts +3 -0
- package/dist/types/rules/no-deprecated-imports/logo-paths.d.ts +8 -0
- package/dist/types/rules/no-deprecated-imports/paths.d.ts +12 -0
- package/dist/types/rules/utils/jsx.d.ts +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 4.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f561f58bc7a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f561f58bc7a) - Introduces a new rule `icon-label` to validate accessible usage of the icon components label prop when used with other design system components.
|
|
8
|
+
|
|
9
|
+
## 4.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b7235858f48`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b7235858f48) - Add new paths to the no-deprecated-imports rule for deprecated @atlaskit/logo exports.
|
|
14
|
+
|
|
15
|
+
## 4.4.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 4.4.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,6 +9,8 @@ exports.rules = exports.configs = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _ensureDesignTokenUsage = _interopRequireDefault(require("./rules/ensure-design-token-usage"));
|
|
11
11
|
|
|
12
|
+
var _iconLabel = _interopRequireDefault(require("./rules/icon-label"));
|
|
13
|
+
|
|
12
14
|
var _noDeprecatedApis = _interopRequireDefault(require("./rules/no-deprecated-apis"));
|
|
13
15
|
|
|
14
16
|
var _noDeprecatedDesignTokenUsage = _interopRequireDefault(require("./rules/no-deprecated-design-token-usage"));
|
|
@@ -21,10 +23,11 @@ var _useVisuallyHidden = _interopRequireDefault(require("./rules/use-visually-hi
|
|
|
21
23
|
|
|
22
24
|
var rules = {
|
|
23
25
|
'ensure-design-token-usage': _ensureDesignTokenUsage.default,
|
|
24
|
-
'
|
|
26
|
+
'icon-label': _iconLabel.default,
|
|
27
|
+
'no-deprecated-apis': _noDeprecatedApis.default,
|
|
25
28
|
'no-deprecated-design-token-usage': _noDeprecatedDesignTokenUsage.default,
|
|
26
29
|
'no-deprecated-imports': _noDeprecatedImports.default,
|
|
27
|
-
'no-
|
|
30
|
+
'no-unsafe-design-token-usage': _noUnsafeDesignTokenUsage.default,
|
|
28
31
|
'use-visually-hidden': _useVisuallyHidden.default
|
|
29
32
|
};
|
|
30
33
|
exports.rules = rules;
|
|
@@ -32,9 +35,10 @@ var configs = {
|
|
|
32
35
|
recommended: {
|
|
33
36
|
plugins: ['@atlaskit/design-system'],
|
|
34
37
|
rules: {
|
|
38
|
+
'@atlaskit/design-system/icon-label': 'warn',
|
|
39
|
+
'@atlaskit/design-system/no-deprecated-apis': 'warn',
|
|
35
40
|
'@atlaskit/design-system/no-deprecated-imports': 'error',
|
|
36
|
-
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
37
|
-
'@atlaskit/design-system/no-deprecated-apis': 'warn'
|
|
41
|
+
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _jsx = require("../utils/jsx");
|
|
9
|
+
|
|
10
|
+
var elements = ['AkButton', 'AKButton', 'Button', 'MenuItem', 'ButtonItem', 'CustomItem', 'CustomThemeButton', 'LoadingButton', 'BreadcrumbsItem'];
|
|
11
|
+
var elementsIconProps = ['iconBefore', 'iconAfter', 'icon'];
|
|
12
|
+
var rule = {
|
|
13
|
+
meta: {
|
|
14
|
+
fixable: 'code',
|
|
15
|
+
type: 'suggestion',
|
|
16
|
+
docs: {
|
|
17
|
+
url: 'http://go/adsc/icon/usage#accessibility-guidelines',
|
|
18
|
+
description: 'Enforces accessible usage of icon labels when composed with other Design System components.',
|
|
19
|
+
recommended: true
|
|
20
|
+
},
|
|
21
|
+
messages: {
|
|
22
|
+
unneededLabelPropContents: 'Label prop should be an empty string to prevent duplicate screen reader announcements. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.',
|
|
23
|
+
missingLabelProp: 'Missing label prop. If there is no supplementary text the label should describe what the icon is, else it should be an empty string. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.',
|
|
24
|
+
labelPropShouldHaveContents: 'Icon should have a meaningful label describing what the action is. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
create: function create(context) {
|
|
28
|
+
/**
|
|
29
|
+
* Contains a map of imported icon components from any atlaskit icon package.
|
|
30
|
+
*/
|
|
31
|
+
var iconImports = {};
|
|
32
|
+
return {
|
|
33
|
+
ImportDeclaration: function ImportDeclaration(node) {
|
|
34
|
+
var moduleSource = node.source.value;
|
|
35
|
+
|
|
36
|
+
if (typeof moduleSource === 'string' && ['@atlaskit/icon/glyph/'].find(function (val) {
|
|
37
|
+
return moduleSource.startsWith(val);
|
|
38
|
+
}) && node.specifiers.length) {
|
|
39
|
+
var defaultImport = node.specifiers.find(function (spec) {
|
|
40
|
+
return spec.type === 'ImportDefaultSpecifier';
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (!defaultImport) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var defaultImportName = defaultImport.local.name;
|
|
48
|
+
iconImports[defaultImportName] = true;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
JSXElement: function (_JSXElement) {
|
|
52
|
+
function JSXElement(_x) {
|
|
53
|
+
return _JSXElement.apply(this, arguments);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
JSXElement.toString = function () {
|
|
57
|
+
return _JSXElement.toString();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return JSXElement;
|
|
61
|
+
}(function (node) {
|
|
62
|
+
if (node.openingElement.name.type !== 'JSXIdentifier') {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var name = node.openingElement.name.name;
|
|
67
|
+
|
|
68
|
+
if (elements.includes(name)) {
|
|
69
|
+
// We've found a DS component that might use icons, let's check them.
|
|
70
|
+
var iconProps = node.openingElement.attributes.filter(function (attr) {
|
|
71
|
+
return attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier' && elementsIconProps.includes(attr.name.name);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (iconProps.length) {
|
|
75
|
+
// This found element has icon props, and it has children. Let's make sure any icon usage has an empty string label.
|
|
76
|
+
iconProps.forEach(function (prop) {
|
|
77
|
+
var _prop$value;
|
|
78
|
+
|
|
79
|
+
if (prop.type !== 'JSXAttribute' || (prop === null || prop === void 0 ? void 0 : (_prop$value = prop.value) === null || _prop$value === void 0 ? void 0 : _prop$value.type) !== 'JSXExpressionContainer') {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var hasOtherDefinedLabel = !!node.children.length || !!(0, _jsx.findProp)(node, 'aria-label');
|
|
84
|
+
var expression = prop.value.expression;
|
|
85
|
+
|
|
86
|
+
if (expression.type !== 'JSXElement' || expression.openingElement.name.type !== 'JSXIdentifier') {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (iconImports[expression.openingElement.name.name]) {
|
|
91
|
+
// We've found an icon from @atlaskit - let's get to work.
|
|
92
|
+
var labelProp = (0, _jsx.findProp)(expression, 'label');
|
|
93
|
+
|
|
94
|
+
if (labelProp && labelProp.value && labelProp.value.type === 'Literal') {
|
|
95
|
+
var isEmptyStringLabel = labelProp.value.value === '';
|
|
96
|
+
|
|
97
|
+
if (hasOtherDefinedLabel && !isEmptyStringLabel) {
|
|
98
|
+
context.report({
|
|
99
|
+
node: labelProp,
|
|
100
|
+
messageId: 'unneededLabelPropContents',
|
|
101
|
+
fix: function fix(fixer) {
|
|
102
|
+
return fixer.replaceText(labelProp.value, '""');
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
} else if (!hasOtherDefinedLabel && isEmptyStringLabel) {
|
|
106
|
+
context.report({
|
|
107
|
+
node: labelProp,
|
|
108
|
+
messageId: 'labelPropShouldHaveContents'
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (iconImports[name]) {
|
|
118
|
+
// We've found an icon from @atlaskit - let's get to work.
|
|
119
|
+
var hasLabelProp = (0, _jsx.findProp)(node, 'label');
|
|
120
|
+
|
|
121
|
+
if (!hasLabelProp) {
|
|
122
|
+
context.report({
|
|
123
|
+
node: node.openingElement,
|
|
124
|
+
messageId: 'missingLabelProp'
|
|
125
|
+
});
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var _default = rule;
|
|
134
|
+
exports.default = _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.namedLogoExports = exports.namedLogoConstantsExports = void 0;
|
|
7
|
+
var namedLogoConstantsExports = [{
|
|
8
|
+
importName: 'DefaultProps',
|
|
9
|
+
message: 'DefaultProps has been renamed to defaultLogoParams.'
|
|
10
|
+
}, {
|
|
11
|
+
importName: 'Props',
|
|
12
|
+
message: 'Props has been renamed to LogoProps.'
|
|
13
|
+
}];
|
|
14
|
+
exports.namedLogoConstantsExports = namedLogoConstantsExports;
|
|
15
|
+
var namedLogoExports = [{
|
|
16
|
+
importName: 'StrideLogo',
|
|
17
|
+
message: 'StrideLogo is deprecated. Stride is no longer an Atlassian product.'
|
|
18
|
+
}, {
|
|
19
|
+
importName: 'StrideIcon',
|
|
20
|
+
message: 'StrideIcon is deprecated. Stride is no longer an Atlassian product.'
|
|
21
|
+
}, {
|
|
22
|
+
importName: 'StrideWordmark',
|
|
23
|
+
message: 'StrideWordmark is deprecated. Stride is no longer an Atlassian product.'
|
|
24
|
+
}, {
|
|
25
|
+
importName: 'HipchatLogo',
|
|
26
|
+
message: 'HipchatLogo is deprecated. Hipchat is no longer an Atlassian product.'
|
|
27
|
+
}, {
|
|
28
|
+
importName: 'HipchatIcon',
|
|
29
|
+
message: 'HipchatIcon is deprecated. Hipchat is no longer an Atlassian product.'
|
|
30
|
+
}, {
|
|
31
|
+
importName: 'HipchatWordmark',
|
|
32
|
+
message: 'HipchatWordmark is deprecated. Hipchat is no longer an Atlassian product.'
|
|
33
|
+
}, {
|
|
34
|
+
importName: 'JiraCoreLogo',
|
|
35
|
+
message: 'JiraCoreLogo is deprecated. Please use JiraWorkManagementLogo instead.'
|
|
36
|
+
}, {
|
|
37
|
+
importName: 'JiraCoreIcon',
|
|
38
|
+
message: 'JiraCoreIcon is deprecated. Please use JiraWorkManagementIcon instead.'
|
|
39
|
+
}, {
|
|
40
|
+
importName: 'JiraCoreWordmark',
|
|
41
|
+
message: 'JiraCoreWordmark is deprecated. Please use JiraWorkManagementWordmark instead.'
|
|
42
|
+
}, {
|
|
43
|
+
importName: 'JiraServiceDeskLogo',
|
|
44
|
+
message: 'JiraServiceDeskLogo is deprecated. Please use JiraServiceManagementLogo instead.'
|
|
45
|
+
}, {
|
|
46
|
+
importName: 'JiraServiceDeskIcon',
|
|
47
|
+
message: 'JiraServiceDeskIcon is deprecated. Please use JiraServiceManagementIcon instead.'
|
|
48
|
+
}, {
|
|
49
|
+
importName: 'JiraServiceDeskWordmark',
|
|
50
|
+
message: 'JiraServiceDeskWordmark is deprecated. Please use JiraServiceManagementWordmark instead.'
|
|
51
|
+
}, {
|
|
52
|
+
importName: 'OpsGenieLogo',
|
|
53
|
+
message: 'OpsGenieLogo was incorrectly spelled and has been marked deprecated. Please use OpsgenieLogo instead (no capital "g").'
|
|
54
|
+
}, {
|
|
55
|
+
importName: 'OpsGenieIcon',
|
|
56
|
+
message: 'OpsGenieIcon was incorrectly spelled and has been marked deprecated. Please use OpsgenieIcon instead (no capital "g").'
|
|
57
|
+
}, {
|
|
58
|
+
importName: 'OpsGenieWordmark',
|
|
59
|
+
message: 'OpsGenieWordmark was incorrectly spelled and is deprecated. Please use OpsgenieWordmark instead (no capital "g").'
|
|
60
|
+
}];
|
|
61
|
+
exports.namedLogoExports = namedLogoExports;
|
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.restrictedPaths = exports.namedThemeExports = void 0;
|
|
7
|
+
|
|
8
|
+
var _logoPaths = require("./logo-paths");
|
|
9
|
+
|
|
7
10
|
var namedThemeExports = [{
|
|
8
11
|
importName: 'assistive',
|
|
9
12
|
message: 'The assistive mixin is deprecated. Please use `@atlaskit/visually-hidden` instead.'
|
|
@@ -74,5 +77,11 @@ var restrictedPaths = [{
|
|
|
74
77
|
}, {
|
|
75
78
|
path: '@atlaskit/icon-priority',
|
|
76
79
|
message: "icon-priority is deprecated due to limited usage in Cloud products. It will be deleted after 21 April 2022."
|
|
80
|
+
}, {
|
|
81
|
+
path: '@atlaskit/logo/constants',
|
|
82
|
+
imports: _logoPaths.namedLogoConstantsExports
|
|
83
|
+
}, {
|
|
84
|
+
path: '@atlaskit/logo',
|
|
85
|
+
imports: _logoPaths.namedLogoExports
|
|
77
86
|
}];
|
|
78
87
|
exports.restrictedPaths = restrictedPaths;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.findProp = findProp;
|
|
7
|
+
|
|
8
|
+
function findProp(jsx, propName) {
|
|
9
|
+
var labelProp = jsx.openingElement.attributes.find(function (attr) {
|
|
10
|
+
return attr.type === 'JSXAttribute' && attr.name.name === propName;
|
|
11
|
+
});
|
|
12
|
+
return labelProp;
|
|
13
|
+
}
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ensureTokenUsage from './rules/ensure-design-token-usage';
|
|
2
|
+
import iconLabel from './rules/icon-label';
|
|
2
3
|
import noDeprecatedAPIs from './rules/no-deprecated-apis';
|
|
3
4
|
import noDeprecatedUsage from './rules/no-deprecated-design-token-usage';
|
|
4
5
|
import noDeprecatedImports from './rules/no-deprecated-imports';
|
|
@@ -6,19 +7,21 @@ import noUnsafeUsage from './rules/no-unsafe-design-token-usage';
|
|
|
6
7
|
import useVisuallyHidden from './rules/use-visually-hidden';
|
|
7
8
|
export const rules = {
|
|
8
9
|
'ensure-design-token-usage': ensureTokenUsage,
|
|
9
|
-
'
|
|
10
|
+
'icon-label': iconLabel,
|
|
11
|
+
'no-deprecated-apis': noDeprecatedAPIs,
|
|
10
12
|
'no-deprecated-design-token-usage': noDeprecatedUsage,
|
|
11
13
|
'no-deprecated-imports': noDeprecatedImports,
|
|
12
|
-
'no-
|
|
14
|
+
'no-unsafe-design-token-usage': noUnsafeUsage,
|
|
13
15
|
'use-visually-hidden': useVisuallyHidden
|
|
14
16
|
};
|
|
15
17
|
export const configs = {
|
|
16
18
|
recommended: {
|
|
17
19
|
plugins: ['@atlaskit/design-system'],
|
|
18
20
|
rules: {
|
|
21
|
+
'@atlaskit/design-system/icon-label': 'warn',
|
|
22
|
+
'@atlaskit/design-system/no-deprecated-apis': 'warn',
|
|
19
23
|
'@atlaskit/design-system/no-deprecated-imports': 'error',
|
|
20
|
-
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
21
|
-
'@atlaskit/design-system/no-deprecated-apis': 'warn'
|
|
24
|
+
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { findProp } from '../utils/jsx';
|
|
2
|
+
const elements = ['AkButton', 'AKButton', 'Button', 'MenuItem', 'ButtonItem', 'CustomItem', 'CustomThemeButton', 'LoadingButton', 'BreadcrumbsItem'];
|
|
3
|
+
const elementsIconProps = ['iconBefore', 'iconAfter', 'icon'];
|
|
4
|
+
const rule = {
|
|
5
|
+
meta: {
|
|
6
|
+
fixable: 'code',
|
|
7
|
+
type: 'suggestion',
|
|
8
|
+
docs: {
|
|
9
|
+
url: 'http://go/adsc/icon/usage#accessibility-guidelines',
|
|
10
|
+
description: 'Enforces accessible usage of icon labels when composed with other Design System components.',
|
|
11
|
+
recommended: true
|
|
12
|
+
},
|
|
13
|
+
messages: {
|
|
14
|
+
unneededLabelPropContents: 'Label prop should be an empty string to prevent duplicate screen reader announcements. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.',
|
|
15
|
+
missingLabelProp: 'Missing label prop. If there is no supplementary text the label should describe what the icon is, else it should be an empty string. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.',
|
|
16
|
+
labelPropShouldHaveContents: 'Icon should have a meaningful label describing what the action is. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
create(context) {
|
|
21
|
+
/**
|
|
22
|
+
* Contains a map of imported icon components from any atlaskit icon package.
|
|
23
|
+
*/
|
|
24
|
+
const iconImports = {};
|
|
25
|
+
return {
|
|
26
|
+
ImportDeclaration(node) {
|
|
27
|
+
const moduleSource = node.source.value;
|
|
28
|
+
|
|
29
|
+
if (typeof moduleSource === 'string' && ['@atlaskit/icon/glyph/'].find(val => moduleSource.startsWith(val)) && node.specifiers.length) {
|
|
30
|
+
const defaultImport = node.specifiers.find(spec => spec.type === 'ImportDefaultSpecifier');
|
|
31
|
+
|
|
32
|
+
if (!defaultImport) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const defaultImportName = defaultImport.local.name;
|
|
37
|
+
iconImports[defaultImportName] = true;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
JSXElement(node) {
|
|
42
|
+
if (node.openingElement.name.type !== 'JSXIdentifier') {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const name = node.openingElement.name.name;
|
|
47
|
+
|
|
48
|
+
if (elements.includes(name)) {
|
|
49
|
+
// We've found a DS component that might use icons, let's check them.
|
|
50
|
+
const iconProps = node.openingElement.attributes.filter(attr => attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier' && elementsIconProps.includes(attr.name.name));
|
|
51
|
+
|
|
52
|
+
if (iconProps.length) {
|
|
53
|
+
// This found element has icon props, and it has children. Let's make sure any icon usage has an empty string label.
|
|
54
|
+
iconProps.forEach(prop => {
|
|
55
|
+
var _prop$value;
|
|
56
|
+
|
|
57
|
+
if (prop.type !== 'JSXAttribute' || (prop === null || prop === void 0 ? void 0 : (_prop$value = prop.value) === null || _prop$value === void 0 ? void 0 : _prop$value.type) !== 'JSXExpressionContainer') {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const hasOtherDefinedLabel = !!node.children.length || !!findProp(node, 'aria-label');
|
|
62
|
+
const expression = prop.value.expression;
|
|
63
|
+
|
|
64
|
+
if (expression.type !== 'JSXElement' || expression.openingElement.name.type !== 'JSXIdentifier') {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (iconImports[expression.openingElement.name.name]) {
|
|
69
|
+
// We've found an icon from @atlaskit - let's get to work.
|
|
70
|
+
const labelProp = findProp(expression, 'label');
|
|
71
|
+
|
|
72
|
+
if (labelProp && labelProp.value && labelProp.value.type === 'Literal') {
|
|
73
|
+
const isEmptyStringLabel = labelProp.value.value === '';
|
|
74
|
+
|
|
75
|
+
if (hasOtherDefinedLabel && !isEmptyStringLabel) {
|
|
76
|
+
context.report({
|
|
77
|
+
node: labelProp,
|
|
78
|
+
messageId: 'unneededLabelPropContents',
|
|
79
|
+
fix: fixer => {
|
|
80
|
+
return fixer.replaceText(labelProp.value, '""');
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
} else if (!hasOtherDefinedLabel && isEmptyStringLabel) {
|
|
84
|
+
context.report({
|
|
85
|
+
node: labelProp,
|
|
86
|
+
messageId: 'labelPropShouldHaveContents'
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (iconImports[name]) {
|
|
96
|
+
// We've found an icon from @atlaskit - let's get to work.
|
|
97
|
+
const hasLabelProp = findProp(node, 'label');
|
|
98
|
+
|
|
99
|
+
if (!hasLabelProp) {
|
|
100
|
+
context.report({
|
|
101
|
+
node: node.openingElement,
|
|
102
|
+
messageId: 'missingLabelProp'
|
|
103
|
+
});
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
};
|
|
113
|
+
export default rule;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const namedLogoConstantsExports = [{
|
|
2
|
+
importName: 'DefaultProps',
|
|
3
|
+
message: 'DefaultProps has been renamed to defaultLogoParams.'
|
|
4
|
+
}, {
|
|
5
|
+
importName: 'Props',
|
|
6
|
+
message: 'Props has been renamed to LogoProps.'
|
|
7
|
+
}];
|
|
8
|
+
export const namedLogoExports = [{
|
|
9
|
+
importName: 'StrideLogo',
|
|
10
|
+
message: 'StrideLogo is deprecated. Stride is no longer an Atlassian product.'
|
|
11
|
+
}, {
|
|
12
|
+
importName: 'StrideIcon',
|
|
13
|
+
message: 'StrideIcon is deprecated. Stride is no longer an Atlassian product.'
|
|
14
|
+
}, {
|
|
15
|
+
importName: 'StrideWordmark',
|
|
16
|
+
message: 'StrideWordmark is deprecated. Stride is no longer an Atlassian product.'
|
|
17
|
+
}, {
|
|
18
|
+
importName: 'HipchatLogo',
|
|
19
|
+
message: 'HipchatLogo is deprecated. Hipchat is no longer an Atlassian product.'
|
|
20
|
+
}, {
|
|
21
|
+
importName: 'HipchatIcon',
|
|
22
|
+
message: 'HipchatIcon is deprecated. Hipchat is no longer an Atlassian product.'
|
|
23
|
+
}, {
|
|
24
|
+
importName: 'HipchatWordmark',
|
|
25
|
+
message: 'HipchatWordmark is deprecated. Hipchat is no longer an Atlassian product.'
|
|
26
|
+
}, {
|
|
27
|
+
importName: 'JiraCoreLogo',
|
|
28
|
+
message: 'JiraCoreLogo is deprecated. Please use JiraWorkManagementLogo instead.'
|
|
29
|
+
}, {
|
|
30
|
+
importName: 'JiraCoreIcon',
|
|
31
|
+
message: 'JiraCoreIcon is deprecated. Please use JiraWorkManagementIcon instead.'
|
|
32
|
+
}, {
|
|
33
|
+
importName: 'JiraCoreWordmark',
|
|
34
|
+
message: 'JiraCoreWordmark is deprecated. Please use JiraWorkManagementWordmark instead.'
|
|
35
|
+
}, {
|
|
36
|
+
importName: 'JiraServiceDeskLogo',
|
|
37
|
+
message: 'JiraServiceDeskLogo is deprecated. Please use JiraServiceManagementLogo instead.'
|
|
38
|
+
}, {
|
|
39
|
+
importName: 'JiraServiceDeskIcon',
|
|
40
|
+
message: 'JiraServiceDeskIcon is deprecated. Please use JiraServiceManagementIcon instead.'
|
|
41
|
+
}, {
|
|
42
|
+
importName: 'JiraServiceDeskWordmark',
|
|
43
|
+
message: 'JiraServiceDeskWordmark is deprecated. Please use JiraServiceManagementWordmark instead.'
|
|
44
|
+
}, {
|
|
45
|
+
importName: 'OpsGenieLogo',
|
|
46
|
+
message: 'OpsGenieLogo was incorrectly spelled and has been marked deprecated. Please use OpsgenieLogo instead (no capital "g").'
|
|
47
|
+
}, {
|
|
48
|
+
importName: 'OpsGenieIcon',
|
|
49
|
+
message: 'OpsGenieIcon was incorrectly spelled and has been marked deprecated. Please use OpsgenieIcon instead (no capital "g").'
|
|
50
|
+
}, {
|
|
51
|
+
importName: 'OpsGenieWordmark',
|
|
52
|
+
message: 'OpsGenieWordmark was incorrectly spelled and is deprecated. Please use OpsgenieWordmark instead (no capital "g").'
|
|
53
|
+
}];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { namedLogoConstantsExports, namedLogoExports } from './logo-paths';
|
|
1
2
|
export const namedThemeExports = [{
|
|
2
3
|
importName: 'assistive',
|
|
3
4
|
message: 'The assistive mixin is deprecated. Please use `@atlaskit/visually-hidden` instead.'
|
|
@@ -67,4 +68,10 @@ export const restrictedPaths = [{
|
|
|
67
68
|
}, {
|
|
68
69
|
path: '@atlaskit/icon-priority',
|
|
69
70
|
message: `icon-priority is deprecated due to limited usage in Cloud products. It will be deleted after 21 April 2022.`
|
|
71
|
+
}, {
|
|
72
|
+
path: '@atlaskit/logo/constants',
|
|
73
|
+
imports: namedLogoConstantsExports
|
|
74
|
+
}, {
|
|
75
|
+
path: '@atlaskit/logo',
|
|
76
|
+
imports: namedLogoExports
|
|
70
77
|
}];
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ensureTokenUsage from './rules/ensure-design-token-usage';
|
|
2
|
+
import iconLabel from './rules/icon-label';
|
|
2
3
|
import noDeprecatedAPIs from './rules/no-deprecated-apis';
|
|
3
4
|
import noDeprecatedUsage from './rules/no-deprecated-design-token-usage';
|
|
4
5
|
import noDeprecatedImports from './rules/no-deprecated-imports';
|
|
@@ -6,19 +7,21 @@ import noUnsafeUsage from './rules/no-unsafe-design-token-usage';
|
|
|
6
7
|
import useVisuallyHidden from './rules/use-visually-hidden';
|
|
7
8
|
export var rules = {
|
|
8
9
|
'ensure-design-token-usage': ensureTokenUsage,
|
|
9
|
-
'
|
|
10
|
+
'icon-label': iconLabel,
|
|
11
|
+
'no-deprecated-apis': noDeprecatedAPIs,
|
|
10
12
|
'no-deprecated-design-token-usage': noDeprecatedUsage,
|
|
11
13
|
'no-deprecated-imports': noDeprecatedImports,
|
|
12
|
-
'no-
|
|
14
|
+
'no-unsafe-design-token-usage': noUnsafeUsage,
|
|
13
15
|
'use-visually-hidden': useVisuallyHidden
|
|
14
16
|
};
|
|
15
17
|
export var configs = {
|
|
16
18
|
recommended: {
|
|
17
19
|
plugins: ['@atlaskit/design-system'],
|
|
18
20
|
rules: {
|
|
21
|
+
'@atlaskit/design-system/icon-label': 'warn',
|
|
22
|
+
'@atlaskit/design-system/no-deprecated-apis': 'warn',
|
|
19
23
|
'@atlaskit/design-system/no-deprecated-imports': 'error',
|
|
20
|
-
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
21
|
-
'@atlaskit/design-system/no-deprecated-apis': 'warn'
|
|
24
|
+
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { findProp } from '../utils/jsx';
|
|
2
|
+
var elements = ['AkButton', 'AKButton', 'Button', 'MenuItem', 'ButtonItem', 'CustomItem', 'CustomThemeButton', 'LoadingButton', 'BreadcrumbsItem'];
|
|
3
|
+
var elementsIconProps = ['iconBefore', 'iconAfter', 'icon'];
|
|
4
|
+
var rule = {
|
|
5
|
+
meta: {
|
|
6
|
+
fixable: 'code',
|
|
7
|
+
type: 'suggestion',
|
|
8
|
+
docs: {
|
|
9
|
+
url: 'http://go/adsc/icon/usage#accessibility-guidelines',
|
|
10
|
+
description: 'Enforces accessible usage of icon labels when composed with other Design System components.',
|
|
11
|
+
recommended: true
|
|
12
|
+
},
|
|
13
|
+
messages: {
|
|
14
|
+
unneededLabelPropContents: 'Label prop should be an empty string to prevent duplicate screen reader announcements. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.',
|
|
15
|
+
missingLabelProp: 'Missing label prop. If there is no supplementary text the label should describe what the icon is, else it should be an empty string. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.',
|
|
16
|
+
labelPropShouldHaveContents: 'Icon should have a meaningful label describing what the action is. Learn more here: http://go/adsc/icon/usage#accessibility-guidelines.'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
create: function create(context) {
|
|
20
|
+
/**
|
|
21
|
+
* Contains a map of imported icon components from any atlaskit icon package.
|
|
22
|
+
*/
|
|
23
|
+
var iconImports = {};
|
|
24
|
+
return {
|
|
25
|
+
ImportDeclaration: function ImportDeclaration(node) {
|
|
26
|
+
var moduleSource = node.source.value;
|
|
27
|
+
|
|
28
|
+
if (typeof moduleSource === 'string' && ['@atlaskit/icon/glyph/'].find(function (val) {
|
|
29
|
+
return moduleSource.startsWith(val);
|
|
30
|
+
}) && node.specifiers.length) {
|
|
31
|
+
var defaultImport = node.specifiers.find(function (spec) {
|
|
32
|
+
return spec.type === 'ImportDefaultSpecifier';
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (!defaultImport) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
var defaultImportName = defaultImport.local.name;
|
|
40
|
+
iconImports[defaultImportName] = true;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
JSXElement: function (_JSXElement) {
|
|
44
|
+
function JSXElement(_x) {
|
|
45
|
+
return _JSXElement.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
JSXElement.toString = function () {
|
|
49
|
+
return _JSXElement.toString();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return JSXElement;
|
|
53
|
+
}(function (node) {
|
|
54
|
+
if (node.openingElement.name.type !== 'JSXIdentifier') {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var name = node.openingElement.name.name;
|
|
59
|
+
|
|
60
|
+
if (elements.includes(name)) {
|
|
61
|
+
// We've found a DS component that might use icons, let's check them.
|
|
62
|
+
var iconProps = node.openingElement.attributes.filter(function (attr) {
|
|
63
|
+
return attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier' && elementsIconProps.includes(attr.name.name);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (iconProps.length) {
|
|
67
|
+
// This found element has icon props, and it has children. Let's make sure any icon usage has an empty string label.
|
|
68
|
+
iconProps.forEach(function (prop) {
|
|
69
|
+
var _prop$value;
|
|
70
|
+
|
|
71
|
+
if (prop.type !== 'JSXAttribute' || (prop === null || prop === void 0 ? void 0 : (_prop$value = prop.value) === null || _prop$value === void 0 ? void 0 : _prop$value.type) !== 'JSXExpressionContainer') {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
var hasOtherDefinedLabel = !!node.children.length || !!findProp(node, 'aria-label');
|
|
76
|
+
var expression = prop.value.expression;
|
|
77
|
+
|
|
78
|
+
if (expression.type !== 'JSXElement' || expression.openingElement.name.type !== 'JSXIdentifier') {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (iconImports[expression.openingElement.name.name]) {
|
|
83
|
+
// We've found an icon from @atlaskit - let's get to work.
|
|
84
|
+
var labelProp = findProp(expression, 'label');
|
|
85
|
+
|
|
86
|
+
if (labelProp && labelProp.value && labelProp.value.type === 'Literal') {
|
|
87
|
+
var isEmptyStringLabel = labelProp.value.value === '';
|
|
88
|
+
|
|
89
|
+
if (hasOtherDefinedLabel && !isEmptyStringLabel) {
|
|
90
|
+
context.report({
|
|
91
|
+
node: labelProp,
|
|
92
|
+
messageId: 'unneededLabelPropContents',
|
|
93
|
+
fix: function fix(fixer) {
|
|
94
|
+
return fixer.replaceText(labelProp.value, '""');
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
} else if (!hasOtherDefinedLabel && isEmptyStringLabel) {
|
|
98
|
+
context.report({
|
|
99
|
+
node: labelProp,
|
|
100
|
+
messageId: 'labelPropShouldHaveContents'
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (iconImports[name]) {
|
|
110
|
+
// We've found an icon from @atlaskit - let's get to work.
|
|
111
|
+
var hasLabelProp = findProp(node, 'label');
|
|
112
|
+
|
|
113
|
+
if (!hasLabelProp) {
|
|
114
|
+
context.report({
|
|
115
|
+
node: node.openingElement,
|
|
116
|
+
messageId: 'missingLabelProp'
|
|
117
|
+
});
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export default rule;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export var namedLogoConstantsExports = [{
|
|
2
|
+
importName: 'DefaultProps',
|
|
3
|
+
message: 'DefaultProps has been renamed to defaultLogoParams.'
|
|
4
|
+
}, {
|
|
5
|
+
importName: 'Props',
|
|
6
|
+
message: 'Props has been renamed to LogoProps.'
|
|
7
|
+
}];
|
|
8
|
+
export var namedLogoExports = [{
|
|
9
|
+
importName: 'StrideLogo',
|
|
10
|
+
message: 'StrideLogo is deprecated. Stride is no longer an Atlassian product.'
|
|
11
|
+
}, {
|
|
12
|
+
importName: 'StrideIcon',
|
|
13
|
+
message: 'StrideIcon is deprecated. Stride is no longer an Atlassian product.'
|
|
14
|
+
}, {
|
|
15
|
+
importName: 'StrideWordmark',
|
|
16
|
+
message: 'StrideWordmark is deprecated. Stride is no longer an Atlassian product.'
|
|
17
|
+
}, {
|
|
18
|
+
importName: 'HipchatLogo',
|
|
19
|
+
message: 'HipchatLogo is deprecated. Hipchat is no longer an Atlassian product.'
|
|
20
|
+
}, {
|
|
21
|
+
importName: 'HipchatIcon',
|
|
22
|
+
message: 'HipchatIcon is deprecated. Hipchat is no longer an Atlassian product.'
|
|
23
|
+
}, {
|
|
24
|
+
importName: 'HipchatWordmark',
|
|
25
|
+
message: 'HipchatWordmark is deprecated. Hipchat is no longer an Atlassian product.'
|
|
26
|
+
}, {
|
|
27
|
+
importName: 'JiraCoreLogo',
|
|
28
|
+
message: 'JiraCoreLogo is deprecated. Please use JiraWorkManagementLogo instead.'
|
|
29
|
+
}, {
|
|
30
|
+
importName: 'JiraCoreIcon',
|
|
31
|
+
message: 'JiraCoreIcon is deprecated. Please use JiraWorkManagementIcon instead.'
|
|
32
|
+
}, {
|
|
33
|
+
importName: 'JiraCoreWordmark',
|
|
34
|
+
message: 'JiraCoreWordmark is deprecated. Please use JiraWorkManagementWordmark instead.'
|
|
35
|
+
}, {
|
|
36
|
+
importName: 'JiraServiceDeskLogo',
|
|
37
|
+
message: 'JiraServiceDeskLogo is deprecated. Please use JiraServiceManagementLogo instead.'
|
|
38
|
+
}, {
|
|
39
|
+
importName: 'JiraServiceDeskIcon',
|
|
40
|
+
message: 'JiraServiceDeskIcon is deprecated. Please use JiraServiceManagementIcon instead.'
|
|
41
|
+
}, {
|
|
42
|
+
importName: 'JiraServiceDeskWordmark',
|
|
43
|
+
message: 'JiraServiceDeskWordmark is deprecated. Please use JiraServiceManagementWordmark instead.'
|
|
44
|
+
}, {
|
|
45
|
+
importName: 'OpsGenieLogo',
|
|
46
|
+
message: 'OpsGenieLogo was incorrectly spelled and has been marked deprecated. Please use OpsgenieLogo instead (no capital "g").'
|
|
47
|
+
}, {
|
|
48
|
+
importName: 'OpsGenieIcon',
|
|
49
|
+
message: 'OpsGenieIcon was incorrectly spelled and has been marked deprecated. Please use OpsgenieIcon instead (no capital "g").'
|
|
50
|
+
}, {
|
|
51
|
+
importName: 'OpsGenieWordmark',
|
|
52
|
+
message: 'OpsGenieWordmark was incorrectly spelled and is deprecated. Please use OpsgenieWordmark instead (no capital "g").'
|
|
53
|
+
}];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { namedLogoConstantsExports, namedLogoExports } from './logo-paths';
|
|
1
2
|
export var namedThemeExports = [{
|
|
2
3
|
importName: 'assistive',
|
|
3
4
|
message: 'The assistive mixin is deprecated. Please use `@atlaskit/visually-hidden` instead.'
|
|
@@ -67,4 +68,10 @@ export var restrictedPaths = [{
|
|
|
67
68
|
}, {
|
|
68
69
|
path: '@atlaskit/icon-priority',
|
|
69
70
|
message: "icon-priority is deprecated due to limited usage in Cloud products. It will be deleted after 21 April 2022."
|
|
71
|
+
}, {
|
|
72
|
+
path: '@atlaskit/logo/constants',
|
|
73
|
+
imports: namedLogoConstantsExports
|
|
74
|
+
}, {
|
|
75
|
+
path: '@atlaskit/logo',
|
|
76
|
+
imports: namedLogoExports
|
|
70
77
|
}];
|
package/dist/esm/version.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
export declare const rules: {
|
|
2
2
|
'ensure-design-token-usage': import("eslint").Rule.RuleModule;
|
|
3
|
-
'
|
|
3
|
+
'icon-label': import("eslint").Rule.RuleModule;
|
|
4
|
+
'no-deprecated-apis': import("eslint").Rule.RuleModule;
|
|
4
5
|
'no-deprecated-design-token-usage': import("eslint").Rule.RuleModule;
|
|
5
6
|
'no-deprecated-imports': import("eslint").Rule.RuleModule;
|
|
6
|
-
'no-
|
|
7
|
+
'no-unsafe-design-token-usage': import("eslint").Rule.RuleModule;
|
|
7
8
|
'use-visually-hidden': import("eslint").Rule.RuleModule;
|
|
8
9
|
};
|
|
9
10
|
export declare const configs: {
|
|
10
11
|
recommended: {
|
|
11
12
|
plugins: string[];
|
|
12
13
|
rules: {
|
|
14
|
+
'@atlaskit/design-system/icon-label': string;
|
|
15
|
+
'@atlaskit/design-system/no-deprecated-apis': string;
|
|
13
16
|
'@atlaskit/design-system/no-deprecated-imports': string;
|
|
14
17
|
'@atlaskit/design-system/use-visually-hidden': string;
|
|
15
|
-
'@atlaskit/design-system/no-deprecated-apis': string;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
};
|
|
@@ -59,4 +59,16 @@ export declare const restrictedPaths: readonly [{
|
|
|
59
59
|
}, {
|
|
60
60
|
readonly path: "@atlaskit/icon-priority";
|
|
61
61
|
readonly message: "icon-priority is deprecated due to limited usage in Cloud products. It will be deleted after 21 April 2022.";
|
|
62
|
+
}, {
|
|
63
|
+
readonly path: "@atlaskit/logo/constants";
|
|
64
|
+
readonly imports: {
|
|
65
|
+
importName: string;
|
|
66
|
+
message: string;
|
|
67
|
+
}[];
|
|
68
|
+
}, {
|
|
69
|
+
readonly path: "@atlaskit/logo";
|
|
70
|
+
readonly imports: {
|
|
71
|
+
importName: string;
|
|
72
|
+
message: string;
|
|
73
|
+
}[];
|
|
62
74
|
}];
|
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": "4.
|
|
4
|
+
"version": "4.6.0",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"draft": true
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
18
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
19
19
|
"main": "dist/cjs/index.js",
|
|
20
20
|
"module": "dist/esm/index.js",
|
|
21
21
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
".": "./src/index.tsx"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/tokens": "^0.
|
|
29
|
+
"@atlaskit/tokens": "^0.10.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0",
|
|
31
31
|
"eslint-codemod-utils": "^1.3.2"
|
|
32
32
|
},
|