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

Commit 7a66df5

Browse files
authored
Update dependencies order (#1146)
* Update dependencies order * Create eslint WooCommerce plugin with dependency group rule * Update WCPackageLocality definition so it only includes External and Internal * Rename WPPackageLocality to WCPackageLocality * Delete old typedef
1 parent b1d0715 commit 7a66df5

File tree

98 files changed

+399
-182
lines changed

Some content is hidden

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

98 files changed

+399
-182
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ module.exports = {
66
globals: {
77
wcSettings: true,
88
},
9-
plugins: [ 'jest' ],
9+
plugins: [ 'jest', 'woocommerce' ],
1010
rules: {
1111
'@wordpress/dependency-group': 'off',
12+
'woocommerce/dependency-group': 'error',
1213
'valid-jsdoc': 'off',
1314
yoda: [ 'error', 'never' ],
1415
},

assets/js/atomic/blocks/product/button/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import { __ } from '@wordpress/i18n';
55
import { registerBlockType } from '@wordpress/blocks';
66
import { Disabled } from '@wordpress/components';
77
import Gridicon from 'gridicons';
8+
import { ProductButton } from '@woocommerce/atomic-components/product';
89

910
/**
1011
* Internal dependencies
1112
*/
12-
import { ProductButton } from '@woocommerce/atomic-components/product';
1313
import sharedConfig from '../shared-config';
1414

1515
const blockConfig = {

assets/js/atomic/blocks/product/image/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import Gridicon from 'gridicons';
77
import { Fragment } from '@wordpress/element';
88
import { Disabled, PanelBody, ToggleControl } from '@wordpress/components';
99
import { InspectorControls } from '@wordpress/editor';
10+
import ToggleButtonControl from '@woocommerce/block-components/toggle-button-control';
11+
import { ProductImage } from '@woocommerce/atomic-components/product';
12+
import { previewProducts } from '@woocommerce/resource-previews';
1013

1114
/**
1215
* Internal dependencies
1316
*/
14-
import ToggleButtonControl from '@woocommerce/block-components/toggle-button-control';
15-
import { ProductImage } from '@woocommerce/atomic-components/product';
1617
import sharedConfig from '../shared-config';
17-
import { previewProducts } from '@woocommerce/resource-previews';
1818

1919
const blockConfig = {
2020
title: __( 'Product Image', 'woo-gutenberg-products-block' ),

assets/js/atomic/blocks/product/price/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import { __ } from '@wordpress/i18n';
55
import { registerBlockType } from '@wordpress/blocks';
66
import Gridicon from 'gridicons';
7+
import { ProductPrice } from '@woocommerce/atomic-components/product';
78

89
/**
910
* Internal dependencies
1011
*/
11-
import { ProductPrice } from '@woocommerce/atomic-components/product';
1212
import sharedConfig from '../shared-config';
1313

1414
const blockConfig = {

assets/js/atomic/blocks/product/rating/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import { __ } from '@wordpress/i18n';
55
import { registerBlockType } from '@wordpress/blocks';
66
import Gridicon from 'gridicons';
7+
import { ProductRating } from '@woocommerce/atomic-components/product';
78

89
/**
910
* Internal dependencies
1011
*/
11-
import { ProductRating } from '@woocommerce/atomic-components/product';
1212
import sharedConfig from '../shared-config';
1313

1414
const blockConfig = {

assets/js/atomic/blocks/product/sale-badge/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
*/
44
import { __ } from '@wordpress/i18n';
55
import { registerBlockType } from '@wordpress/blocks';
6+
import { ProductSaleBadge } from '@woocommerce/atomic-components/product';
7+
import { IconProductOnSale } from '@woocommerce/block-components/icons';
68

79
/**
810
* Internal dependencies
911
*/
10-
import { ProductSaleBadge } from '@woocommerce/atomic-components/product';
1112
import sharedConfig from '../shared-config';
12-
import { IconProductOnSale } from '@woocommerce/block-components/icons';
1313

1414
const blockConfig = {
1515
title: __( 'On-Sale Badge', 'woo-gutenberg-products-block' ),

assets/js/atomic/blocks/product/shared-config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
*/
44
import { __ } from '@wordpress/i18n';
55
import Gridicon from 'gridicons';
6-
7-
/**
8-
* Internal dependencies
9-
*/
106
import { previewProducts } from '@woocommerce/resource-previews';
117

128
/**

assets/js/atomic/blocks/product/summary/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import { __ } from '@wordpress/i18n';
55
import { registerBlockType } from '@wordpress/blocks';
66
import Gridicon from 'gridicons';
7+
import { ProductSummary } from '@woocommerce/atomic-components/product';
78

89
/**
910
* Internal dependencies
1011
*/
11-
import { ProductSummary } from '@woocommerce/atomic-components/product';
1212
import sharedConfig from '../shared-config';
1313

1414
const blockConfig = {

assets/js/atomic/blocks/product/title/heading-level-icon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* WordPress dependencies
2+
* External dependencies
33
*/
44
import { Path, SVG } from '@wordpress/components';
55

assets/js/atomic/blocks/product/title/heading-toolbar.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
* External dependencies
33
*/
44
import { range } from 'lodash';
5-
6-
/**
7-
* WordPress dependencies
8-
*/
95
import { __, sprintf } from '@wordpress/i18n';
106
import { Component } from '@wordpress/element';
117
import { Toolbar } from '@wordpress/components';

0 commit comments

Comments
 (0)