@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 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
@@ -50,7 +50,7 @@ var rule = {
50
50
  var migrationMeta = _renameMapping.default.filter(function (t) {
51
51
  return t.state === 'deprecated';
52
52
  }).find(function (t) {
53
- return t.path === tokenKey;
53
+ return getCleanPathId(t.path) === tokenKey;
54
54
  });
55
55
 
56
56
  if (migrationMeta) {
@@ -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
- // @ts-ignore Name is not defined by types
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);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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
- // @ts-ignore Name is not defined by types
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
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -41,7 +41,7 @@ var rule = {
41
41
  var migrationMeta = renameMapping.filter(function (t) {
42
42
  return t.state === 'deprecated';
43
43
  }).find(function (t) {
44
- return t.path === tokenKey;
44
+ return getCleanPathId(t.path) === tokenKey;
45
45
  });
46
46
 
47
47
  if (migrationMeta) {
@@ -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
- // @ts-ignore Name is not defined by types
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);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.2.0",
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.6.0",
23
+ "@atlaskit/tokens": "^0.8.0",
24
24
  "@babel/runtime": "^7.0.0"
25
25
  },
26
26
  "devDependencies": {