@atlaskit/eslint-plugin-design-system 8.15.4 → 8.15.5
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.15.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#63526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63526) [`cae958047771`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cae958047771) - Internal change to how typography tokens are imported. There is no expected behaviour change.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 8.15.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var isFontFamily = exports.isFontFamily = function isFontFamily(node) {
|
|
|
22
22
|
var isCodeFontFamily = exports.isCodeFontFamily = function isCodeFontFamily(node) {
|
|
23
23
|
return (0, _eslintCodemodUtils.isNodeOfType)(node, 'CallExpression') && (0, _eslintCodemodUtils.isNodeOfType)(node.callee, 'Identifier') && (node.callee.name === 'codeFontFamily' || node.callee.name === 'getCodeFontFamily');
|
|
24
24
|
};
|
|
25
|
-
var typographyValueToToken = exports.typographyValueToToken = Object.fromEntries(_tokensRaw.
|
|
25
|
+
var typographyValueToToken = exports.typographyValueToToken = Object.fromEntries(_tokensRaw.typographyAdg3
|
|
26
26
|
// we're filtering here to remove the `font` tokens.
|
|
27
27
|
.filter(function (t) {
|
|
28
28
|
return t.attributes.group !== 'typography';
|
|
@@ -31,7 +31,7 @@ var typographyValueToToken = exports.typographyValueToToken = Object.fromEntries
|
|
|
31
31
|
// This allows us to look up values specific to a property
|
|
32
32
|
// (so as not to mix tokens with overlapping values e.g. font size and line height both have tokens for 16px)
|
|
33
33
|
var tokenGroup = currentToken.attributes.group;
|
|
34
|
-
return [tokenGroup, Object.fromEntries(_tokensRaw.
|
|
34
|
+
return [tokenGroup, Object.fromEntries(_tokensRaw.typographyAdg3.map(function (token) {
|
|
35
35
|
return token.attributes.group === tokenGroup ? [token.value.replaceAll("\"", "'"), token.name] : [];
|
|
36
36
|
}).filter(function (token) {
|
|
37
37
|
return token.length;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { typographyAdg3 as typographyTokens } from '@atlaskit/tokens/tokens-raw';
|
|
3
3
|
const typographyProperties = ['fontSize', 'fontWeight', 'fontFamily', 'lineHeight'];
|
|
4
4
|
export const isTypographyProperty = propertyName => {
|
|
5
5
|
return typographyProperties.includes(propertyName);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNodeOfType } from 'eslint-codemod-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { typographyAdg3 as typographyTokens } from '@atlaskit/tokens/tokens-raw';
|
|
3
3
|
var typographyProperties = ['fontSize', 'fontWeight', 'fontFamily', 'lineHeight'];
|
|
4
4
|
export var isTypographyProperty = function isTypographyProperty(propertyName) {
|
|
5
5
|
return typographyProperties.includes(propertyName);
|
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.15.
|
|
4
|
+
"version": "8.15.5",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|