@atlaskit/eslint-plugin-design-system 13.21.0 → 13.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/common/token-maps.partial.js +2 -2
- package/dist/cjs/index.codegen.js +1 -1
- package/dist/cjs/presets/all-flat.codegen.js +5 -3
- package/dist/cjs/presets/all.codegen.js +5 -3
- package/dist/cjs/presets/recommended-flat.codegen.js +5 -3
- package/dist/cjs/presets/recommended.codegen.js +5 -3
- package/dist/cjs/rules/index.codegen.js +1 -1
- package/dist/cjs/rules/utils/is-node.js +2 -2
- package/dist/es2019/common/token-maps.partial.js +2 -2
- package/dist/es2019/index.codegen.js +1 -1
- package/dist/es2019/presets/all-flat.codegen.js +4 -3
- package/dist/es2019/presets/all.codegen.js +4 -3
- package/dist/es2019/presets/recommended-flat.codegen.js +4 -3
- package/dist/es2019/presets/recommended.codegen.js +4 -3
- package/dist/es2019/rules/index.codegen.js +2 -1
- package/dist/es2019/rules/utils/is-node.js +2 -2
- package/dist/esm/common/token-maps.partial.js +2 -2
- package/dist/esm/index.codegen.js +1 -1
- package/dist/esm/presets/all-flat.codegen.js +4 -3
- package/dist/esm/presets/all.codegen.js +4 -3
- package/dist/esm/presets/recommended-flat.codegen.js +4 -3
- package/dist/esm/presets/recommended.codegen.js +4 -3
- package/dist/esm/rules/index.codegen.js +2 -1
- package/dist/esm/rules/utils/create-rule.js +2 -1
- package/dist/esm/rules/utils/is-node.js +2 -2
- package/dist/types/common/token-maps.partial.d.ts +51 -51
- package/dist/types/index.codegen.d.ts +3 -576
- package/dist/types/presets/all-flat.codegen.d.ts +8 -72
- package/dist/types/presets/all.codegen.d.ts +8 -72
- package/dist/types/presets/recommended-flat.codegen.d.ts +8 -52
- package/dist/types/presets/recommended.codegen.d.ts +8 -52
- package/dist/types/rules/ensure-design-token-usage-preview/index.d.ts +2 -1
- package/dist/types/rules/index.codegen.d.ts +7 -69
- package/dist/types/rules/use-tokens-typography/utils.d.ts +13 -81
- package/dist/types/rules/utils/create-rule.d.ts +3 -1
- package/dist/types-ts4.5/common/token-maps.partial.d.ts +51 -51
- package/dist/types-ts4.5/index.codegen.d.ts +3 -600
- package/dist/types-ts4.5/presets/all-flat.codegen.d.ts +8 -75
- package/dist/types-ts4.5/presets/all.codegen.d.ts +8 -75
- package/dist/types-ts4.5/presets/recommended-flat.codegen.d.ts +8 -55
- package/dist/types-ts4.5/presets/recommended.codegen.d.ts +8 -55
- package/dist/types-ts4.5/rules/ensure-design-token-usage-preview/index.d.ts +2 -1
- package/dist/types-ts4.5/rules/index.codegen.d.ts +7 -69
- package/dist/types-ts4.5/rules/use-tokens-typography/utils.d.ts +13 -81
- package/dist/types-ts4.5/rules/utils/create-rule.d.ts +3 -1
- package/package.json +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 13.21.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`437668dfbdec9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/437668dfbdec9) -
|
|
8
|
+
Add explicit types to a number of DST components
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 13.21.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`f49681ffca5bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f49681ffca5bc) -
|
|
16
|
+
Fixed an issue with the `ensure-design-token-usage` rule, where it was identifying non-issues with
|
|
17
|
+
the `@atlaskit/tile` `backgroundColor` prop.
|
|
18
|
+
|
|
3
19
|
## 13.21.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -10,10 +10,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
/**
|
|
12
12
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
13
|
-
* @codegen <<SignedSource::
|
|
13
|
+
* @codegen <<SignedSource::f302f98104caa39f6137b6e8690eb7a8>>
|
|
14
14
|
* @codegenId spacing
|
|
15
15
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
16
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
16
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::07b9c29f8d9f95e43d59a7b7ad4ce7a2>>
|
|
17
17
|
*/
|
|
18
18
|
var positiveSpaceMap = exports.positiveSpaceMap = {
|
|
19
19
|
'0px': 'space.0',
|
|
@@ -20,7 +20,7 @@ var _index = require("./rules/index.codegen");
|
|
|
20
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
22
22
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
23
|
-
* @codegen <<SignedSource::
|
|
23
|
+
* @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
|
|
24
24
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
25
25
|
*/
|
|
26
26
|
// this uses require because not all node versions this package supports use the same import assertions/attributes
|
|
@@ -6,10 +6,11 @@ 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::6210f09c70f4d44befb986dfd548ed3e>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
var rules = {
|
|
13
14
|
// NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
|
|
14
15
|
plugins: {},
|
|
15
16
|
rules: {
|
|
@@ -80,4 +81,5 @@ var _default = exports.default = {
|
|
|
80
81
|
'@atlaskit/design-system/use-tokens-typography': 'warn',
|
|
81
82
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
82
83
|
}
|
|
83
|
-
};
|
|
84
|
+
};
|
|
85
|
+
var _default = exports.default = rules;
|
|
@@ -6,10 +6,11 @@ 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::daf4a5893d65c7a1592f8bc6e51920c6>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
var rules = {
|
|
13
14
|
plugins: ['@atlaskit/design-system'],
|
|
14
15
|
rules: {
|
|
15
16
|
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
@@ -79,4 +80,5 @@ var _default = exports.default = {
|
|
|
79
80
|
'@atlaskit/design-system/use-tokens-typography': 'warn',
|
|
80
81
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
81
82
|
}
|
|
82
|
-
};
|
|
83
|
+
};
|
|
84
|
+
var _default = exports.default = rules;
|
|
@@ -6,10 +6,11 @@ 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::3328b9c675a0d09876dcfbc5d29bc63f>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
var rules = {
|
|
13
14
|
// NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
|
|
14
15
|
plugins: {},
|
|
15
16
|
rules: {
|
|
@@ -60,4 +61,5 @@ var _default = exports.default = {
|
|
|
60
61
|
'@atlaskit/design-system/use-tag-group-label': 'warn',
|
|
61
62
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
62
63
|
}
|
|
63
|
-
};
|
|
64
|
+
};
|
|
65
|
+
var _default = exports.default = rules;
|
|
@@ -6,10 +6,11 @@ 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::b28f895280627b7a35f059f90783644a>>
|
|
10
10
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
var rules = {
|
|
13
14
|
plugins: ['@atlaskit/design-system'],
|
|
14
15
|
rules: {
|
|
15
16
|
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
@@ -59,4 +60,5 @@ var _default = exports.default = {
|
|
|
59
60
|
'@atlaskit/design-system/use-tag-group-label': 'warn',
|
|
60
61
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
61
62
|
}
|
|
62
|
-
};
|
|
63
|
+
};
|
|
64
|
+
var _default = exports.default = rules;
|
|
@@ -74,7 +74,7 @@ var _useTokensTypography = _interopRequireDefault(require("./use-tokens-typograp
|
|
|
74
74
|
var _useVisuallyHidden = _interopRequireDefault(require("./use-visually-hidden"));
|
|
75
75
|
/**
|
|
76
76
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
77
|
-
* @codegen <<SignedSource::
|
|
77
|
+
* @codegen <<SignedSource::4693db80b637ac078521dd6e0591f75b>>
|
|
78
78
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
79
79
|
*/
|
|
80
80
|
|
|
@@ -56,11 +56,11 @@ var _isDecendantOfSvgElement = exports.isDecendantOfSvgElement = function isDece
|
|
|
56
56
|
return false;
|
|
57
57
|
};
|
|
58
58
|
var _isDecendantOfPrimitive = exports.isDecendantOfPrimitive = function isDecendantOfPrimitive(node, context) {
|
|
59
|
-
var primitivesToCheck = ['Box', 'Text'];
|
|
59
|
+
var primitivesToCheck = ['Box', 'Text', 'Tile'];
|
|
60
60
|
if ((0, _eslintCodemodUtils.isNodeOfType)(node, 'JSXElement')) {
|
|
61
61
|
// @ts-ignore
|
|
62
62
|
if (primitivesToCheck.includes(node.openingElement.name.name)) {
|
|
63
|
-
var importDeclaration = _astNodes.Root.findImportsByModule((0, _contextCompat.getSourceCode)(context).ast.body, ['@atlaskit/primitives', '@atlaskit/primitives/box', '@atlaskit/primitives/text', '@atlaskit/primitives/compiled']);
|
|
63
|
+
var importDeclaration = _astNodes.Root.findImportsByModule((0, _contextCompat.getSourceCode)(context).ast.body, ['@atlaskit/primitives', '@atlaskit/primitives/box', '@atlaskit/primitives/text', '@atlaskit/primitives/compiled', '@atlaskit/tile']);
|
|
64
64
|
if (importDeclaration.length) {
|
|
65
65
|
return true;
|
|
66
66
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::f302f98104caa39f6137b6e8690eb7a8>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
6
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::07b9c29f8d9f95e43d59a7b7ad4ce7a2>>
|
|
7
7
|
*/
|
|
8
8
|
export const positiveSpaceMap = {
|
|
9
9
|
'0px': 'space.0',
|
|
@@ -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::891a7e1d667de46cfe89cad670005f2c>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::6210f09c70f4d44befb986dfd548ed3e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const rules = {
|
|
8
8
|
// NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
|
|
9
9
|
plugins: {},
|
|
10
10
|
rules: {
|
|
@@ -75,4 +75,5 @@ export default {
|
|
|
75
75
|
'@atlaskit/design-system/use-tokens-typography': 'warn',
|
|
76
76
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
77
77
|
}
|
|
78
|
-
};
|
|
78
|
+
};
|
|
79
|
+
export default rules;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::daf4a5893d65c7a1592f8bc6e51920c6>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const rules = {
|
|
8
8
|
plugins: ['@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
10
|
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
@@ -74,4 +74,5 @@ export default {
|
|
|
74
74
|
'@atlaskit/design-system/use-tokens-typography': 'warn',
|
|
75
75
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
76
76
|
}
|
|
77
|
-
};
|
|
77
|
+
};
|
|
78
|
+
export default rules;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::3328b9c675a0d09876dcfbc5d29bc63f>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const rules = {
|
|
8
8
|
// NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
|
|
9
9
|
plugins: {},
|
|
10
10
|
rules: {
|
|
@@ -55,4 +55,5 @@ export default {
|
|
|
55
55
|
'@atlaskit/design-system/use-tag-group-label': 'warn',
|
|
56
56
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
57
57
|
}
|
|
58
|
-
};
|
|
58
|
+
};
|
|
59
|
+
export default rules;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::b28f895280627b7a35f059f90783644a>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const rules = {
|
|
8
8
|
plugins: ['@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
10
|
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
@@ -54,4 +54,5 @@ export default {
|
|
|
54
54
|
'@atlaskit/design-system/use-tag-group-label': 'warn',
|
|
55
55
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
56
56
|
}
|
|
57
|
-
};
|
|
57
|
+
};
|
|
58
|
+
export default rules;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::4693db80b637ac078521dd6e0591f75b>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
import consistentCssPropUsage from './consistent-css-prop-usage';
|
|
7
8
|
import enforceInlineStylesInSelect from './enforce-inline-styles-in-select';
|
|
8
9
|
import ensureDesignTokenUsage from './ensure-design-token-usage';
|
|
@@ -49,11 +49,11 @@ export const isDecendantOfSvgElement = node => {
|
|
|
49
49
|
return false;
|
|
50
50
|
};
|
|
51
51
|
export const isDecendantOfPrimitive = (node, context) => {
|
|
52
|
-
const primitivesToCheck = ['Box', 'Text'];
|
|
52
|
+
const primitivesToCheck = ['Box', 'Text', 'Tile'];
|
|
53
53
|
if (isNodeOfType(node, 'JSXElement')) {
|
|
54
54
|
// @ts-ignore
|
|
55
55
|
if (primitivesToCheck.includes(node.openingElement.name.name)) {
|
|
56
|
-
const importDeclaration = Root.findImportsByModule(getSourceCode(context).ast.body, ['@atlaskit/primitives', '@atlaskit/primitives/box', '@atlaskit/primitives/text', '@atlaskit/primitives/compiled']);
|
|
56
|
+
const importDeclaration = Root.findImportsByModule(getSourceCode(context).ast.body, ['@atlaskit/primitives', '@atlaskit/primitives/box', '@atlaskit/primitives/text', '@atlaskit/primitives/compiled', '@atlaskit/tile']);
|
|
57
57
|
if (importDeclaration.length) {
|
|
58
58
|
return true;
|
|
59
59
|
}
|
|
@@ -3,10 +3,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
/**
|
|
5
5
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::f302f98104caa39f6137b6e8690eb7a8>>
|
|
7
7
|
* @codegenId spacing
|
|
8
8
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
9
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
9
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::07b9c29f8d9f95e43d59a7b7ad4ce7a2>>
|
|
10
10
|
*/
|
|
11
11
|
export var positiveSpaceMap = {
|
|
12
12
|
'0px': 'space.0',
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
/**
|
|
5
5
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::891a7e1d667de46cfe89cad670005f2c>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::6210f09c70f4d44befb986dfd548ed3e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
var rules = {
|
|
8
8
|
// NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
|
|
9
9
|
plugins: {},
|
|
10
10
|
rules: {
|
|
@@ -75,4 +75,5 @@ export default {
|
|
|
75
75
|
'@atlaskit/design-system/use-tokens-typography': 'warn',
|
|
76
76
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
77
77
|
}
|
|
78
|
-
};
|
|
78
|
+
};
|
|
79
|
+
export default rules;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::daf4a5893d65c7a1592f8bc6e51920c6>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
var rules = {
|
|
8
8
|
plugins: ['@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
10
|
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
@@ -74,4 +74,5 @@ export default {
|
|
|
74
74
|
'@atlaskit/design-system/use-tokens-typography': 'warn',
|
|
75
75
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
76
76
|
}
|
|
77
|
-
};
|
|
77
|
+
};
|
|
78
|
+
export default rules;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::3328b9c675a0d09876dcfbc5d29bc63f>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
var rules = {
|
|
8
8
|
// NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
|
|
9
9
|
plugins: {},
|
|
10
10
|
rules: {
|
|
@@ -55,4 +55,5 @@ export default {
|
|
|
55
55
|
'@atlaskit/design-system/use-tag-group-label': 'warn',
|
|
56
56
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
57
57
|
}
|
|
58
|
-
};
|
|
58
|
+
};
|
|
59
|
+
export default rules;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::b28f895280627b7a35f059f90783644a>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
var rules = {
|
|
8
8
|
plugins: ['@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
10
|
'@atlaskit/design-system/consistent-css-prop-usage': 'error',
|
|
@@ -54,4 +54,5 @@ export default {
|
|
|
54
54
|
'@atlaskit/design-system/use-tag-group-label': 'warn',
|
|
55
55
|
'@atlaskit/design-system/use-visually-hidden': 'error'
|
|
56
56
|
}
|
|
57
|
-
};
|
|
57
|
+
};
|
|
58
|
+
export default rules;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::4693db80b637ac078521dd6e0591f75b>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
import consistentCssPropUsage from './consistent-css-prop-usage';
|
|
7
8
|
import enforceInlineStylesInSelect from './enforce-inline-styles-in-select';
|
|
8
9
|
import ensureDesignTokenUsage from './ensure-design-token-usage';
|
|
@@ -10,7 +10,7 @@ import { getCreateLintRule, getPathSafeName } from '@atlaskit/eslint-utils/creat
|
|
|
10
10
|
* @private
|
|
11
11
|
* @deprecated
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
var createRule = ESLintUtils.RuleCreator(function (name) {
|
|
14
14
|
return getRuleUrl(name);
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -19,6 +19,7 @@ export var createRule = ESLintUtils.RuleCreator(function (name) {
|
|
|
19
19
|
* there is a docs link to our ESLint plugin documentation page,
|
|
20
20
|
* as well as improving type support.
|
|
21
21
|
*/
|
|
22
|
+
export { createRule };
|
|
22
23
|
export var createLintRule = getCreateLintRule(getRuleUrl);
|
|
23
24
|
function getRuleUrl(ruleName) {
|
|
24
25
|
var name = getPathSafeName(ruleName);
|
|
@@ -54,11 +54,11 @@ var _isDecendantOfSvgElement = function isDecendantOfSvgElement(node) {
|
|
|
54
54
|
};
|
|
55
55
|
export { _isDecendantOfSvgElement as isDecendantOfSvgElement };
|
|
56
56
|
var _isDecendantOfPrimitive = function isDecendantOfPrimitive(node, context) {
|
|
57
|
-
var primitivesToCheck = ['Box', 'Text'];
|
|
57
|
+
var primitivesToCheck = ['Box', 'Text', 'Tile'];
|
|
58
58
|
if (isNodeOfType(node, 'JSXElement')) {
|
|
59
59
|
// @ts-ignore
|
|
60
60
|
if (primitivesToCheck.includes(node.openingElement.name.name)) {
|
|
61
|
-
var importDeclaration = Root.findImportsByModule(getSourceCode(context).ast.body, ['@atlaskit/primitives', '@atlaskit/primitives/box', '@atlaskit/primitives/text', '@atlaskit/primitives/compiled']);
|
|
61
|
+
var importDeclaration = Root.findImportsByModule(getSourceCode(context).ast.body, ['@atlaskit/primitives', '@atlaskit/primitives/box', '@atlaskit/primitives/text', '@atlaskit/primitives/compiled', '@atlaskit/tile']);
|
|
62
62
|
if (importDeclaration.length) {
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::f302f98104caa39f6137b6e8690eb7a8>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::
|
|
6
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::07b9c29f8d9f95e43d59a7b7ad4ce7a2>>
|
|
7
7
|
*/
|
|
8
8
|
export declare const positiveSpaceMap: {
|
|
9
|
-
'0px':
|
|
10
|
-
'2px':
|
|
11
|
-
'4px':
|
|
12
|
-
'6px':
|
|
13
|
-
'8px':
|
|
14
|
-
'12px':
|
|
15
|
-
'16px':
|
|
16
|
-
'20px':
|
|
17
|
-
'24px':
|
|
18
|
-
'32px':
|
|
19
|
-
'40px':
|
|
20
|
-
'48px':
|
|
21
|
-
'64px':
|
|
22
|
-
'80px':
|
|
9
|
+
'0px': 'space.0';
|
|
10
|
+
'2px': 'space.025';
|
|
11
|
+
'4px': 'space.050';
|
|
12
|
+
'6px': 'space.075';
|
|
13
|
+
'8px': 'space.100';
|
|
14
|
+
'12px': 'space.150';
|
|
15
|
+
'16px': 'space.200';
|
|
16
|
+
'20px': 'space.250';
|
|
17
|
+
'24px': 'space.300';
|
|
18
|
+
'32px': 'space.400';
|
|
19
|
+
'40px': 'space.500';
|
|
20
|
+
'48px': 'space.600';
|
|
21
|
+
'64px': 'space.800';
|
|
22
|
+
'80px': 'space.1000';
|
|
23
23
|
};
|
|
24
|
-
export type Space =
|
|
24
|
+
export type Space = '0px' | '2px' | '4px' | '6px' | '8px' | '12px' | '16px' | '20px' | '24px' | '32px' | '40px' | '48px' | '64px' | '80px';
|
|
25
25
|
export declare const negativeSpaceMap: {
|
|
26
|
-
'-2px':
|
|
27
|
-
'-4px':
|
|
28
|
-
'-6px':
|
|
29
|
-
'-8px':
|
|
30
|
-
'-12px':
|
|
31
|
-
'-16px':
|
|
32
|
-
'-20px':
|
|
33
|
-
'-24px':
|
|
34
|
-
'-32px':
|
|
26
|
+
'-2px': 'space.negative.025';
|
|
27
|
+
'-4px': 'space.negative.050';
|
|
28
|
+
'-6px': 'space.negative.075';
|
|
29
|
+
'-8px': 'space.negative.100';
|
|
30
|
+
'-12px': 'space.negative.150';
|
|
31
|
+
'-16px': 'space.negative.200';
|
|
32
|
+
'-20px': 'space.negative.250';
|
|
33
|
+
'-24px': 'space.negative.300';
|
|
34
|
+
'-32px': 'space.negative.400';
|
|
35
35
|
};
|
|
36
|
-
export type NegativeSpace =
|
|
36
|
+
export type NegativeSpace = '-2px' | '-4px' | '-6px' | '-8px' | '-12px' | '-16px' | '-20px' | '-24px' | '-32px';
|
|
37
37
|
export declare const allSpaceMap: {
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
38
|
+
'0px': 'space.0';
|
|
39
|
+
'2px': 'space.025';
|
|
40
|
+
'4px': 'space.050';
|
|
41
|
+
'6px': 'space.075';
|
|
42
|
+
'8px': 'space.100';
|
|
43
|
+
'12px': 'space.150';
|
|
44
|
+
'16px': 'space.200';
|
|
45
|
+
'20px': 'space.250';
|
|
46
|
+
'24px': 'space.300';
|
|
47
|
+
'32px': 'space.400';
|
|
48
|
+
'40px': 'space.500';
|
|
49
|
+
'48px': 'space.600';
|
|
50
|
+
'64px': 'space.800';
|
|
51
|
+
'80px': 'space.1000';
|
|
52
|
+
'-2px': 'space.negative.025';
|
|
53
|
+
'-4px': 'space.negative.050';
|
|
54
|
+
'-6px': 'space.negative.075';
|
|
55
|
+
'-8px': 'space.negative.100';
|
|
56
|
+
'-12px': 'space.negative.150';
|
|
57
|
+
'-16px': 'space.negative.200';
|
|
58
|
+
'-20px': 'space.negative.250';
|
|
59
|
+
'-24px': 'space.negative.300';
|
|
60
|
+
'-32px': 'space.negative.400';
|
|
61
61
|
};
|
|
62
|
-
export type AllSpace =
|
|
62
|
+
export type AllSpace = '0px' | '2px' | '4px' | '6px' | '8px' | '12px' | '16px' | '20px' | '24px' | '32px' | '40px' | '48px' | '64px' | '80px' | '-2px' | '-4px' | '-6px' | '-8px' | '-12px' | '-16px' | '-20px' | '-24px' | '-32px';
|
|
63
63
|
/**
|
|
64
64
|
* @codegenEnd
|
|
65
65
|
*/
|