From 13e91335158bebbe176cdd4bc9374fff2b4ce58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 3 Jan 2025 12:11:55 +0000 Subject: [PATCH] Fix CS --- .../src/components/global-styles/filters-panel.js | 4 +++- .../block-library/src/audio/test/transforms.native.js | 3 ++- .../block-library/src/cover/test/transforms.native.js | 8 ++++++-- .../block-library/src/file/test/transforms.native.js | 3 ++- .../block-library/src/gallery/test/transforms.native.js | 3 ++- packages/block-library/src/image/block.json | 9 ++++++++- .../block-library/src/image/test/transforms.native.js | 3 ++- .../src/media-text/test/transforms.native.js | 8 ++++++-- packages/block-library/src/post-content/block.json | 2 +- .../block-library/src/video/test/transforms.native.js | 3 ++- packages/components/src/modal/test/index.tsx | 3 ++- test/e2e/specs/editor/various/datepicker.spec.js | 3 ++- 12 files changed, 38 insertions(+), 14 deletions(-) diff --git a/packages/block-editor/src/components/global-styles/filters-panel.js b/packages/block-editor/src/components/global-styles/filters-panel.js index 20b83ea8e58323..64322d0fd5d5c9 100644 --- a/packages/block-editor/src/components/global-styles/filters-panel.js +++ b/packages/block-editor/src/components/global-styles/filters-panel.js @@ -147,7 +147,9 @@ export default function FiltersPanel( { const duotoneValue = duotonePreset ? `var:preset|duotone|${ duotonePreset.slug }` : newValue; - onChange( setImmutably( value, [ 'filter', 'duotone' ], duotoneValue ) ); + onChange( + setImmutably( value, [ 'filter', 'duotone' ], duotoneValue ) + ); }; const hasDuotone = () => !! value?.filter?.duotone; const resetDuotone = () => setDuotone( undefined ); diff --git a/packages/block-library/src/audio/test/transforms.native.js b/packages/block-library/src/audio/test/transforms.native.js index a36e7dfd28255d..cf7b612fcecccb 100644 --- a/packages/block-library/src/audio/test/transforms.native.js +++ b/packages/block-library/src/audio/test/transforms.native.js @@ -25,7 +25,8 @@ describe( `${ block } block transformations`, () => { const screen = await initializeEditor( { initialHtml } ); const newBlock = await transformBlock( screen, block, blockTransform, { isMediaBlock: false, - hasInnerBlocks: transformsWithInnerBlocks.includes( blockTransform ), + hasInnerBlocks: + transformsWithInnerBlocks.includes( blockTransform ), } ); expect( newBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/block-library/src/cover/test/transforms.native.js b/packages/block-library/src/cover/test/transforms.native.js index 6a47ffe32ac4f0..5a664d51f78ba8 100644 --- a/packages/block-library/src/cover/test/transforms.native.js +++ b/packages/block-library/src/cover/test/transforms.native.js @@ -52,7 +52,9 @@ describe( `${ block } block transformations`, () => { { isMediaBlock: true, hasInnerBlocks: - transformsWithInnerBlocks.includes( blockTransform ), + transformsWithInnerBlocks.includes( + blockTransform + ), } ); expect( newBlock ).toBeVisible(); @@ -88,7 +90,9 @@ describe( `${ block } block transformations`, () => { { isMediaBlock: true, hasInnerBlocks: - transformsWithInnerBlocks.includes( blockTransform ), + transformsWithInnerBlocks.includes( + blockTransform + ), } ); expect( newBlock ).toBeVisible(); diff --git a/packages/block-library/src/file/test/transforms.native.js b/packages/block-library/src/file/test/transforms.native.js index 2f57eddf162999..7535086e69e959 100644 --- a/packages/block-library/src/file/test/transforms.native.js +++ b/packages/block-library/src/file/test/transforms.native.js @@ -25,7 +25,8 @@ describe( `${ block } block transformations`, () => { const screen = await initializeEditor( { initialHtml } ); const newBlock = await transformBlock( screen, block, blockTransform, { isMediaBlock: false, - hasInnerBlocks: transformsWithInnerBlocks.includes( blockTransform ), + hasInnerBlocks: + transformsWithInnerBlocks.includes( blockTransform ), } ); expect( newBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/block-library/src/gallery/test/transforms.native.js b/packages/block-library/src/gallery/test/transforms.native.js index be64302f9b8b0a..c76a1dcc0a2441 100644 --- a/packages/block-library/src/gallery/test/transforms.native.js +++ b/packages/block-library/src/gallery/test/transforms.native.js @@ -35,7 +35,8 @@ describe( `${ block } block transformations`, () => { const screen = await initializeEditor( { initialHtml } ); const newBlock = await transformBlock( screen, block, blockTransform, { isMediaBlock: true, - hasInnerBlocks: transformsWithInnerBlocks.includes( blockTransform ), + hasInnerBlocks: + transformsWithInnerBlocks.includes( blockTransform ), } ); expect( newBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/block-library/src/image/block.json b/packages/block-library/src/image/block.json index 16e31217476026..26835df9e856cd 100644 --- a/packages/block-library/src/image/block.json +++ b/packages/block-library/src/image/block.json @@ -4,7 +4,14 @@ "name": "core/image", "title": "Image", "category": "media", - "usesContext": [ "allowResize", "imageCrop", "fixedHeight", "postId", "postType", "queryId" ], + "usesContext": [ + "allowResize", + "imageCrop", + "fixedHeight", + "postId", + "postType", + "queryId" + ], "description": "Insert an image to make a visual statement.", "keywords": [ "img", "photo", "picture" ], "textdomain": "default", diff --git a/packages/block-library/src/image/test/transforms.native.js b/packages/block-library/src/image/test/transforms.native.js index 4b0f2153f67f4d..f32a06cb70cdd5 100644 --- a/packages/block-library/src/image/test/transforms.native.js +++ b/packages/block-library/src/image/test/transforms.native.js @@ -31,7 +31,8 @@ describe( `${ block } block transformations`, () => { const screen = await initializeEditor( { initialHtml } ); const newBlock = await transformBlock( screen, block, blockTransform, { isMediaBlock: ! nonMediaTransforms.includes( blockTransform ), - hasInnerBlocks: transformsWithInnerBlocks.includes( blockTransform ), + hasInnerBlocks: + transformsWithInnerBlocks.includes( blockTransform ), } ); expect( newBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/block-library/src/media-text/test/transforms.native.js b/packages/block-library/src/media-text/test/transforms.native.js index eaa86579b1098b..581aad8de32d4d 100644 --- a/packages/block-library/src/media-text/test/transforms.native.js +++ b/packages/block-library/src/media-text/test/transforms.native.js @@ -52,7 +52,9 @@ describe( `${ block } block transformations`, () => { { isMediaBlock: true, hasInnerBlocks: - transformsWithInnerBlocks.includes( blockTransform ), + transformsWithInnerBlocks.includes( + blockTransform + ), } ); expect( newBlock ).toBeVisible(); @@ -88,7 +90,9 @@ describe( `${ block } block transformations`, () => { { isMediaBlock: true, hasInnerBlocks: - transformsWithInnerBlocks.includes( blockTransform ), + transformsWithInnerBlocks.includes( + blockTransform + ), } ); expect( newBlock ).toBeVisible(); diff --git a/packages/block-library/src/post-content/block.json b/packages/block-library/src/post-content/block.json index ed9c47154b2f8e..e5d455b97a8a3d 100644 --- a/packages/block-library/src/post-content/block.json +++ b/packages/block-library/src/post-content/block.json @@ -69,4 +69,4 @@ }, "style": "wp-block-post-content", "editorStyle": "wp-block-post-content-editor" -} \ No newline at end of file +} diff --git a/packages/block-library/src/video/test/transforms.native.js b/packages/block-library/src/video/test/transforms.native.js index d873be67a75ecd..94caa24950c346 100644 --- a/packages/block-library/src/video/test/transforms.native.js +++ b/packages/block-library/src/video/test/transforms.native.js @@ -31,7 +31,8 @@ describe( `${ block } block transforms`, () => { const screen = await initializeEditor( { initialHtml } ); const newBlock = await transformBlock( screen, block, blockTransform, { isMediaBlock: ! nonMediaTransforms.includes( blockTransform ), - hasInnerBlocks: transformsWithInnerBlocks.includes( blockTransform ), + hasInnerBlocks: + transformsWithInnerBlocks.includes( blockTransform ), } ); expect( newBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/components/src/modal/test/index.tsx b/packages/components/src/modal/test/index.tsx index 79ac68c1f1b61f..b53e12b450a171 100644 --- a/packages/components/src/modal/test/index.tsx +++ b/packages/components/src/modal/test/index.tsx @@ -398,7 +398,8 @@ describe( 'Modal', () => { const [ isAShown, setIsAShown ] = useState( false ); const [ isA1Shown, setIsA1Shown ] = useState( false ); const [ isBShown, setIsBShown ] = useState( false ); - const [ isClassOverridden, setIsClassOverridden ] = useState( false ); + const [ isClassOverridden, setIsClassOverridden ] = + useState( false ); useEffect( () => { const toggles: ( e: KeyboardEvent ) => void = ( { key, diff --git a/test/e2e/specs/editor/various/datepicker.spec.js b/test/e2e/specs/editor/various/datepicker.spec.js index e50f08b9b2b1e9..f6337016c18ed1 100644 --- a/test/e2e/specs/editor/various/datepicker.spec.js +++ b/test/e2e/specs/editor/various/datepicker.spec.js @@ -16,7 +16,8 @@ TIMEZONES.forEach( ( timezone ) => { test.describe( `Datepicker: ${ timezone }`, () => { let originalTimezone; test.beforeAll( async ( { requestUtils } ) => { - originalTimezone = ( await requestUtils.getSiteSettings() ).timezone; + originalTimezone = ( await requestUtils.getSiteSettings() ) + .timezone; await requestUtils.updateSiteSettings( { timezone } ); } );