@atlaskit/eslint-plugin-design-system 10.6.0 → 10.7.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 +21 -1
- package/configs/deprecated.json +263 -273
- package/constellation/index/props.mdx +2 -3
- package/dist/cjs/common/token-maps.partial.js +1 -1
- package/dist/cjs/rules/use-latest-xcss-syntax/transformers/style-property/index.js +10 -1
- package/dist/cjs/rules/use-tokens-typography/index.js +1 -1
- package/dist/cjs/rules/use-tokens-typography/transformers/style-object.js +4 -1
- package/dist/configs/deprecated.json +263 -273
- package/dist/es2019/common/token-maps.partial.js +1 -1
- package/dist/es2019/rules/use-latest-xcss-syntax/transformers/style-property/index.js +10 -1
- package/dist/es2019/rules/use-tokens-typography/index.js +1 -1
- package/dist/es2019/rules/use-tokens-typography/transformers/style-object.js +4 -1
- package/dist/esm/common/token-maps.partial.js +1 -1
- package/dist/esm/rules/use-latest-xcss-syntax/transformers/style-property/index.js +10 -1
- package/dist/esm/rules/use-tokens-typography/index.js +1 -1
- package/dist/esm/rules/use-tokens-typography/transformers/style-object.js +4 -1
- package/dist/types/common/token-maps.partial.d.ts +1 -1
- package/dist/types/rules/use-primitives/transformers/index.d.ts +1 -1
- package/dist/types-ts4.5/common/token-maps.partial.d.ts +1 -1
- package/dist/types-ts4.5/rules/use-primitives/transformers/index.d.ts +1 -1
- package/package.json +3 -3
- package/report.api.md +91 -90
|
@@ -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 SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::a9fbd091c8b53fd9515afc7cdd793c6b>>
|
|
7
7
|
* @codegenId spacing
|
|
8
8
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
9
9
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -29,7 +29,16 @@ export var StyleProperty = {
|
|
|
29
29
|
ref: undefined
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
var importDeclarations = ast.Root.findImportsByModule(
|
|
32
|
+
var importDeclarations = ast.Root.findImportsByModule(
|
|
33
|
+
/**
|
|
34
|
+
* `context.getSourceCode()` is deprecated in favour of `context.sourceCode`.
|
|
35
|
+
* However, `context.sourceCode` returns undefined for some usages. This may be a bug
|
|
36
|
+
* in the `eslint` package. So, use `getSourceCode()` instead.
|
|
37
|
+
*
|
|
38
|
+
* Note: `context.sourceCode` works in testing environments. So, it is hard to validate whether it
|
|
39
|
+
* will work in the wild. Even if the tests pass, don't assume it will work in production.
|
|
40
|
+
*/
|
|
41
|
+
context.getSourceCode().ast.body, '@atlaskit/primitives');
|
|
33
42
|
var isXcssImported = importDeclarations.some(function (importDeclaration) {
|
|
34
43
|
return ast.Import.containsNamedSpecifier(importDeclaration, 'xcss');
|
|
35
44
|
});
|
|
@@ -152,7 +152,10 @@ export var StyleObject = {
|
|
|
152
152
|
data: {
|
|
153
153
|
payload: "fontSize:".concat(fontSizeRaw)
|
|
154
154
|
},
|
|
155
|
-
|
|
155
|
+
suggest: [{
|
|
156
|
+
desc: "Convert to font token",
|
|
157
|
+
fix: StyleObject._fix(fixerRefs, context)
|
|
158
|
+
}]
|
|
156
159
|
});
|
|
157
160
|
} else if (!matchingTokens.length) {
|
|
158
161
|
context.report({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a9fbd091c8b53fd9515afc7cdd793c6b>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
6
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap
|
|
1
|
+
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap } from './css-to-xcss';
|
|
2
2
|
export { CompiledStyled } from './compiled-styled';
|
|
3
3
|
export { EmotionCSS } from './emotion-css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a9fbd091c8b53fd9515afc7cdd793c6b>>
|
|
4
4
|
* @codegenId spacing
|
|
5
5
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen-token-maps
|
|
6
6
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap
|
|
1
|
+
export { cssToXcssTransformer, supportedStylesMap, spaceTokenMap } from './css-to-xcss';
|
|
2
2
|
export { CompiledStyled } from './compiled-styled';
|
|
3
3
|
export { EmotionCSS } from './emotion-css';
|
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": "10.
|
|
4
|
+
"version": "10.7.0",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@atlaskit/eslint-utils": "^1.
|
|
44
|
+
"@atlaskit/eslint-utils": "^1.6.0",
|
|
45
45
|
"@atlaskit/tokens": "*",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@typescript-eslint/utils": "^5.48.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@af/formatting": "*",
|
|
57
57
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
58
|
-
"@atlaskit/theme": "^12.
|
|
58
|
+
"@atlaskit/theme": "^12.9.0",
|
|
59
59
|
"@atlassian/codegen": "*",
|
|
60
60
|
"@atlassian/eslint-utils": "^0.5.0",
|
|
61
61
|
"@emotion/react": "^11.7.1",
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/eslint-plugin-design-system"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -21,48 +22,48 @@ import { RuleModule } from '@typescript-eslint/utils/dist/ts-eslint/Rule';
|
|
|
21
22
|
|
|
22
23
|
// @public (undocumented)
|
|
23
24
|
export const configs: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
25
|
+
all: {
|
|
26
|
+
plugins: string[];
|
|
27
|
+
rules: {
|
|
28
|
+
'@atlaskit/design-system/consistent-css-prop-usage': string;
|
|
29
|
+
'@atlaskit/design-system/ensure-design-token-usage': string;
|
|
30
|
+
'@atlaskit/design-system/ensure-design-token-usage/preview': string;
|
|
31
|
+
'@atlaskit/design-system/icon-label': string;
|
|
32
|
+
'@atlaskit/design-system/no-banned-imports': string;
|
|
33
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
34
|
+
'@atlaskit/design-system/no-deprecated-apis': string;
|
|
35
|
+
'@atlaskit/design-system/no-deprecated-design-token-usage': string;
|
|
36
|
+
'@atlaskit/design-system/no-deprecated-imports': string;
|
|
37
|
+
'@atlaskit/design-system/no-margin': string;
|
|
38
|
+
'@atlaskit/design-system/no-nested-styles': string;
|
|
39
|
+
'@atlaskit/design-system/no-physical-properties': string;
|
|
40
|
+
'@atlaskit/design-system/no-unsafe-design-token-usage': string;
|
|
41
|
+
'@atlaskit/design-system/no-unsupported-drag-and-drop-libraries': string;
|
|
42
|
+
'@atlaskit/design-system/prefer-primitives': string;
|
|
43
|
+
'@atlaskit/design-system/use-drawer-label': string;
|
|
44
|
+
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
45
|
+
'@atlaskit/design-system/use-primitives': string;
|
|
46
|
+
'@atlaskit/design-system/use-visually-hidden': string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
recommended: {
|
|
50
|
+
plugins: string[];
|
|
51
|
+
rules: {
|
|
52
|
+
'@atlaskit/design-system/consistent-css-prop-usage': string;
|
|
53
|
+
'@atlaskit/design-system/ensure-design-token-usage': string;
|
|
54
|
+
'@atlaskit/design-system/icon-label': string;
|
|
55
|
+
'@atlaskit/design-system/no-banned-imports': string;
|
|
56
|
+
'@atlaskit/design-system/no-deprecated-apis': string;
|
|
57
|
+
'@atlaskit/design-system/no-deprecated-design-token-usage': string;
|
|
58
|
+
'@atlaskit/design-system/no-deprecated-imports': string;
|
|
59
|
+
'@atlaskit/design-system/no-nested-styles': string;
|
|
60
|
+
'@atlaskit/design-system/no-unsafe-design-token-usage': string;
|
|
61
|
+
'@atlaskit/design-system/no-unsupported-drag-and-drop-libraries': string;
|
|
62
|
+
'@atlaskit/design-system/use-drawer-label': string;
|
|
63
|
+
'@atlaskit/design-system/use-href-in-link-item': string;
|
|
64
|
+
'@atlaskit/design-system/use-visually-hidden': string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
// @public (undocumented)
|
|
@@ -70,73 +71,73 @@ type DeprecatedConfig = DeprecatedImportConfig | DeprecatedJSXAttributeConfig;
|
|
|
70
71
|
|
|
71
72
|
// @public (undocumented)
|
|
72
73
|
type DeprecatedImportConfig = {
|
|
73
|
-
|
|
74
|
+
[key: string]: DeprecatedImportConfigEntry;
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
// @public (undocumented)
|
|
77
78
|
type DeprecatedImportConfigEntry = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
message?: string;
|
|
80
|
+
importSpecifiers?: {
|
|
81
|
+
importName: string;
|
|
82
|
+
message: string;
|
|
83
|
+
}[];
|
|
83
84
|
};
|
|
84
85
|
|
|
85
86
|
// @public (undocumented)
|
|
86
87
|
type DeprecatedJSXAttributeConfig = {
|
|
87
|
-
|
|
88
|
+
[key: string]: DeprecatedJSXAttributeConfigEntry[];
|
|
88
89
|
};
|
|
89
90
|
|
|
90
91
|
// @public (undocumented)
|
|
91
92
|
type DeprecatedJSXAttributeConfigEntry = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
moduleSpecifier: string;
|
|
94
|
+
namedSpecifiers?: string[];
|
|
95
|
+
actionableVersion?: string;
|
|
95
96
|
};
|
|
96
97
|
|
|
97
98
|
// @public (undocumented)
|
|
98
99
|
export const filterActionableDeprecations: (
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
originalDeprecatedConfig: string,
|
|
101
|
+
rootPackageJson: string,
|
|
101
102
|
) => string;
|
|
102
103
|
|
|
103
104
|
// @public (undocumented)
|
|
104
105
|
export const rules: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
106
|
+
'consistent-css-prop-usage': Rule.RuleModule;
|
|
107
|
+
'ensure-design-token-usage': Rule.RuleModule;
|
|
108
|
+
'ensure-design-token-usage/preview': Rule.RuleModule;
|
|
109
|
+
'icon-label': Rule.RuleModule;
|
|
110
|
+
'no-banned-imports': Rule.RuleModule;
|
|
111
|
+
'no-css-tagged-template-expression': Rule.RuleModule;
|
|
112
|
+
'no-deprecated-apis': RuleModule<
|
|
113
|
+
string,
|
|
114
|
+
[
|
|
115
|
+
{
|
|
116
|
+
deprecatedConfig: DeprecatedConfig;
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
RuleListener
|
|
120
|
+
>;
|
|
121
|
+
'no-deprecated-design-token-usage': Rule.RuleModule;
|
|
122
|
+
'no-deprecated-imports': RuleModule<
|
|
123
|
+
string,
|
|
124
|
+
[
|
|
125
|
+
{
|
|
126
|
+
deprecatedConfig: DeprecatedConfig;
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
RuleListener
|
|
130
|
+
>;
|
|
131
|
+
'no-margin': Rule.RuleModule;
|
|
132
|
+
'no-nested-styles': Rule.RuleModule;
|
|
133
|
+
'no-physical-properties': Rule.RuleModule;
|
|
134
|
+
'no-unsafe-design-token-usage': Rule.RuleModule;
|
|
135
|
+
'no-unsupported-drag-and-drop-libraries': Rule.RuleModule;
|
|
136
|
+
'prefer-primitives': Rule.RuleModule;
|
|
137
|
+
'use-drawer-label': Rule.RuleModule;
|
|
138
|
+
'use-href-in-link-item': Rule.RuleModule;
|
|
139
|
+
'use-primitives': Rule.RuleModule;
|
|
140
|
+
'use-visually-hidden': Rule.RuleModule;
|
|
140
141
|
};
|
|
141
142
|
|
|
142
143
|
// (No @packageDocumentation comment for this package)
|