diff --git a/CHANGELOG.md b/CHANGELOG.md index a3a742ed590..24c49431c0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Added `data-test-subj` property to `EuiDraggable` and `EuiDroppable` ([#1943](https://github.com/elastic/eui/pull/1943)) - Added type definitions to `EuiSuperSelect` ([#1907](https://github.com/elastic/eui/pull/1907)) - Updated `EuiIcon` to use Slack's updated branding ([#1954](https://github.com/elastic/eui/pull/1954)) +- Updated `compile-icons` script to format icon components with Prettier ([#1955](https://github.com/elastic/eui/pull/1955)) ## [`11.1.0`](https://github.com/elastic/eui/tree/v11.1.0) diff --git a/package.json b/package.json index 1249496dae0..1d5d2b2aeec 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "sync-docs": "node ./scripts/docs-sync.js", "build-docs": "NODE_ENV=production webpack --config=src-docs/webpack.config.js", "build": "yarn extract-i18n-strings && node ./scripts/compile-clean.js && node ./scripts/compile-eui.js && node ./scripts/compile-scss.js $npm_package_name", - "compile-icons": "node ./scripts/compile-icons.js", + "compile-icons": "node ./scripts/compile-icons.js && prettier --write --loglevel=warn \"./src/components/icon/assets/**/*.js\"", "extract-i18n-strings": "node ./scripts/babel/fetch-i18n-strings", "lint": "yarn lint-es && yarn lint-ts && yarn lint-sass && yarn lint-framer", "lint-fix": "yarn lint-es-fix && yarn lint-ts-fix", diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 3fb86287e06..a34ffd9edf3 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -4541,23 +4541,20 @@ exports[`EuiIcon props type logoSlack is rendered 1`] = ` fill="none" > @@ -5346,25 +5343,13 @@ exports[`EuiIcon props type securityAnalyticsApp is rendered 1`] = ` width="32" xmlns="http://www.w3.org/2000/svg" > - - - - - - + + `; diff --git a/src/components/icon/assets/app_security_analytics.js b/src/components/icon/assets/app_security_analytics.js index 62e13895cd9..efbabdd8345 100644 --- a/src/components/icon/assets/app_security_analytics.js +++ b/src/components/icon/assets/app_security_analytics.js @@ -2,26 +2,16 @@ import React from 'react'; const EuiIconAppSecurityAnalytics = props => ( - - - - - - + + ); diff --git a/src/components/icon/assets/logo_slack.js b/src/components/icon/assets/logo_slack.js index 082b8a6f1a5..3eb2025b790 100644 --- a/src/components/icon/assets/logo_slack.js +++ b/src/components/icon/assets/logo_slack.js @@ -2,30 +2,27 @@ import React from 'react'; const EuiIconLogoSlack = props => (