@atlaskit/eslint-plugin-design-system 4.2.0 → 4.4.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 +26 -0
- package/dist/cjs/rules/no-deprecated-design-token-usage/index.js +1 -1
- package/dist/cjs/rules/no-unsafe-design-token-usage/index.js +1 -1
- package/dist/cjs/rules/utils/is-node.js +3 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/rules/no-deprecated-design-token-usage/index.js +1 -1
- package/dist/es2019/rules/no-unsafe-design-token-usage/index.js +1 -1
- package/dist/es2019/rules/utils/is-node.js +3 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/rules/no-deprecated-design-token-usage/index.js +1 -1
- package/dist/esm/rules/no-unsafe-design-token-usage/index.js +1 -1
- package/dist/esm/rules/utils/is-node.js +3 -2
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-design-system
|
|
2
2
|
|
|
3
|
+
## 4.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1065b5b1bbb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1065b5b1bbb) - Fixed bug where deleted '[default]' tokens were not being detected by lint tooling
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 4.3.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [`2dbc546f748`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2dbc546f748) - Fixes a bug where token paths including [default] were not being detected by the linter
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 4.2.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [`63a22b17621`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63a22b17621) - Fixes a bug where use of qualified type annotations would throw an error.
|
|
28
|
+
|
|
3
29
|
## 4.2.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -139,7 +139,7 @@ var rule = {
|
|
|
139
139
|
var migrationMeta = _renameMapping.default.filter(function (t) {
|
|
140
140
|
return t.state === 'deleted';
|
|
141
141
|
}).find(function (t) {
|
|
142
|
-
return t.path === tokenKey;
|
|
142
|
+
return getCleanPathId(t.path) === tokenKey;
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
if (typeof tokenKey === 'string' && migrationMeta) {
|
|
@@ -70,8 +70,9 @@ var isDecendantOfStyleBlock = function isDecendantOfStyleBlock(node) {
|
|
|
70
70
|
|
|
71
71
|
if ( // @ts-ignore typeAnnotation is not defined by types
|
|
72
72
|
node.id.typeAnnotation && // @ts-ignore typeAnnotation is not defined by types
|
|
73
|
-
node.id.typeAnnotation.typeAnnotation.type === 'GenericTypeAnnotation'
|
|
74
|
-
|
|
73
|
+
node.id.typeAnnotation.typeAnnotation.type === 'GenericTypeAnnotation' && // @ts-ignore typeAnnotation is not defined by types
|
|
74
|
+
node.id.typeAnnotation.typeAnnotation.id.type === 'Identifier') {
|
|
75
|
+
// @ts-ignore typeAnnotation is not defined by types
|
|
75
76
|
var typeName = node.id.typeAnnotation.typeAnnotation.id.name;
|
|
76
77
|
var hasCSSType = ['CSSProperties', 'CSSObject'].some(function (el) {
|
|
77
78
|
return typeName.includes(el);
|
package/dist/cjs/version.json
CHANGED
|
@@ -35,7 +35,7 @@ const rule = {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const migrationMeta = renameMapping.filter(t => t.state === 'deprecated').find(t => t.path === tokenKey);
|
|
38
|
+
const migrationMeta = renameMapping.filter(t => t.state === 'deprecated').find(t => getCleanPathId(t.path) === tokenKey);
|
|
39
39
|
|
|
40
40
|
if (migrationMeta) {
|
|
41
41
|
const cleanTokenKey = getCleanPathId(migrationMeta.replacement);
|
|
@@ -139,7 +139,7 @@ token('color.background.blanket');
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
const migrationMeta = renameMapping.filter(t => t.state === 'deleted').find(t => t.path === tokenKey);
|
|
142
|
+
const migrationMeta = renameMapping.filter(t => t.state === 'deleted').find(t => getCleanPathId(t.path) === tokenKey);
|
|
143
143
|
|
|
144
144
|
if (typeof tokenKey === 'string' && migrationMeta) {
|
|
145
145
|
const cleanTokenKey = getCleanPathId(migrationMeta.replacement);
|
|
@@ -42,8 +42,9 @@ export const isDecendantOfStyleBlock = node => {
|
|
|
42
42
|
|
|
43
43
|
if ( // @ts-ignore typeAnnotation is not defined by types
|
|
44
44
|
node.id.typeAnnotation && // @ts-ignore typeAnnotation is not defined by types
|
|
45
|
-
node.id.typeAnnotation.typeAnnotation.type === 'GenericTypeAnnotation'
|
|
46
|
-
|
|
45
|
+
node.id.typeAnnotation.typeAnnotation.type === 'GenericTypeAnnotation' && // @ts-ignore typeAnnotation is not defined by types
|
|
46
|
+
node.id.typeAnnotation.typeAnnotation.id.type === 'Identifier') {
|
|
47
|
+
// @ts-ignore typeAnnotation is not defined by types
|
|
47
48
|
const typeName = node.id.typeAnnotation.typeAnnotation.id.name;
|
|
48
49
|
const hasCSSType = ['CSSProperties', 'CSSObject'].some(el => typeName.includes(el));
|
|
49
50
|
|
package/dist/es2019/version.json
CHANGED
|
@@ -127,7 +127,7 @@ var rule = {
|
|
|
127
127
|
var migrationMeta = renameMapping.filter(function (t) {
|
|
128
128
|
return t.state === 'deleted';
|
|
129
129
|
}).find(function (t) {
|
|
130
|
-
return t.path === tokenKey;
|
|
130
|
+
return getCleanPathId(t.path) === tokenKey;
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
if (typeof tokenKey === 'string' && migrationMeta) {
|
|
@@ -48,8 +48,9 @@ export var isDecendantOfStyleBlock = function isDecendantOfStyleBlock(node) {
|
|
|
48
48
|
|
|
49
49
|
if ( // @ts-ignore typeAnnotation is not defined by types
|
|
50
50
|
node.id.typeAnnotation && // @ts-ignore typeAnnotation is not defined by types
|
|
51
|
-
node.id.typeAnnotation.typeAnnotation.type === 'GenericTypeAnnotation'
|
|
52
|
-
|
|
51
|
+
node.id.typeAnnotation.typeAnnotation.type === 'GenericTypeAnnotation' && // @ts-ignore typeAnnotation is not defined by types
|
|
52
|
+
node.id.typeAnnotation.typeAnnotation.id.type === 'Identifier') {
|
|
53
|
+
// @ts-ignore typeAnnotation is not defined by types
|
|
53
54
|
var typeName = node.id.typeAnnotation.typeAnnotation.id.name;
|
|
54
55
|
var hasCSSType = ['CSSProperties', 'CSSObject'].some(function (el) {
|
|
55
56
|
return typeName.includes(el);
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/eslint-plugin-design-system",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"author": "Atlassian Pty Ltd",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
".": "./src/index.tsx"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaskit/tokens": "^0.
|
|
23
|
+
"@atlaskit/tokens": "^0.8.0",
|
|
24
24
|
"@babel/runtime": "^7.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|