@atlaskit/eslint-plugin-design-system 8.37.2 → 8.37.3
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 +6 -0
- package/dist/cjs/rules/use-primitives/utils/validate-styles.js +11 -2
- package/dist/es2019/rules/use-primitives/utils/validate-styles.js +11 -2
- package/dist/esm/rules/use-primitives/utils/validate-styles.js +11 -2
- package/dist/types/rules/index.codegen.d.ts +4 -4
- package/dist/types/rules/use-visually-hidden/constants.d.ts +1 -1
- package/dist/types/rules/utils/create-rule.d.ts +1 -1
- package/dist/types-ts4.5/rules/index.codegen.d.ts +4 -4
- package/dist/types-ts4.5/rules/use-visually-hidden/constants.d.ts +1 -1
- package/dist/types-ts4.5/rules/utils/create-rule.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 8.37.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
8
|
+
|
|
3
9
|
## 8.37.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -93,7 +93,6 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
95
|
var token = ast.FunctionCall.getArgumentAtPos(node, 0);
|
|
96
|
-
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
97
96
|
if (!token || token.type !== 'Literal') {
|
|
98
97
|
return false;
|
|
99
98
|
}
|
|
@@ -104,7 +103,17 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
// Not all `token()` calls have a fall back. This is fine, but if there is a fallback, make sure it's the same as the fallback xcss will use
|
|
107
|
-
if (
|
|
106
|
+
if (node.arguments.length === 2) {
|
|
107
|
+
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
108
|
+
|
|
109
|
+
// `getArgumentAtPos` is only able to understand `Literal` and `ObjectExpression` statements
|
|
110
|
+
// If there are 2 args, but `fallback` is undefined, then the fallback is something wild, like `token('space.100, `${gridSize * rem(3)`})`
|
|
111
|
+
if (!fallback) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (fallback.type !== 'Literal') {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
108
117
|
if (_transformers.spaceTokenMap[fallback.value] !== token.value) {
|
|
109
118
|
return false;
|
|
110
119
|
}
|
|
@@ -86,7 +86,6 @@ const isTokenCall = node => {
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
const token = ast.FunctionCall.getArgumentAtPos(node, 0);
|
|
89
|
-
const fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
90
89
|
if (!token || token.type !== 'Literal') {
|
|
91
90
|
return false;
|
|
92
91
|
}
|
|
@@ -97,7 +96,17 @@ const isTokenCall = node => {
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
// Not all `token()` calls have a fall back. This is fine, but if there is a fallback, make sure it's the same as the fallback xcss will use
|
|
100
|
-
if (
|
|
99
|
+
if (node.arguments.length === 2) {
|
|
100
|
+
const fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
101
|
+
|
|
102
|
+
// `getArgumentAtPos` is only able to understand `Literal` and `ObjectExpression` statements
|
|
103
|
+
// If there are 2 args, but `fallback` is undefined, then the fallback is something wild, like `token('space.100, `${gridSize * rem(3)`})`
|
|
104
|
+
if (!fallback) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
if (fallback.type !== 'Literal') {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
101
110
|
if (spaceTokenMap[fallback.value] !== token.value) {
|
|
102
111
|
return false;
|
|
103
112
|
}
|
|
@@ -84,7 +84,6 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
84
84
|
return false;
|
|
85
85
|
}
|
|
86
86
|
var token = ast.FunctionCall.getArgumentAtPos(node, 0);
|
|
87
|
-
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
88
87
|
if (!token || token.type !== 'Literal') {
|
|
89
88
|
return false;
|
|
90
89
|
}
|
|
@@ -95,7 +94,17 @@ var isTokenCall = function isTokenCall(node) {
|
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
// Not all `token()` calls have a fall back. This is fine, but if there is a fallback, make sure it's the same as the fallback xcss will use
|
|
98
|
-
if (
|
|
97
|
+
if (node.arguments.length === 2) {
|
|
98
|
+
var fallback = ast.FunctionCall.getArgumentAtPos(node, 1);
|
|
99
|
+
|
|
100
|
+
// `getArgumentAtPos` is only able to understand `Literal` and `ObjectExpression` statements
|
|
101
|
+
// If there are 2 args, but `fallback` is undefined, then the fallback is something wild, like `token('space.100, `${gridSize * rem(3)`})`
|
|
102
|
+
if (!fallback) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
if (fallback.type !== 'Literal') {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
99
108
|
if (spaceTokenMap[fallback.value] !== token.value) {
|
|
100
109
|
return false;
|
|
101
110
|
}
|
|
@@ -5,13 +5,13 @@ declare const _default: {
|
|
|
5
5
|
'icon-label': import("eslint").Rule.RuleModule;
|
|
6
6
|
'no-banned-imports': import("eslint").Rule.RuleModule;
|
|
7
7
|
'no-css-tagged-template-expression': import("eslint").Rule.RuleModule;
|
|
8
|
-
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint
|
|
8
|
+
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [{
|
|
9
9
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
10
|
-
}], import("@typescript-eslint/utils/dist/ts-eslint
|
|
10
|
+
}], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
11
11
|
'no-deprecated-design-token-usage': import("eslint").Rule.RuleModule;
|
|
12
|
-
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [{
|
|
13
13
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
14
|
-
}], import("@typescript-eslint/utils/dist/ts-eslint
|
|
14
|
+
}], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
15
15
|
'no-empty-styled-expression': import("eslint").Rule.RuleModule;
|
|
16
16
|
'no-exported-css': import("eslint").Rule.RuleModule;
|
|
17
17
|
'no-exported-keyframes': import("eslint").Rule.RuleModule;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const IMPORT_NAME = "AKVisuallyHidden";
|
|
2
2
|
export declare const VISUALLY_HIDDEN_SOURCE = "@atlaskit/visually-hidden";
|
|
3
|
-
export declare const VISUALLY_HIDDEN_IMPORT
|
|
3
|
+
export declare const VISUALLY_HIDDEN_IMPORT = "import AKVisuallyHidden from '@atlaskit/visually-hidden';\n";
|
|
@@ -9,7 +9,7 @@ import type { Rule } from 'eslint';
|
|
|
9
9
|
* @private
|
|
10
10
|
* @deprecated
|
|
11
11
|
*/
|
|
12
|
-
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint").RuleListener = import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<TMessageIds, TOptions, TRuleListener>;
|
|
13
13
|
export interface LintRule extends Omit<Rule.RuleModule, 'meta'> {
|
|
14
14
|
/**
|
|
15
15
|
* Including this for backwards compat moving from the typescript-eslint util.
|
|
@@ -5,17 +5,17 @@ declare const _default: {
|
|
|
5
5
|
'icon-label': import("eslint").Rule.RuleModule;
|
|
6
6
|
'no-banned-imports': import("eslint").Rule.RuleModule;
|
|
7
7
|
'no-css-tagged-template-expression': import("eslint").Rule.RuleModule;
|
|
8
|
-
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint
|
|
8
|
+
'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [
|
|
9
9
|
{
|
|
10
10
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
11
11
|
}
|
|
12
|
-
], import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
13
13
|
'no-deprecated-design-token-usage': import("eslint").Rule.RuleModule;
|
|
14
|
-
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint
|
|
14
|
+
'no-deprecated-imports': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [
|
|
15
15
|
{
|
|
16
16
|
deprecatedConfig: import("./utils/types").DeprecatedConfig;
|
|
17
17
|
}
|
|
18
|
-
], import("@typescript-eslint/utils/dist/ts-eslint
|
|
18
|
+
], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
19
19
|
'no-empty-styled-expression': import("eslint").Rule.RuleModule;
|
|
20
20
|
'no-exported-css': import("eslint").Rule.RuleModule;
|
|
21
21
|
'no-exported-keyframes': import("eslint").Rule.RuleModule;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const IMPORT_NAME = "AKVisuallyHidden";
|
|
2
2
|
export declare const VISUALLY_HIDDEN_SOURCE = "@atlaskit/visually-hidden";
|
|
3
|
-
export declare const VISUALLY_HIDDEN_IMPORT
|
|
3
|
+
export declare const VISUALLY_HIDDEN_IMPORT = "import AKVisuallyHidden from '@atlaskit/visually-hidden';\n";
|
|
@@ -9,7 +9,7 @@ import type { Rule } from 'eslint';
|
|
|
9
9
|
* @private
|
|
10
10
|
* @deprecated
|
|
11
11
|
*/
|
|
12
|
-
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint
|
|
12
|
+
export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends import("@typescript-eslint/utils/dist/ts-eslint").RuleListener = import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<TMessageIds, TOptions, TRuleListener>;
|
|
13
13
|
export interface LintRule extends Omit<Rule.RuleModule, 'meta'> {
|
|
14
14
|
/**
|
|
15
15
|
* Including this for backwards compat moving from the typescript-eslint util.
|
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": "8.37.
|
|
4
|
+
"version": "8.37.3",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"ts-jest": "26.5.6",
|
|
65
65
|
"ts-node": "^10.9.1",
|
|
66
66
|
"tsconfig-paths": "^4.2.0",
|
|
67
|
-
"typescript": "~4.
|
|
67
|
+
"typescript": "~5.4.2"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"ak-postbuild": "cp -r configs dist",
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
},
|
|
88
88
|
"homepage": "https://atlassian.design/components/eslint-plugin-design-system",
|
|
89
89
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
90
|
-
}
|
|
90
|
+
}
|