@atlaskit/eslint-plugin-design-system 13.21.1 → 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 +8 -0
- package/dist/esm/rules/utils/create-rule.js +2 -1
- package/dist/types/rules/ensure-design-token-usage-preview/index.d.ts +2 -1
- package/dist/types/rules/use-tokens-typography/utils.d.ts +2 -34
- package/dist/types/rules/utils/create-rule.d.ts +3 -1
- package/dist/types-ts4.5/rules/ensure-design-token-usage-preview/index.d.ts +2 -1
- package/dist/types-ts4.5/rules/use-tokens-typography/utils.d.ts +2 -34
- package/dist/types-ts4.5/rules/utils/create-rule.d.ts +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 13.21.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
2
|
import { type CallExpression, type Directive, type EslintNode, type ImportDeclaration, type ModuleDeclaration, type Property, type Statement, type StringableASTNode } from 'eslint-codemod-utils';
|
|
3
|
+
import { typographyAdg3 as typographyTokens } from '@atlaskit/tokens/tokens-raw';
|
|
3
4
|
export declare const typographyProperties: string[];
|
|
4
5
|
export declare const isTypographyProperty: (propertyName: string) => boolean;
|
|
5
6
|
export declare const isFontSize: (node: EslintNode) => node is CallExpression;
|
|
@@ -69,40 +70,7 @@ export type FontWeightMap = {
|
|
|
69
70
|
bold: string;
|
|
70
71
|
};
|
|
71
72
|
export declare const defaultFontWeight: string;
|
|
72
|
-
export declare const fontFamilyTokens:
|
|
73
|
-
value: string;
|
|
74
|
-
filePath: string;
|
|
75
|
-
isSource: boolean;
|
|
76
|
-
attributes: {
|
|
77
|
-
group: string;
|
|
78
|
-
state: string;
|
|
79
|
-
introduced: string;
|
|
80
|
-
description: string;
|
|
81
|
-
suggest?: string[];
|
|
82
|
-
deprecated?: string;
|
|
83
|
-
};
|
|
84
|
-
original: {
|
|
85
|
-
value: string | {
|
|
86
|
-
fontWeight: string;
|
|
87
|
-
fontSize: string;
|
|
88
|
-
lineHeight: string;
|
|
89
|
-
fontFamily: string;
|
|
90
|
-
fontStyle: string;
|
|
91
|
-
letterSpacing: string;
|
|
92
|
-
};
|
|
93
|
-
attributes: {
|
|
94
|
-
group: string;
|
|
95
|
-
state: string;
|
|
96
|
-
introduced: string;
|
|
97
|
-
description: string;
|
|
98
|
-
suggest?: string[];
|
|
99
|
-
deprecated?: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
name: string;
|
|
103
|
-
path: string[];
|
|
104
|
-
cleanName: string;
|
|
105
|
-
}[];
|
|
73
|
+
export declare const fontFamilyTokens: typeof typographyTokens;
|
|
106
74
|
export declare function findFontFamilyValueForToken(tokenName: string): string;
|
|
107
75
|
export declare function findFontFamilyTokenForValue(value: string): "font.family.brand.heading" | "font.family.brand.body" | "font.family.body" | "font.family.code" | undefined;
|
|
108
76
|
export declare function notUndefined<V>(value: V | undefined): value is V;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
+
import type { Rule } from 'eslint';
|
|
3
|
+
import { type LintRule } from '@atlaskit/eslint-utils/create-rule';
|
|
2
4
|
/**
|
|
3
5
|
* We are moving to our own small abstraction to create a lint rule that we have the power
|
|
4
6
|
* to change and mold to our own needs.
|
|
@@ -14,4 +16,4 @@ export declare const createRule: <Options extends readonly unknown[], MessageIds
|
|
|
14
16
|
* there is a docs link to our ESLint plugin documentation page,
|
|
15
17
|
* as well as improving type support.
|
|
16
18
|
*/
|
|
17
|
-
export declare const createLintRule: (rule:
|
|
19
|
+
export declare const createLintRule: (rule: LintRule) => Rule.RuleModule;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Rule } from 'eslint';
|
|
2
2
|
import { type CallExpression, type Directive, type EslintNode, type ImportDeclaration, type ModuleDeclaration, type Property, type Statement, type StringableASTNode } from 'eslint-codemod-utils';
|
|
3
|
+
import { typographyAdg3 as typographyTokens } from '@atlaskit/tokens/tokens-raw';
|
|
3
4
|
export declare const typographyProperties: string[];
|
|
4
5
|
export declare const isTypographyProperty: (propertyName: string) => boolean;
|
|
5
6
|
export declare const isFontSize: (node: EslintNode) => node is CallExpression;
|
|
@@ -69,40 +70,7 @@ export type FontWeightMap = {
|
|
|
69
70
|
bold: string;
|
|
70
71
|
};
|
|
71
72
|
export declare const defaultFontWeight: string;
|
|
72
|
-
export declare const fontFamilyTokens:
|
|
73
|
-
value: string;
|
|
74
|
-
filePath: string;
|
|
75
|
-
isSource: boolean;
|
|
76
|
-
attributes: {
|
|
77
|
-
group: string;
|
|
78
|
-
state: string;
|
|
79
|
-
introduced: string;
|
|
80
|
-
description: string;
|
|
81
|
-
suggest?: string[];
|
|
82
|
-
deprecated?: string;
|
|
83
|
-
};
|
|
84
|
-
original: {
|
|
85
|
-
value: string | {
|
|
86
|
-
fontWeight: string;
|
|
87
|
-
fontSize: string;
|
|
88
|
-
lineHeight: string;
|
|
89
|
-
fontFamily: string;
|
|
90
|
-
fontStyle: string;
|
|
91
|
-
letterSpacing: string;
|
|
92
|
-
};
|
|
93
|
-
attributes: {
|
|
94
|
-
group: string;
|
|
95
|
-
state: string;
|
|
96
|
-
introduced: string;
|
|
97
|
-
description: string;
|
|
98
|
-
suggest?: string[];
|
|
99
|
-
deprecated?: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
name: string;
|
|
103
|
-
path: string[];
|
|
104
|
-
cleanName: string;
|
|
105
|
-
}[];
|
|
73
|
+
export declare const fontFamilyTokens: typeof typographyTokens;
|
|
106
74
|
export declare function findFontFamilyValueForToken(tokenName: string): string;
|
|
107
75
|
export declare function findFontFamilyTokenForValue(value: string): "font.family.brand.heading" | "font.family.brand.body" | "font.family.body" | "font.family.code" | undefined;
|
|
108
76
|
export declare function notUndefined<V>(value: V | undefined): value is V;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
+
import type { Rule } from 'eslint';
|
|
3
|
+
import { type LintRule } from '@atlaskit/eslint-utils/create-rule';
|
|
2
4
|
/**
|
|
3
5
|
* We are moving to our own small abstraction to create a lint rule that we have the power
|
|
4
6
|
* to change and mold to our own needs.
|
|
@@ -14,4 +16,4 @@ export declare const createRule: <Options extends readonly unknown[], MessageIds
|
|
|
14
16
|
* there is a docs link to our ESLint plugin documentation page,
|
|
15
17
|
* as well as improving type support.
|
|
16
18
|
*/
|
|
17
|
-
export declare const createLintRule: (rule:
|
|
19
|
+
export declare const createLintRule: (rule: LintRule) => Rule.RuleModule;
|
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": "13.21.
|
|
4
|
+
"version": "13.21.2",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/eslint-utils": "^2.0.0",
|
|
42
42
|
"@atlaskit/icon": "^28.3.0",
|
|
43
|
-
"@atlaskit/icon-lab": "^5.
|
|
44
|
-
"@atlaskit/tokens": "^6.
|
|
43
|
+
"@atlaskit/icon-lab": "^5.8.0",
|
|
44
|
+
"@atlaskit/tokens": "^6.4.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@typescript-eslint/utils": "^7.1.0",
|
|
47
47
|
"ajv": "^6.12.6",
|