@atlaskit/eslint-plugin-design-system 8.32.2 → 8.33.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,11 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 8.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#77488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77488) [`babedf52898f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/babedf52898f) - Add support for inline `cx` func inside `xcss` prop for the `consistent-css-prop-usage` rule.
8
+
3
9
  ## 8.32.2
4
10
 
5
11
  ### Patch Changes
@@ -398,6 +398,13 @@ var JSXExpressionLinter = /*#__PURE__*/function () {
398
398
  case 'CallExpression':
399
399
  case 'TaggedTemplateExpression':
400
400
  case 'TemplateLiteral':
401
+ if (expression.type === 'CallExpression' && expression.callee.type === 'Identifier' && expression.callee.name === 'cx') {
402
+ expression.arguments.forEach(function (exp) {
403
+ return exp && _this3.traverseExpression(exp);
404
+ });
405
+ return;
406
+ }
407
+
401
408
  // We've found elements that shouldn't be here! Report an error.
402
409
  this.context.report({
403
410
  node: expression,
@@ -353,6 +353,11 @@ class JSXExpressionLinter {
353
353
  case 'CallExpression':
354
354
  case 'TaggedTemplateExpression':
355
355
  case 'TemplateLiteral':
356
+ if (expression.type === 'CallExpression' && expression.callee.type === 'Identifier' && expression.callee.name === 'cx') {
357
+ expression.arguments.forEach(exp => exp && this.traverseExpression(exp));
358
+ return;
359
+ }
360
+
356
361
  // We've found elements that shouldn't be here! Report an error.
357
362
  this.context.report({
358
363
  node: expression,
@@ -391,6 +391,13 @@ var JSXExpressionLinter = /*#__PURE__*/function () {
391
391
  case 'CallExpression':
392
392
  case 'TaggedTemplateExpression':
393
393
  case 'TemplateLiteral':
394
+ if (expression.type === 'CallExpression' && expression.callee.type === 'Identifier' && expression.callee.name === 'cx') {
395
+ expression.arguments.forEach(function (exp) {
396
+ return exp && _this3.traverseExpression(exp);
397
+ });
398
+ return;
399
+ }
400
+
394
401
  // We've found elements that shouldn't be here! Report an error.
395
402
  this.context.report({
396
403
  node: expression,
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.32.2",
4
+ "version": "8.33.0",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"