@atlaskit/eslint-plugin-design-system 13.27.1 → 13.28.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 +7 -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/use-field-message-wrapper/index.js +125 -0
- 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/use-field-message-wrapper/index.js +115 -0
- 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/use-field-message-wrapper/index.js +119 -0
- 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/use-field-message-wrapper/index.d.ts +3 -0
- 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/use-field-message-wrapper/index.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 13.28.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3f069f2616f1b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f069f2616f1b) -
|
|
8
|
+
Add rule to enforce usage of message wrapper for field messaging components.
|
|
9
|
+
|
|
3
10
|
## 13.27.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -102,6 +102,7 @@ module.exports = {
|
|
|
102
102
|
| <a href="./packages/design-system/eslint-plugin/src/rules/use-cx-function-in-xcss/README.md">use-cx-function-in-xcss</a> | Enforces cx function use to combine styles in xcss. | Yes | Yes | Yes |
|
|
103
103
|
| <a href="./packages/design-system/eslint-plugin/src/rules/use-datetime-picker-calendar-button/README.md">use-datetime-picker-calendar-button</a> | Encourages makers to use calendar button in Atlassian Design System's date picker and datetime picker components. | Yes | Yes | Yes |
|
|
104
104
|
| <a href="./packages/design-system/eslint-plugin/src/rules/use-drawer-label/README.md">use-drawer-label</a> | Encourages to provide accessible name for Atlassian Design System Drawer component. | Yes | | Yes |
|
|
105
|
+
| <a href="./packages/design-system/eslint-plugin/src/rules/use-field-message-wrapper/README.md">use-field-message-wrapper</a> | Encourage use of message wrapper component when using form message components. | Yes | | Yes |
|
|
105
106
|
| <a href="./packages/design-system/eslint-plugin/src/rules/use-heading/README.md">use-heading</a> | Encourage the usage of heading components. | Yes | Yes | Yes |
|
|
106
107
|
| <a href="./packages/design-system/eslint-plugin/src/rules/use-heading-level-in-spotlight-card/README.md">use-heading-level-in-spotlight-card</a> | Inform developers of eventual requirement of `headingLevel` prop in `SpotlightCard` component. The heading level should be the appropriate level according to the surrounding context. | Yes | Yes | |
|
|
107
108
|
| <a href="./packages/design-system/eslint-plugin/src/rules/use-href-in-link-item/README.md">use-href-in-link-item</a> | Inform developers of eventual requirement of `href` prop in `LinkItem` component. Elements with a `link` role require an `href` attribute for users to properly navigate, particularly those using assistive technologies. If no valid `href` is required for your use case, consider using a `ButtonItem` instead. | Yes | Yes | Yes |
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::8ba8f062c0c8a49b3776a111d41fa3bf>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -66,6 +66,7 @@ var rules = {
|
|
|
66
66
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
67
67
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
68
68
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
69
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
69
70
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
70
71
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
71
72
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::e83747a5a69e6ae7443c198f4cc990b0>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -65,6 +65,7 @@ var rules = {
|
|
|
65
65
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
66
66
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
67
67
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
68
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
68
69
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
69
70
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
70
71
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::ee679166d3c39a30db50d8cf45cd3cb7>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -49,6 +49,7 @@ var rules = {
|
|
|
49
49
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
50
50
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
51
51
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
52
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
52
53
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
53
54
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
54
55
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::11c250f8fdbf2787edb36243db5e3e07>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -48,6 +48,7 @@ var rules = {
|
|
|
48
48
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
49
49
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
50
50
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
51
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
51
52
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
52
53
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
53
54
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -58,6 +58,7 @@ var _useCorrectField = _interopRequireDefault(require("./use-correct-field"));
|
|
|
58
58
|
var _useCxFunctionInXcss = _interopRequireDefault(require("./use-cx-function-in-xcss"));
|
|
59
59
|
var _useDatetimePickerCalendarButton = _interopRequireDefault(require("./use-datetime-picker-calendar-button"));
|
|
60
60
|
var _useDrawerLabel = _interopRequireDefault(require("./use-drawer-label"));
|
|
61
|
+
var _useFieldMessageWrapper = _interopRequireDefault(require("./use-field-message-wrapper"));
|
|
61
62
|
var _useHeading = _interopRequireDefault(require("./use-heading"));
|
|
62
63
|
var _useHeadingLevelInSpotlightCard = _interopRequireDefault(require("./use-heading-level-in-spotlight-card"));
|
|
63
64
|
var _useHrefInLinkItem = _interopRequireDefault(require("./use-href-in-link-item"));
|
|
@@ -78,7 +79,7 @@ var _useTokensTypography = _interopRequireDefault(require("./use-tokens-typograp
|
|
|
78
79
|
var _useVisuallyHidden = _interopRequireDefault(require("./use-visually-hidden"));
|
|
79
80
|
/**
|
|
80
81
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
81
|
-
* @codegen <<SignedSource::
|
|
82
|
+
* @codegen <<SignedSource::3ae0af16a58563d27e580593a73961d4>>
|
|
82
83
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
83
84
|
*/
|
|
84
85
|
|
|
@@ -136,6 +137,7 @@ var rules = exports.rules = {
|
|
|
136
137
|
'use-cx-function-in-xcss': _useCxFunctionInXcss.default,
|
|
137
138
|
'use-datetime-picker-calendar-button': _useDatetimePickerCalendarButton.default,
|
|
138
139
|
'use-drawer-label': _useDrawerLabel.default,
|
|
140
|
+
'use-field-message-wrapper': _useFieldMessageWrapper.default,
|
|
139
141
|
'use-heading': _useHeading.default,
|
|
140
142
|
'use-heading-level-in-spotlight-card': _useHeadingLevelInSpotlightCard.default,
|
|
141
143
|
'use-href-in-link-item': _useHrefInLinkItem.default,
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _eslintCodemodUtils = require("eslint-codemod-utils");
|
|
8
|
+
var _createRule = require("../utils/create-rule");
|
|
9
|
+
var FORM_PACKAGE = '@atlaskit/form';
|
|
10
|
+
var MESSAGE_COMPONENTS = ['ErrorMessage', 'HelperMessage', 'ValidMessage'];
|
|
11
|
+
var rule = (0, _createRule.createLintRule)({
|
|
12
|
+
meta: {
|
|
13
|
+
name: 'use-field-message-wrapper',
|
|
14
|
+
type: 'suggestion',
|
|
15
|
+
hasSuggestions: true,
|
|
16
|
+
docs: {
|
|
17
|
+
description: 'Encourage use of message wrapper component when using form message components.',
|
|
18
|
+
recommended: true,
|
|
19
|
+
severity: 'warn'
|
|
20
|
+
},
|
|
21
|
+
messages: {
|
|
22
|
+
useMessageWrapper: "All ADS form messaging components within a field should be wrapped by the `MessageWrapper` component from the form package. Consider also using the [simplified field implementation](https://atlassian.design/components/form/examples#simple-implementation-1) to handle styling and accessible messaging directly."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
create: function create(context) {
|
|
26
|
+
var fieldImport;
|
|
27
|
+
var messageWrapperImport;
|
|
28
|
+
var messageImports = [];
|
|
29
|
+
return {
|
|
30
|
+
ImportDeclaration: function ImportDeclaration(node) {
|
|
31
|
+
var source = node.source.value;
|
|
32
|
+
|
|
33
|
+
// Ignore anomalies
|
|
34
|
+
if (typeof source !== 'string') {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!node.specifiers.length) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// If it's not from our package, ignore.
|
|
42
|
+
if (source !== FORM_PACKAGE) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
var namedImportSpecifiers = node.specifiers.filter(function (spec) {
|
|
46
|
+
return (0, _eslintCodemodUtils.isNodeOfType)(spec, 'ImportSpecifier');
|
|
47
|
+
});
|
|
48
|
+
namedImportSpecifiers.forEach(function (spec) {
|
|
49
|
+
if (spec.type === 'ImportSpecifier' && 'name' in spec.imported) {
|
|
50
|
+
var name = spec.imported.name;
|
|
51
|
+
var local = spec.local;
|
|
52
|
+
if (MESSAGE_COMPONENTS.includes(name)) {
|
|
53
|
+
messageImports.push(local);
|
|
54
|
+
} else if (name === 'Field') {
|
|
55
|
+
fieldImport = local;
|
|
56
|
+
} else if (name === 'MessageWrapper') {
|
|
57
|
+
messageWrapperImport = local;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
JSXElement: function JSXElement(node) {
|
|
63
|
+
if (!(0, _eslintCodemodUtils.isNodeOfType)(node, 'JSXElement')) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!(0, _eslintCodemodUtils.isNodeOfType)(node.openingElement.name, 'JSXIdentifier')) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
var name = node.openingElement.name.name;
|
|
70
|
+
|
|
71
|
+
// if it's not a message component, skip
|
|
72
|
+
if (messageImports.length === 0 || !messageImports.find(function (imp) {
|
|
73
|
+
return imp.name === name;
|
|
74
|
+
})) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// if no field import exists, skip. It needs to be within our field
|
|
79
|
+
if (!fieldImport) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// If no message wrapper import exists, then it's definitely an error
|
|
84
|
+
if (!messageWrapperImport) {
|
|
85
|
+
return context.report({
|
|
86
|
+
node: node,
|
|
87
|
+
messageId: 'useMessageWrapper'
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// check for if field and message wrapper are parents
|
|
92
|
+
var _node = node;
|
|
93
|
+
var hasParentField = false;
|
|
94
|
+
var hasParentMessageWrapper = false;
|
|
95
|
+
while ((0, _eslintCodemodUtils.isNodeOfType)(_node, 'JSXElement') && (0, _eslintCodemodUtils.isNodeOfType)(_node.openingElement.name, 'JSXIdentifier') && !hasParentField) {
|
|
96
|
+
var _name = _node.openingElement.name.name;
|
|
97
|
+
hasParentField = hasParentField || _name === fieldImport.name;
|
|
98
|
+
hasParentMessageWrapper = hasParentMessageWrapper || _name === messageWrapperImport.name;
|
|
99
|
+
_node = _node.parent;
|
|
100
|
+
// Skip up until a JSXElement is reached
|
|
101
|
+
if ((0, _eslintCodemodUtils.isNodeOfType)(_node, 'JSXFragment') || (0, _eslintCodemodUtils.isNodeOfType)(_node, 'ArrowFunctionExpression') || (0, _eslintCodemodUtils.isNodeOfType)(_node, 'JSXExpressionContainer')) {
|
|
102
|
+
while (_node && !(0, _eslintCodemodUtils.isNodeOfType)(_node, 'JSXElement') && !(0, _eslintCodemodUtils.isNodeOfType)(_node, 'Program')) {
|
|
103
|
+
_node = _node.parent;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// if not field, skip because this doesn't matter
|
|
109
|
+
if (!hasParentField) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// if it has a message wrapper, skip
|
|
114
|
+
if (hasParentMessageWrapper) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
context.report({
|
|
118
|
+
node: node,
|
|
119
|
+
messageId: 'useMessageWrapper'
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
var _default = exports.default = rule;
|
|
@@ -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::8ba8f062c0c8a49b3776a111d41fa3bf>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -60,6 +60,7 @@ const rules = {
|
|
|
60
60
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
61
61
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
62
62
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
63
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
63
64
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
64
65
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
65
66
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::e83747a5a69e6ae7443c198f4cc990b0>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -59,6 +59,7 @@ const rules = {
|
|
|
59
59
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
60
60
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
61
61
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
62
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
62
63
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
63
64
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
64
65
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::ee679166d3c39a30db50d8cf45cd3cb7>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -43,6 +43,7 @@ const rules = {
|
|
|
43
43
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
44
44
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
45
45
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
46
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
46
47
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
47
48
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
48
49
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::11c250f8fdbf2787edb36243db5e3e07>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -42,6 +42,7 @@ const rules = {
|
|
|
42
42
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
43
43
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
44
44
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
45
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
45
46
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
46
47
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
47
48
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::3ae0af16a58563d27e580593a73961d4>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -57,6 +57,7 @@ import useCorrectField from './use-correct-field';
|
|
|
57
57
|
import useCxFunctionInXcss from './use-cx-function-in-xcss';
|
|
58
58
|
import useDatetimePickerCalendarButton from './use-datetime-picker-calendar-button';
|
|
59
59
|
import useDrawerLabel from './use-drawer-label';
|
|
60
|
+
import useFieldMessageWrapper from './use-field-message-wrapper';
|
|
60
61
|
import useHeading from './use-heading';
|
|
61
62
|
import useHeadingLevelInSpotlightCard from './use-heading-level-in-spotlight-card';
|
|
62
63
|
import useHrefInLinkItem from './use-href-in-link-item';
|
|
@@ -129,6 +130,7 @@ export const rules = {
|
|
|
129
130
|
'use-cx-function-in-xcss': useCxFunctionInXcss,
|
|
130
131
|
'use-datetime-picker-calendar-button': useDatetimePickerCalendarButton,
|
|
131
132
|
'use-drawer-label': useDrawerLabel,
|
|
133
|
+
'use-field-message-wrapper': useFieldMessageWrapper,
|
|
132
134
|
'use-heading': useHeading,
|
|
133
135
|
'use-heading-level-in-spotlight-card': useHeadingLevelInSpotlightCard,
|
|
134
136
|
'use-href-in-link-item': useHrefInLinkItem,
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
2
|
+
import { createLintRule } from '../utils/create-rule';
|
|
3
|
+
const FORM_PACKAGE = '@atlaskit/form';
|
|
4
|
+
const MESSAGE_COMPONENTS = ['ErrorMessage', 'HelperMessage', 'ValidMessage'];
|
|
5
|
+
const rule = createLintRule({
|
|
6
|
+
meta: {
|
|
7
|
+
name: 'use-field-message-wrapper',
|
|
8
|
+
type: 'suggestion',
|
|
9
|
+
hasSuggestions: true,
|
|
10
|
+
docs: {
|
|
11
|
+
description: 'Encourage use of message wrapper component when using form message components.',
|
|
12
|
+
recommended: true,
|
|
13
|
+
severity: 'warn'
|
|
14
|
+
},
|
|
15
|
+
messages: {
|
|
16
|
+
useMessageWrapper: `All ADS form messaging components within a field should be wrapped by the \`MessageWrapper\` component from the form package. Consider also using the [simplified field implementation](https://atlassian.design/components/form/examples#simple-implementation-1) to handle styling and accessible messaging directly.`
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
create(context) {
|
|
20
|
+
let fieldImport;
|
|
21
|
+
let messageWrapperImport;
|
|
22
|
+
let messageImports = [];
|
|
23
|
+
return {
|
|
24
|
+
ImportDeclaration(node) {
|
|
25
|
+
const source = node.source.value;
|
|
26
|
+
|
|
27
|
+
// Ignore anomalies
|
|
28
|
+
if (typeof source !== 'string') {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!node.specifiers.length) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// If it's not from our package, ignore.
|
|
36
|
+
if (source !== FORM_PACKAGE) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const namedImportSpecifiers = node.specifiers.filter(spec => isNodeOfType(spec, 'ImportSpecifier'));
|
|
40
|
+
namedImportSpecifiers.forEach(spec => {
|
|
41
|
+
if (spec.type === 'ImportSpecifier' && 'name' in spec.imported) {
|
|
42
|
+
const name = spec.imported.name;
|
|
43
|
+
const local = spec.local;
|
|
44
|
+
if (MESSAGE_COMPONENTS.includes(name)) {
|
|
45
|
+
messageImports.push(local);
|
|
46
|
+
} else if (name === 'Field') {
|
|
47
|
+
fieldImport = local;
|
|
48
|
+
} else if (name === 'MessageWrapper') {
|
|
49
|
+
messageWrapperImport = local;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
JSXElement(node) {
|
|
55
|
+
if (!isNodeOfType(node, 'JSXElement')) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!isNodeOfType(node.openingElement.name, 'JSXIdentifier')) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const name = node.openingElement.name.name;
|
|
62
|
+
|
|
63
|
+
// if it's not a message component, skip
|
|
64
|
+
if (messageImports.length === 0 || !messageImports.find(imp => imp.name === name)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// if no field import exists, skip. It needs to be within our field
|
|
69
|
+
if (!fieldImport) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// If no message wrapper import exists, then it's definitely an error
|
|
74
|
+
if (!messageWrapperImport) {
|
|
75
|
+
return context.report({
|
|
76
|
+
node: node,
|
|
77
|
+
messageId: 'useMessageWrapper'
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// check for if field and message wrapper are parents
|
|
82
|
+
let _node = node;
|
|
83
|
+
let hasParentField = false;
|
|
84
|
+
let hasParentMessageWrapper = false;
|
|
85
|
+
while (isNodeOfType(_node, 'JSXElement') && isNodeOfType(_node.openingElement.name, 'JSXIdentifier') && !hasParentField) {
|
|
86
|
+
const name = _node.openingElement.name.name;
|
|
87
|
+
hasParentField = hasParentField || name === fieldImport.name;
|
|
88
|
+
hasParentMessageWrapper = hasParentMessageWrapper || name === messageWrapperImport.name;
|
|
89
|
+
_node = _node.parent;
|
|
90
|
+
// Skip up until a JSXElement is reached
|
|
91
|
+
if (isNodeOfType(_node, 'JSXFragment') || isNodeOfType(_node, 'ArrowFunctionExpression') || isNodeOfType(_node, 'JSXExpressionContainer')) {
|
|
92
|
+
while (_node && !isNodeOfType(_node, 'JSXElement') && !isNodeOfType(_node, 'Program')) {
|
|
93
|
+
_node = _node.parent;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// if not field, skip because this doesn't matter
|
|
99
|
+
if (!hasParentField) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// if it has a message wrapper, skip
|
|
104
|
+
if (hasParentMessageWrapper) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
context.report({
|
|
108
|
+
node: node,
|
|
109
|
+
messageId: 'useMessageWrapper'
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
export default rule;
|
|
@@ -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::8ba8f062c0c8a49b3776a111d41fa3bf>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -60,6 +60,7 @@ var rules = {
|
|
|
60
60
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
61
61
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
62
62
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
63
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
63
64
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
64
65
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
65
66
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::e83747a5a69e6ae7443c198f4cc990b0>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -59,6 +59,7 @@ var rules = {
|
|
|
59
59
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
60
60
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
61
61
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
62
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
62
63
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
63
64
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
64
65
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::ee679166d3c39a30db50d8cf45cd3cb7>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -43,6 +43,7 @@ var rules = {
|
|
|
43
43
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
44
44
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
45
45
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
46
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
46
47
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
47
48
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
48
49
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::11c250f8fdbf2787edb36243db5e3e07>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -42,6 +42,7 @@ var rules = {
|
|
|
42
42
|
'@atlaskit/design-system/use-cx-function-in-xcss': 'error',
|
|
43
43
|
'@atlaskit/design-system/use-datetime-picker-calendar-button': 'warn',
|
|
44
44
|
'@atlaskit/design-system/use-drawer-label': 'warn',
|
|
45
|
+
'@atlaskit/design-system/use-field-message-wrapper': 'warn',
|
|
45
46
|
'@atlaskit/design-system/use-heading': 'warn',
|
|
46
47
|
'@atlaskit/design-system/use-heading-level-in-spotlight-card': 'warn',
|
|
47
48
|
'@atlaskit/design-system/use-href-in-link-item': 'warn',
|
|
@@ -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::3ae0af16a58563d27e580593a73961d4>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -57,6 +57,7 @@ import useCorrectField from './use-correct-field';
|
|
|
57
57
|
import useCxFunctionInXcss from './use-cx-function-in-xcss';
|
|
58
58
|
import useDatetimePickerCalendarButton from './use-datetime-picker-calendar-button';
|
|
59
59
|
import useDrawerLabel from './use-drawer-label';
|
|
60
|
+
import useFieldMessageWrapper from './use-field-message-wrapper';
|
|
60
61
|
import useHeading from './use-heading';
|
|
61
62
|
import useHeadingLevelInSpotlightCard from './use-heading-level-in-spotlight-card';
|
|
62
63
|
import useHrefInLinkItem from './use-href-in-link-item';
|
|
@@ -129,6 +130,7 @@ export var rules = {
|
|
|
129
130
|
'use-cx-function-in-xcss': useCxFunctionInXcss,
|
|
130
131
|
'use-datetime-picker-calendar-button': useDatetimePickerCalendarButton,
|
|
131
132
|
'use-drawer-label': useDrawerLabel,
|
|
133
|
+
'use-field-message-wrapper': useFieldMessageWrapper,
|
|
132
134
|
'use-heading': useHeading,
|
|
133
135
|
'use-heading-level-in-spotlight-card': useHeadingLevelInSpotlightCard,
|
|
134
136
|
'use-href-in-link-item': useHrefInLinkItem,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
2
|
+
import { createLintRule } from '../utils/create-rule';
|
|
3
|
+
var FORM_PACKAGE = '@atlaskit/form';
|
|
4
|
+
var MESSAGE_COMPONENTS = ['ErrorMessage', 'HelperMessage', 'ValidMessage'];
|
|
5
|
+
var rule = createLintRule({
|
|
6
|
+
meta: {
|
|
7
|
+
name: 'use-field-message-wrapper',
|
|
8
|
+
type: 'suggestion',
|
|
9
|
+
hasSuggestions: true,
|
|
10
|
+
docs: {
|
|
11
|
+
description: 'Encourage use of message wrapper component when using form message components.',
|
|
12
|
+
recommended: true,
|
|
13
|
+
severity: 'warn'
|
|
14
|
+
},
|
|
15
|
+
messages: {
|
|
16
|
+
useMessageWrapper: "All ADS form messaging components within a field should be wrapped by the `MessageWrapper` component from the form package. Consider also using the [simplified field implementation](https://atlassian.design/components/form/examples#simple-implementation-1) to handle styling and accessible messaging directly."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
create: function create(context) {
|
|
20
|
+
var fieldImport;
|
|
21
|
+
var messageWrapperImport;
|
|
22
|
+
var messageImports = [];
|
|
23
|
+
return {
|
|
24
|
+
ImportDeclaration: function ImportDeclaration(node) {
|
|
25
|
+
var source = node.source.value;
|
|
26
|
+
|
|
27
|
+
// Ignore anomalies
|
|
28
|
+
if (typeof source !== 'string') {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!node.specifiers.length) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// If it's not from our package, ignore.
|
|
36
|
+
if (source !== FORM_PACKAGE) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
var namedImportSpecifiers = node.specifiers.filter(function (spec) {
|
|
40
|
+
return isNodeOfType(spec, 'ImportSpecifier');
|
|
41
|
+
});
|
|
42
|
+
namedImportSpecifiers.forEach(function (spec) {
|
|
43
|
+
if (spec.type === 'ImportSpecifier' && 'name' in spec.imported) {
|
|
44
|
+
var name = spec.imported.name;
|
|
45
|
+
var local = spec.local;
|
|
46
|
+
if (MESSAGE_COMPONENTS.includes(name)) {
|
|
47
|
+
messageImports.push(local);
|
|
48
|
+
} else if (name === 'Field') {
|
|
49
|
+
fieldImport = local;
|
|
50
|
+
} else if (name === 'MessageWrapper') {
|
|
51
|
+
messageWrapperImport = local;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
JSXElement: function JSXElement(node) {
|
|
57
|
+
if (!isNodeOfType(node, 'JSXElement')) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!isNodeOfType(node.openingElement.name, 'JSXIdentifier')) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
var name = node.openingElement.name.name;
|
|
64
|
+
|
|
65
|
+
// if it's not a message component, skip
|
|
66
|
+
if (messageImports.length === 0 || !messageImports.find(function (imp) {
|
|
67
|
+
return imp.name === name;
|
|
68
|
+
})) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// if no field import exists, skip. It needs to be within our field
|
|
73
|
+
if (!fieldImport) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// If no message wrapper import exists, then it's definitely an error
|
|
78
|
+
if (!messageWrapperImport) {
|
|
79
|
+
return context.report({
|
|
80
|
+
node: node,
|
|
81
|
+
messageId: 'useMessageWrapper'
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// check for if field and message wrapper are parents
|
|
86
|
+
var _node = node;
|
|
87
|
+
var hasParentField = false;
|
|
88
|
+
var hasParentMessageWrapper = false;
|
|
89
|
+
while (isNodeOfType(_node, 'JSXElement') && isNodeOfType(_node.openingElement.name, 'JSXIdentifier') && !hasParentField) {
|
|
90
|
+
var _name = _node.openingElement.name.name;
|
|
91
|
+
hasParentField = hasParentField || _name === fieldImport.name;
|
|
92
|
+
hasParentMessageWrapper = hasParentMessageWrapper || _name === messageWrapperImport.name;
|
|
93
|
+
_node = _node.parent;
|
|
94
|
+
// Skip up until a JSXElement is reached
|
|
95
|
+
if (isNodeOfType(_node, 'JSXFragment') || isNodeOfType(_node, 'ArrowFunctionExpression') || isNodeOfType(_node, 'JSXExpressionContainer')) {
|
|
96
|
+
while (_node && !isNodeOfType(_node, 'JSXElement') && !isNodeOfType(_node, 'Program')) {
|
|
97
|
+
_node = _node.parent;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// if not field, skip because this doesn't matter
|
|
103
|
+
if (!hasParentField) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// if it has a message wrapper, skip
|
|
108
|
+
if (hasParentMessageWrapper) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
context.report({
|
|
112
|
+
node: node,
|
|
113
|
+
messageId: 'useMessageWrapper'
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export default rule;
|
|
@@ -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::8ba8f062c0c8a49b3776a111d41fa3bf>>
|
|
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::e83747a5a69e6ae7443c198f4cc990b0>>
|
|
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::ee679166d3c39a30db50d8cf45cd3cb7>>
|
|
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::11c250f8fdbf2787edb36243db5e3e07>>
|
|
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::3ae0af16a58563d27e580593a73961d4>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Rule } 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::8ba8f062c0c8a49b3776a111d41fa3bf>>
|
|
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::e83747a5a69e6ae7443c198f4cc990b0>>
|
|
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::ee679166d3c39a30db50d8cf45cd3cb7>>
|
|
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::11c250f8fdbf2787edb36243db5e3e07>>
|
|
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::3ae0af16a58563d27e580593a73961d4>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Rule } from 'eslint';
|
package/package.json
CHANGED