From 2d63b15cf63b672c9017f9546169ce351761f3ed Mon Sep 17 00:00:00 2001 From: chad1008 <13856531+chad1008@users.noreply.github.com> Date: Tue, 8 Nov 2022 19:33:18 -0500 Subject: [PATCH] Components: refactor `useFlex` to pass `exhaustive-deps` (#45528) --- packages/components/CHANGELOG.md | 1 + packages/components/src/flex/flex/hook.ts | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 5bb9a27bc6ab68..03b93178faca46 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -13,6 +13,7 @@ ### Internal - `PaletteEditListView`: Update to ignore `exhaustive-deps` eslint rule ([#45467](https://github.com/WordPress/gutenberg/pull/45467)). +- `Flex`: Update to pass `exhaustive-deps` eslint rule ([#45528](https://github.com/WordPress/gutenberg/pull/45528)). - `withNotices`: Update to pass `exhaustive-deps` eslint rule ([#45530](https://github.com/WordPress/gutenberg/pull/45530)). - `ItemGroup`: Update to pass `exhaustive-deps` eslint rule ([#45531](https://github.com/WordPress/gutenberg/pull/45531)). diff --git a/packages/components/src/flex/flex/hook.ts b/packages/components/src/flex/flex/hook.ts index 3694ac171a4e3a..2708043f284143 100644 --- a/packages/components/src/flex/flex/hook.ts +++ b/packages/components/src/flex/flex/hook.ts @@ -57,8 +57,6 @@ export function useFlex( props: WordPressComponentProps< FlexProps, 'div' > ) { const isColumn = typeof direction === 'string' && !! direction.includes( 'column' ); - const isReverse = - typeof direction === 'string' && direction.includes( 'reverse' ); const cx = useCx(); @@ -87,7 +85,6 @@ export function useFlex( props: WordPressComponentProps< FlexProps, 'div' > ) { expanded, gap, isColumn, - isReverse, justify, wrap, ] );