@atlaskit/eslint-plugin-design-system 13.1.0 → 13.1.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,14 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 13.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#127093](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/127093)
8
+ [`1378ea7a99ce1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1378ea7a99ce1) -
9
+ Upgrades `jscodeshift` to handle generics properly.
10
+ - Updated dependencies
11
+
3
12
  ## 13.1.0
4
13
 
5
14
  ### Minor Changes
@@ -391,7 +391,6 @@ var createChecks = exports.createChecks = function createChecks(context) {
391
391
 
392
392
  // Legacy icons rendered as JSX elements
393
393
  if (Object.keys(legacyIconImports).includes(name)) {
394
- var _size, _size2;
395
394
  // Determine if inside a new button - if so:
396
395
  // - Assume spread props are safe - still error if props explicitly set to unmigratable values
397
396
  var insideNewButton = (0, _helpers.isInsideNewButton)(node, newButtonImports);
@@ -487,7 +486,7 @@ var createChecks = exports.createChecks = function createChecks(context) {
487
486
  var migrationMapObject = (0, _helpers.getMigrationMapObject)(legacyIconImports[name].packageName);
488
487
  var upcomingIcon = (0, _helpers.getUpcomingIcons)(legacyIconImports[name].packageName);
489
488
  var newIcon = migrationMapObject === null || migrationMapObject === void 0 ? void 0 : migrationMapObject.newIcon;
490
- var isNewIconMigratable = (0, _helpers.canAutoMigrateNewIconBasedOnSize)(upcomingIcon ? upcomingIcon.sizeGuidance[(_size = size) !== null && _size !== void 0 ? _size : 'medium'] : migrationMapObject === null || migrationMapObject === void 0 ? void 0 : migrationMapObject.sizeGuidance[(_size2 = size) !== null && _size2 !== void 0 ? _size2 : 'medium']);
489
+ var isNewIconMigratable = (0, _helpers.canAutoMigrateNewIconBasedOnSize)(upcomingIcon ? upcomingIcon.sizeGuidance[size !== null && size !== void 0 ? size : 'medium'] : migrationMapObject === null || migrationMapObject === void 0 ? void 0 : migrationMapObject.sizeGuidance[size !== null && size !== void 0 ? size : 'medium']);
491
490
 
492
491
  // Add spacing if:
493
492
  // 1. size is medium for core/utility icons or small for utility icons, or not set (default is medium for core and small for utility icons)
@@ -14,7 +14,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
14
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
15
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
16
  var getStack = function getStack(context, node) {
17
- var _scope;
18
17
  var _getSourceCode = (0, _contextCompat.getSourceCode)(context),
19
18
  scopeManager = _getSourceCode.scopeManager;
20
19
  var stack = {
@@ -46,7 +45,7 @@ var getStack = function getStack(context, node) {
46
45
  }
47
46
  }
48
47
  return _objectSpread(_objectSpread({}, stack), {}, {
49
- scope: (_scope = scope) !== null && _scope !== void 0 ? _scope : (0, _contextCompat.getScope)(context, node)
48
+ scope: scope !== null && scope !== void 0 ? scope : (0, _contextCompat.getScope)(context, node)
50
49
  });
51
50
  };
52
51
  var matches = function matches(defs, refs) {
@@ -385,7 +385,6 @@ export var createChecks = function createChecks(context) {
385
385
 
386
386
  // Legacy icons rendered as JSX elements
387
387
  if (Object.keys(legacyIconImports).includes(name)) {
388
- var _size, _size2;
389
388
  // Determine if inside a new button - if so:
390
389
  // - Assume spread props are safe - still error if props explicitly set to unmigratable values
391
390
  var insideNewButton = isInsideNewButton(node, newButtonImports);
@@ -481,7 +480,7 @@ export var createChecks = function createChecks(context) {
481
480
  var migrationMapObject = getMigrationMapObject(legacyIconImports[name].packageName);
482
481
  var upcomingIcon = getUpcomingIcons(legacyIconImports[name].packageName);
483
482
  var newIcon = migrationMapObject === null || migrationMapObject === void 0 ? void 0 : migrationMapObject.newIcon;
484
- var isNewIconMigratable = canAutoMigrateNewIconBasedOnSize(upcomingIcon ? upcomingIcon.sizeGuidance[(_size = size) !== null && _size !== void 0 ? _size : 'medium'] : migrationMapObject === null || migrationMapObject === void 0 ? void 0 : migrationMapObject.sizeGuidance[(_size2 = size) !== null && _size2 !== void 0 ? _size2 : 'medium']);
483
+ var isNewIconMigratable = canAutoMigrateNewIconBasedOnSize(upcomingIcon ? upcomingIcon.sizeGuidance[size !== null && size !== void 0 ? size : 'medium'] : migrationMapObject === null || migrationMapObject === void 0 ? void 0 : migrationMapObject.sizeGuidance[size !== null && size !== void 0 ? size : 'medium']);
485
484
 
486
485
  // Add spacing if:
487
486
  // 1. size is medium for core/utility icons or small for utility icons, or not set (default is medium for core and small for utility icons)
@@ -7,7 +7,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { getScope, getSourceCode } from '@atlaskit/eslint-utils/context-compat';
8
8
  import { isStyledComponent } from './is-styled-component';
9
9
  var getStack = function getStack(context, node) {
10
- var _scope;
11
10
  var _getSourceCode = getSourceCode(context),
12
11
  scopeManager = _getSourceCode.scopeManager;
13
12
  var stack = {
@@ -39,7 +38,7 @@ var getStack = function getStack(context, node) {
39
38
  }
40
39
  }
41
40
  return _objectSpread(_objectSpread({}, stack), {}, {
42
- scope: (_scope = scope) !== null && _scope !== void 0 ? _scope : getScope(context, node)
41
+ scope: scope !== null && scope !== void 0 ? scope : getScope(context, node)
43
42
  });
44
43
  };
45
44
  var matches = function matches(defs, refs) {
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.1.0",
4
+ "version": "13.1.1",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@atlaskit/eslint-utils": "^2.0.0",
47
47
  "@atlaskit/icon": "^25.0.0",
48
- "@atlaskit/icon-lab": "^4.2.0",
48
+ "@atlaskit/icon-lab": "^4.3.0",
49
49
  "@atlaskit/tokens": "^4.5.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@typescript-eslint/utils": "^7.1.0",
@@ -72,7 +72,7 @@
72
72
  "@types/estraverse": "^5.1.7",
73
73
  "@types/json-schema": "^7.0.15",
74
74
  "eslint": "^8.57.0",
75
- "jscodeshift": "^0.13.0",
75
+ "jscodeshift": "^0.16.1",
76
76
  "outdent": "^0.5.0",
77
77
  "react": "^18.2.0",
78
78
  "ts-jest": "^29.2.2",