Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit df63d2a

Browse files
authored
Upgrade wp-prettier to 2.6.2 and reformat the codebase (#6566)
* Remove mixed tabs and spaces in tsconfig.json * Update formatting in json files * Upgrade wp-prettier to 2.6.2
1 parent 72b0a0a commit df63d2a

File tree

167 files changed

+3283
-3616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+3283
-3616
lines changed

.markdownlint.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
{
42
"default": true,
53
"MD003": { "style": "atx" },
@@ -9,7 +7,7 @@
97
"MD025": false,
108
"MD029": false,
119
"MD033": false,
12-
"MD046": {"style": "fenced"},
10+
"MD046": { "style": "fenced" },
1311
"no-hard-tabs": false,
1412
"whitespace": false
1513
}

assets/js/atomic/blocks/product-elements/add-to-cart/block.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ const Block = ( { className, showFormElements } ) => {
3737
className,
3838
'wc-block-components-product-add-to-cart',
3939
{
40-
'wc-block-components-product-add-to-cart--placeholder': isEmpty(
41-
product
42-
),
40+
'wc-block-components-product-add-to-cart--placeholder':
41+
isEmpty( product ),
4342
}
4443
);
4544

assets/js/atomic/blocks/product-elements/add-to-cart/product-types/variable/variation-attributes/attribute-select-control.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ const AttributeSelectControl = ( {
3232
'woo-gutenberg-products-block'
3333
),
3434
} ) => {
35-
const {
36-
getValidationError,
37-
setValidationErrors,
38-
clearValidationError,
39-
} = useValidationContext();
35+
const { getValidationError, setValidationErrors, clearValidationError } =
36+
useValidationContext();
4037
const errorId = attributeName;
4138
const error = getValidationError( errorId ) || {};
4239

@@ -60,10 +57,10 @@ const AttributeSelectControl = ( {
6057
] );
6158

6259
// Remove validation errors when unmounted.
63-
useEffect( () => () => void clearValidationError( errorId ), [
64-
errorId,
65-
clearValidationError,
66-
] );
60+
useEffect(
61+
() => () => void clearValidationError( errorId ),
62+
[ errorId, clearValidationError ]
63+
);
6764

6865
return (
6966
<div className="wc-block-components-product-add-to-cart-attribute-picker__container">

assets/js/atomic/blocks/product-elements/add-to-cart/shared/add-to-cart-button.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ const AddToCartButton = () => {
4545
}
4646
return true;
4747
};
48-
const unsubscribeProcessing = eventRegistration.onAddToCartAfterProcessingWithSuccess(
49-
onSuccess,
50-
0
51-
);
48+
const unsubscribeProcessing =
49+
eventRegistration.onAddToCartAfterProcessingWithSuccess(
50+
onSuccess,
51+
0
52+
);
5253
return () => {
5354
unsubscribeProcessing();
5455
};

assets/js/atomic/blocks/product-elements/button/block.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ const Block = ( props ) => {
5252
'wp-block-button',
5353
'wc-block-components-product-button',
5454
{
55-
[ `${ parentClassName }__product-add-to-cart` ]: parentClassName,
55+
[ `${ parentClassName }__product-add-to-cart` ]:
56+
parentClassName,
5657
}
5758
) }
5859
>

assets/js/atomic/blocks/product-elements/category-list/block.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ const Block = ( props: Props ): JSX.Element | null => {
4949
'wc-block-components-product-category-list',
5050
colorProps.className,
5151
{
52-
[ `${ parentClassName }__product-category-list` ]: parentClassName,
52+
[ `${ parentClassName }__product-category-list` ]:
53+
parentClassName,
5354
}
5455
) }
5556
style={ { ...colorProps.style, ...typographyProps.style } }

assets/js/atomic/blocks/product-elements/image/block.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export const Block = ( props ) => {
6060
className,
6161
'wc-block-components-product-image',
6262
{
63-
[ `${ parentClassName }__product-image` ]: parentClassName,
63+
[ `${ parentClassName }__product-image` ]:
64+
parentClassName,
6465
},
6566
borderProps.className
6667
) }

assets/js/atomic/blocks/product-elements/image/edit.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ import withProductSelector from '../shared/with-product-selector';
2323
import { BLOCK_TITLE, BLOCK_ICON } from './constants';
2424

2525
const Edit = ( { attributes, setAttributes } ) => {
26-
const {
27-
showProductLink,
28-
imageSizing,
29-
showSaleBadge,
30-
saleBadgeAlign,
31-
} = attributes;
26+
const { showProductLink, imageSizing, showSaleBadge, saleBadgeAlign } =
27+
attributes;
3228

3329
const blockProps = useBlockProps();
3430

assets/js/atomic/blocks/product-elements/image/test/block.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ const productWithImages = {
4646
id: 56,
4747
src: 'logo-1.jpg',
4848
thumbnail: 'logo-1-324x324.jpg',
49-
srcset:
50-
'logo-1.jpg 800w, logo-1-300x300.jpg 300w, logo-1-150x150.jpg 150w, logo-1-768x767.jpg 768w, logo-1-324x324.jpg 324w, logo-1-416x415.jpg 416w, logo-1-100x100.jpg 100w',
49+
srcset: 'logo-1.jpg 800w, logo-1-300x300.jpg 300w, logo-1-150x150.jpg 150w, logo-1-768x767.jpg 768w, logo-1-324x324.jpg 324w, logo-1-416x415.jpg 416w, logo-1-100x100.jpg 100w',
5150
sizes: '(max-width: 800px) 100vw, 800px',
5251
name: 'logo-1.jpg',
5352
alt: '',
@@ -56,8 +55,7 @@ const productWithImages = {
5655
id: 55,
5756
src: 'beanie-with-logo-1.jpg',
5857
thumbnail: 'beanie-with-logo-1-324x324.jpg',
59-
srcset:
60-
'beanie-with-logo-1.jpg 800w, beanie-with-logo-1-300x300.jpg 300w, beanie-with-logo-1-150x150.jpg 150w, beanie-with-logo-1-768x768.jpg 768w, beanie-with-logo-1-324x324.jpg 324w, beanie-with-logo-1-416x416.jpg 416w, beanie-with-logo-1-100x100.jpg 100w',
58+
srcset: 'beanie-with-logo-1.jpg 800w, beanie-with-logo-1-300x300.jpg 300w, beanie-with-logo-1-150x150.jpg 150w, beanie-with-logo-1-768x768.jpg 768w, beanie-with-logo-1-324x324.jpg 324w, beanie-with-logo-1-416x416.jpg 416w, beanie-with-logo-1-100x100.jpg 100w',
6159
sizes: '(max-width: 800px) 100vw, 800px',
6260
name: 'beanie-with-logo-1.jpg',
6361
alt: '',

assets/js/atomic/blocks/product-elements/price/block.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ const Block = ( props ) => {
7979
// This is the regular or original price when the `price` value is a sale price.
8080
regularPrice={ prices.regular_price }
8181
regularPriceClassName={ classnames( {
82-
[ `${ parentClassName }__product-price__regular` ]: parentClassName,
82+
[ `${ parentClassName }__product-price__regular` ]:
83+
parentClassName,
8384
} ) }
8485
/>
8586
);

0 commit comments

Comments
 (0)