@atlaskit/eslint-plugin-design-system 13.16.0 → 13.16.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,13 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 13.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#159753](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159753)
8
+ [`756c84e9b07d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/756c84e9b07d1) -
9
+ Update no-utility-icons rule to add more robust fixes for new buttons cases.
10
+
3
11
  ## 13.16.0
4
12
 
5
13
  ### Minor Changes
@@ -168,7 +168,7 @@ var createChecks = exports.createChecks = function createChecks(context) {
168
168
  // Handle JSX elements differently if they are in a "new Button"
169
169
  if (error.inNewButton) {
170
170
  // Replace the icon with a function that wraps it with iconProps and size="small"
171
- var wrappedIcon = "(iconProps) => <".concat(replacementImportName, " label=\"\" {...iconProps} size=\"small\" />");
171
+ var wrappedIcon = "(iconProps) => <".concat(replacementImportName, " {...iconProps} size=\"small\" />");
172
172
  fixes.push(fixer.replaceText(error.node, wrappedIcon));
173
173
  } else if ((0, _eslintCodemodUtils.isNodeOfType)(error.node, 'JSXElement') && (0, _eslintCodemodUtils.isNodeOfType)(error.node.openingElement.name, 'JSXIdentifier')) {
174
174
  // Replace the JSX element's closing tag with size="small"
@@ -121,7 +121,7 @@ export const createChecks = context => {
121
121
  // Handle JSX elements differently if they are in a "new Button"
122
122
  if (error.inNewButton) {
123
123
  // Replace the icon with a function that wraps it with iconProps and size="small"
124
- const wrappedIcon = `(iconProps) => <${replacementImportName} label="" {...iconProps} size="small" />`;
124
+ const wrappedIcon = `(iconProps) => <${replacementImportName} {...iconProps} size="small" />`;
125
125
  fixes.push(fixer.replaceText(error.node, wrappedIcon));
126
126
  } else if (isNodeOfType(error.node, 'JSXElement') && isNodeOfType(error.node.openingElement.name, 'JSXIdentifier')) {
127
127
  // Replace the JSX element's closing tag with size="small"
@@ -161,7 +161,7 @@ export var createChecks = function createChecks(context) {
161
161
  // Handle JSX elements differently if they are in a "new Button"
162
162
  if (error.inNewButton) {
163
163
  // Replace the icon with a function that wraps it with iconProps and size="small"
164
- var wrappedIcon = "(iconProps) => <".concat(replacementImportName, " label=\"\" {...iconProps} size=\"small\" />");
164
+ var wrappedIcon = "(iconProps) => <".concat(replacementImportName, " {...iconProps} size=\"small\" />");
165
165
  fixes.push(fixer.replaceText(error.node, wrappedIcon));
166
166
  } else if (isNodeOfType(error.node, 'JSXElement') && isNodeOfType(error.node.openingElement.name, 'JSXIdentifier')) {
167
167
  // Replace the JSX element's closing tag with size="small"
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.16.0",
4
+ "version": "13.16.1",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {