@atlaskit/eslint-plugin-design-system 8.4.0 → 8.4.1
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 8.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b11339bc8a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b11339bc8a3) - Internal updates for ADS Typography ADG3 theme.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 8.4.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -27,7 +27,11 @@ var isCodeFontFamily = function isCodeFontFamily(node) {
|
|
|
27
27
|
return (0, _eslintCodemodUtils.isNodeOfType)(node, 'CallExpression') && (0, _eslintCodemodUtils.isNodeOfType)(node.callee, 'Identifier') && (node.callee.name === 'codeFontFamily' || node.callee.name === 'getCodeFontFamily');
|
|
28
28
|
};
|
|
29
29
|
exports.isCodeFontFamily = isCodeFontFamily;
|
|
30
|
-
var typographyValueToToken = Object.fromEntries(_tokensRaw.typography
|
|
30
|
+
var typographyValueToToken = Object.fromEntries(_tokensRaw.typography
|
|
31
|
+
// we're filtering here to remove the `font` tokens.
|
|
32
|
+
.filter(function (t) {
|
|
33
|
+
return t.attributes.group !== 'typography';
|
|
34
|
+
}).map(function (currentToken) {
|
|
31
35
|
// Group tokens by property name (e.g. fontSize, fontFamily, lineHeight)
|
|
32
36
|
// This allows us to look up values specific to a property
|
|
33
37
|
// (so as not to mix tokens with overlapping values e.g. font size and line height both have tokens for 16px)
|
|
@@ -8,7 +8,9 @@ export const isFontSize = node => isNodeOfType(node, 'CallExpression') && isNode
|
|
|
8
8
|
export const isFontSizeSmall = node => isNodeOfType(node, 'CallExpression') && isNodeOfType(node.callee, 'Identifier') && node.callee.name === 'fontSizeSmall';
|
|
9
9
|
export const isFontFamily = node => isNodeOfType(node, 'CallExpression') && isNodeOfType(node.callee, 'Identifier') && (node.callee.name === 'fontFamily' || node.callee.name === 'getFontFamily');
|
|
10
10
|
export const isCodeFontFamily = node => isNodeOfType(node, 'CallExpression') && isNodeOfType(node.callee, 'Identifier') && (node.callee.name === 'codeFontFamily' || node.callee.name === 'getCodeFontFamily');
|
|
11
|
-
export const typographyValueToToken = Object.fromEntries(typographyTokens
|
|
11
|
+
export const typographyValueToToken = Object.fromEntries(typographyTokens
|
|
12
|
+
// we're filtering here to remove the `font` tokens.
|
|
13
|
+
.filter(t => t.attributes.group !== 'typography').map(currentToken => {
|
|
12
14
|
// Group tokens by property name (e.g. fontSize, fontFamily, lineHeight)
|
|
13
15
|
// This allows us to look up values specific to a property
|
|
14
16
|
// (so as not to mix tokens with overlapping values e.g. font size and line height both have tokens for 16px)
|
|
@@ -16,7 +16,11 @@ export var isFontFamily = function isFontFamily(node) {
|
|
|
16
16
|
export var isCodeFontFamily = function isCodeFontFamily(node) {
|
|
17
17
|
return isNodeOfType(node, 'CallExpression') && isNodeOfType(node.callee, 'Identifier') && (node.callee.name === 'codeFontFamily' || node.callee.name === 'getCodeFontFamily');
|
|
18
18
|
};
|
|
19
|
-
export var typographyValueToToken = Object.fromEntries(typographyTokens
|
|
19
|
+
export var typographyValueToToken = Object.fromEntries(typographyTokens
|
|
20
|
+
// we're filtering here to remove the `font` tokens.
|
|
21
|
+
.filter(function (t) {
|
|
22
|
+
return t.attributes.group !== 'typography';
|
|
23
|
+
}).map(function (currentToken) {
|
|
20
24
|
// Group tokens by property name (e.g. fontSize, fontFamily, lineHeight)
|
|
21
25
|
// This allows us to look up values specific to a property
|
|
22
26
|
// (so as not to mix tokens with overlapping values e.g. font size and line height both have tokens for 16px)
|
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.4.
|
|
4
|
+
"version": "8.4.1",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
".": "./src/index.tsx"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/tokens": "^1.
|
|
36
|
+
"@atlaskit/tokens": "^1.15.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
38
38
|
"@typescript-eslint/utils": "^5.48.1",
|
|
39
39
|
"ajv": "^6.12.6",
|