diff --git a/plugins/woocommerce-admin/.eslintrc.js b/plugins/woocommerce-admin/.eslintrc.js
index e68bd30da27..e0d84dbf603 100644
--- a/plugins/woocommerce-admin/.eslintrc.js
+++ b/plugins/woocommerce-admin/.eslintrc.js
@@ -15,7 +15,6 @@ module.exports = {
'jsdoc/require-property-name': 'warn',
'jsdoc/check-property-names': 'warn',
'jsdoc/require-property-type': 'warn',
- '@woocommerce/dependency-group': 'warn',
'jsdoc/valid-types': 'warn',
'jsdoc/check-tag-names': 'warn',
},
diff --git a/plugins/woocommerce-admin/bin/packages/get-babel-config.js b/plugins/woocommerce-admin/bin/packages/get-babel-config.js
index 18ac49dd906..8c9491546fc 100644
--- a/plugins/woocommerce-admin/bin/packages/get-babel-config.js
+++ b/plugins/woocommerce-admin/bin/packages/get-babel-config.js
@@ -5,7 +5,7 @@ const { get, map } = require( 'lodash' );
const babel = require( '@babel/core' );
/**
- * WordPress dependencies
+ * External dependencies
*/
const { options: babelDefaultConfig } = babel.loadPartialConfig( {
configFile: '@wordpress/babel-preset-default',
@@ -14,47 +14,32 @@ const plugins = babelDefaultConfig.plugins;
const overrideOptions = ( target, targetName, options ) => {
if ( get( target, [ 'file', 'request' ] ) === targetName ) {
- return [ targetName, Object.assign(
- {},
- target.options,
- options
- ) ];
+ return [ targetName, Object.assign( {}, target.options, options ) ];
}
return target;
};
const babelConfigs = {
- main: Object.assign(
- {},
- babelDefaultConfig,
- {
- plugins,
- presets: map(
- babelDefaultConfig.presets,
- ( preset ) => overrideOptions( preset, '@babel/preset-env', {
- modules: 'commonjs',
- } )
- ),
- }
- ),
- module: Object.assign(
- {},
- babelDefaultConfig,
- {
- plugins: map(
- plugins,
- ( plugin ) => overrideOptions( plugin, '@babel/plugin-transform-runtime', {
- useESModules: true,
- } )
- ),
- presets: map(
- babelDefaultConfig.presets,
- ( preset ) => overrideOptions( preset, '@babel/preset-env', {
- modules: false,
- } )
- ),
- }
- ),
+ main: Object.assign( {}, babelDefaultConfig, {
+ plugins,
+ presets: map( babelDefaultConfig.presets, ( preset ) =>
+ overrideOptions( preset, '@babel/preset-env', {
+ modules: 'commonjs',
+ } )
+ ),
+ } ),
+ module: Object.assign( {}, babelDefaultConfig, {
+ plugins: map( plugins, ( plugin ) =>
+ overrideOptions( plugin, '@babel/plugin-transform-runtime', {
+ useESModules: true,
+ } )
+ ),
+ presets: map( babelDefaultConfig.presets, ( preset ) =>
+ overrideOptions( preset, '@babel/preset-env', {
+ modules: false,
+ } )
+ ),
+ } ),
};
function getBabelConfig( environment ) {
diff --git a/plugins/woocommerce-admin/client/analytics/components/leaderboard/index.js b/plugins/woocommerce-admin/client/analytics/components/leaderboard/index.js
index 5cb0587471d..405e426c5dd 100644
--- a/plugins/woocommerce-admin/client/analytics/components/leaderboard/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/leaderboard/index.js
@@ -5,10 +5,6 @@ import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Card, EmptyTable, TableCard } from '@woocommerce/components';
import { getPersistedQuery } from '@woocommerce/navigation';
import { SETTINGS_STORE_NAME } from '@woocommerce/data';
@@ -16,11 +12,11 @@ import { SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { getLeaderboard } from 'wc-api/items/utils';
-import ReportError from 'analytics/components/report-error';
-import sanitizeHTML from 'lib/sanitize-html';
-import withSelect from 'wc-api/with-select';
-import { getFilterQuery } from 'wc-api/reports/utils';
+import { getLeaderboard } from '../../../wc-api/items/utils';
+import ReportError from '../report-error';
+import sanitizeHTML from '../../../lib/sanitize-html';
+import withSelect from '../../../wc-api/with-select';
+import { getFilterQuery } from '../../../wc-api/reports/utils';
import './style.scss';
export class Leaderboard extends Component {
diff --git a/plugins/woocommerce-admin/client/analytics/components/leaderboard/test/index.js b/plugins/woocommerce-admin/client/analytics/components/leaderboard/test/index.js
index ee0983945b0..7e4cfa65a2e 100644
--- a/plugins/woocommerce-admin/client/analytics/components/leaderboard/test/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/leaderboard/test/index.js
@@ -2,19 +2,15 @@
* External dependencies
*/
import { mount, shallow } from 'enzyme';
-
-/**
- * WooCommerce dependencies
- */
import { numberFormat } from '@woocommerce/number';
import CurrencyFactory from '@woocommerce/currency';
+import { CURRENCY } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
import { Leaderboard } from '../';
import mockData from '../data/top-selling-products-mock-data';
-import { CURRENCY } from '@woocommerce/wc-admin-settings';
const { formatAmount, formatDecimal } = CurrencyFactory( CURRENCY );
diff --git a/plugins/woocommerce-admin/client/analytics/components/report-chart/index.js b/plugins/woocommerce-admin/client/analytics/components/report-chart/index.js
index eef24109ffd..0b056559f08 100644
--- a/plugins/woocommerce-admin/client/analytics/components/report-chart/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/report-chart/index.js
@@ -7,9 +7,11 @@ import { compose } from '@wordpress/compose';
import { format as formatDate } from '@wordpress/date';
import { get, isEqual } from 'lodash';
import PropTypes from 'prop-types';
+import { Chart } from '@woocommerce/components';
+import { SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
- * WooCommerce dependencies
+ * Internal dependencies
*/
import {
getAllowedIntervalsForQuery,
@@ -18,20 +20,14 @@ import {
getIntervalForQuery,
getChartTypeForQuery,
getPreviousDate,
-} from 'lib/date';
-import { Chart } from '@woocommerce/components';
-import { SETTINGS_STORE_NAME } from '@woocommerce/data';
-import { CurrencyContext } from 'lib/currency-context';
-
-/**
- * Internal dependencies
- */
+} from '../../../lib/date';
+import { CurrencyContext } from '../../../lib/currency-context';
import {
getReportChartData,
getTooltipValueFormat,
-} from 'wc-api/reports/utils';
-import ReportError from 'analytics/components/report-error';
-import withSelect from 'wc-api/with-select';
+} from '../../../wc-api/reports/utils';
+import ReportError from '../report-error';
+import withSelect from '../../../wc-api/with-select';
import { getChartMode, getSelectedFilter } from './utils';
/**
diff --git a/plugins/woocommerce-admin/client/analytics/components/report-chart/utils.js b/plugins/woocommerce-admin/client/analytics/components/report-chart/utils.js
index 0a682ae2d7a..e56f224684d 100644
--- a/plugins/woocommerce-admin/client/analytics/components/report-chart/utils.js
+++ b/plugins/woocommerce-admin/client/analytics/components/report-chart/utils.js
@@ -2,10 +2,6 @@
* External dependencies
*/
import { find, get } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { flattenFilters } from '@woocommerce/navigation';
export const DEFAULT_FILTER = 'all';
diff --git a/plugins/woocommerce-admin/client/analytics/components/report-error/index.js b/plugins/woocommerce-admin/client/analytics/components/report-error/index.js
index a5fababe821..9e19af86e29 100644
--- a/plugins/woocommerce-admin/client/analytics/components/report-error/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/report-error/index.js
@@ -4,10 +4,6 @@
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { EmptyContent } from '@woocommerce/components';
import { getAdminLink } from '@woocommerce/wc-admin-settings';
diff --git a/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js b/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js
index 63de99b3ee1..ca6e650dfc8 100644
--- a/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/report-filters/index.js
@@ -5,10 +5,6 @@ import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
import { omitBy, isUndefined, snakeCase } from 'lodash';
import { withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { ReportFilters as Filters } from '@woocommerce/components';
import { LOCALE } from '@woocommerce/wc-admin-settings';
import { SETTINGS_STORE_NAME } from '@woocommerce/data';
@@ -16,13 +12,13 @@ import { SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
import {
getCurrentDates,
getDateParamsFromQuery,
isoDateFormat,
-} from 'lib/date';
-import { CurrencyContext } from 'lib/currency-context';
+} from '../../../lib/date';
+import { CurrencyContext } from '../../../lib/currency-context';
class ReportFilters extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/components/report-summary/index.js b/plugins/woocommerce-admin/client/analytics/components/report-summary/index.js
index 2389819399e..18941c50af1 100644
--- a/plugins/woocommerce-admin/client/analytics/components/report-summary/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/report-summary/index.js
@@ -5,11 +5,6 @@ import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
-import { getDateParamsFromQuery } from 'lib/date';
import { getNewPath } from '@woocommerce/navigation';
import {
SummaryList,
@@ -22,11 +17,12 @@ import { SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { getSummaryNumbers } from 'wc-api/reports/utils';
-import ReportError from 'analytics/components/report-error';
-import withSelect from 'wc-api/with-select';
-import { recordEvent } from 'lib/tracks';
-import { CurrencyContext } from 'lib/currency-context';
+import { getDateParamsFromQuery } from '../../../lib/date';
+import { getSummaryNumbers } from '../../../wc-api/reports/utils';
+import ReportError from '../report-error';
+import withSelect from '../../../wc-api/with-select';
+import { recordEvent } from '../../../lib/tracks';
+import { CurrencyContext } from '../../../lib/currency-context';
/**
* Component to render summary numbers in reports.
diff --git a/plugins/woocommerce-admin/client/analytics/components/report-table/index.js b/plugins/woocommerce-admin/client/analytics/components/report-table/index.js
index ca229181296..4234c22b1fd 100644
--- a/plugins/woocommerce-admin/client/analytics/components/report-table/index.js
+++ b/plugins/woocommerce-admin/client/analytics/components/report-table/index.js
@@ -11,12 +11,7 @@ import { get, noop, partial, uniq } from 'lodash';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { CompareButton, Search, TableCard } from '@woocommerce/components';
-import DownloadIcon from './download-icon';
import {
getIdsFromQuery,
getSearchWords,
@@ -33,12 +28,16 @@ import { SETTINGS_STORE_NAME, useUserPreferences } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import ReportError from 'analytics/components/report-error';
-import { getReportChartData, getReportTableData } from 'wc-api/reports/utils';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import withSelect from 'wc-api/with-select';
+import DownloadIcon from './download-icon';
+import ReportError from '../report-error';
+import {
+ getReportChartData,
+ getReportTableData,
+} from '../../../wc-api/reports/utils';
+import { QUERY_DEFAULTS } from '../../../wc-api/constants';
+import withSelect from '../../../wc-api/with-select';
import { extendTableData } from './utils';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
import './style.scss';
const TABLE_FILTER = 'woocommerce_admin_report_table';
diff --git a/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js b/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js
index e4b907e44a5..07865d6a017 100644
--- a/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js
+++ b/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js
@@ -4,10 +4,6 @@
import { Component } from '@wordpress/element';
import { first, last } from 'lodash';
import { Spinner } from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
import { Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
diff --git a/plugins/woocommerce-admin/client/analytics/report/categories/config.js b/plugins/woocommerce-admin/client/analytics/report/categories/config.js
index 445db4e5e57..46632dfe95e 100644
--- a/plugins/woocommerce-admin/client/analytics/report/categories/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/categories/config.js
@@ -7,7 +7,7 @@ import { applyFilters } from '@wordpress/hooks';
/**
* Internal dependencies
*/
-import { getCategoryLabels } from 'lib/async-requests';
+import { getCategoryLabels } from '../../../lib/async-requests';
const CATEGORY_REPORT_CHARTS_FILTER =
'woocommerce_admin_categories_report_charts';
diff --git a/plugins/woocommerce-admin/client/analytics/report/categories/index.js b/plugins/woocommerce-admin/client/analytics/report/categories/index.js
index 688454ac55e..76e4d32c306 100644
--- a/plugins/woocommerce-admin/client/analytics/report/categories/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/categories/index.js
@@ -10,11 +10,11 @@ import { __ } from '@wordpress/i18n';
*/
import { advancedFilters, charts, filters } from './config';
import CategoriesReportTable from './table';
-import getSelectedChart from 'lib/get-selected-chart';
-import ReportChart from 'analytics/components/report-chart';
-import ReportSummary from 'analytics/components/report-summary';
+import getSelectedChart from '../../../lib/get-selected-chart';
+import ReportChart from '../../components/report-chart';
+import ReportSummary from '../../components/report-summary';
import ProductsReportTable from '../products/table';
-import ReportFilters from 'analytics/components/report-filters';
+import ReportFilters from '../../components/report-filters';
export default class CategoriesReport extends Component {
getChartMeta() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/categories/table.js b/plugins/woocommerce-admin/client/analytics/report/categories/table.js
index b4809c169ca..f4fa294b7bf 100644
--- a/plugins/woocommerce-admin/client/analytics/report/categories/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/categories/table.js
@@ -5,10 +5,6 @@ import { __, _n } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { map } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
import { Link } from '@woocommerce/components';
import { formatValue } from '@woocommerce/number';
@@ -17,9 +13,9 @@ import { formatValue } from '@woocommerce/number';
* Internal dependencies
*/
import CategoryBreacrumbs from './breadcrumbs';
-import ReportTable from 'analytics/components/report-table';
-import withSelect from 'wc-api/with-select';
-import { CurrencyContext } from 'lib/currency-context';
+import ReportTable from '../../components/report-table';
+import withSelect from '../../../wc-api/with-select';
+import { CurrencyContext } from '../../../lib/currency-context';
class CategoriesReportTable extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/analytics/report/coupons/config.js b/plugins/woocommerce-admin/client/analytics/report/coupons/config.js
index 43f56c14235..d81edb837e9 100644
--- a/plugins/woocommerce-admin/client/analytics/report/coupons/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/coupons/config.js
@@ -7,7 +7,7 @@ import { applyFilters } from '@wordpress/hooks';
/**
* Internal dependencies
*/
-import { getCouponLabels } from 'lib/async-requests';
+import { getCouponLabels } from '../../../lib/async-requests';
const COUPON_REPORT_CHARTS_FILTER = 'woocommerce_admin_coupons_report_charts';
const COUPON_REPORT_FILTERS_FILTER = 'woocommerce_admin_coupons_report_filters';
diff --git a/plugins/woocommerce-admin/client/analytics/report/coupons/index.js b/plugins/woocommerce-admin/client/analytics/report/coupons/index.js
index e7161c7f7b9..fc8ac891ee1 100644
--- a/plugins/woocommerce-admin/client/analytics/report/coupons/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/coupons/index.js
@@ -10,10 +10,10 @@ import { __ } from '@wordpress/i18n';
*/
import { advancedFilters, charts, filters } from './config';
import CouponsReportTable from './table';
-import getSelectedChart from 'lib/get-selected-chart';
-import ReportChart from 'analytics/components/report-chart';
-import ReportSummary from 'analytics/components/report-summary';
-import ReportFilters from 'analytics/components/report-filters';
+import getSelectedChart from '../../../lib/get-selected-chart';
+import ReportChart from '../../components/report-chart';
+import ReportSummary from '../../components/report-summary';
+import ReportFilters from '../../components/report-filters';
export default class CouponsReport extends Component {
getChartMeta() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/coupons/table.js b/plugins/woocommerce-admin/client/analytics/report/coupons/table.js
index 11862691fee..e0831a3279e 100644
--- a/plugins/woocommerce-admin/client/analytics/report/coupons/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/coupons/table.js
@@ -4,12 +4,7 @@
import { __, _n } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { map } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { Date, Link } from '@woocommerce/components';
-import { defaultTableDateFormat } from 'lib/date';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
import { formatValue } from '@woocommerce/number';
import { getSetting } from '@woocommerce/wc-admin-settings';
@@ -17,8 +12,9 @@ import { getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
-import { CurrencyContext } from 'lib/currency-context';
+import { defaultTableDateFormat } from '../../../lib/date';
+import ReportTable from '../../components/report-table';
+import { CurrencyContext } from '../../../lib/currency-context';
class CouponsReportTable extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/customers/config.js b/plugins/woocommerce-admin/client/analytics/report/customers/config.js
index b502148d52d..20997851433 100644
--- a/plugins/woocommerce-admin/client/analytics/report/customers/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/customers/config.js
@@ -11,8 +11,11 @@ const { countries } = getSetting( 'dataEndpoints', { countries: {} } );
/**
* Internal dependencies
*/
-import { getCustomerLabels, getRequestByIdString } from 'lib/async-requests';
-import { NAMESPACE } from 'wc-api/constants';
+import {
+ getCustomerLabels,
+ getRequestByIdString,
+} from '../../../lib/async-requests';
+import { NAMESPACE } from '../../../wc-api/constants';
const CUSTOMERS_REPORT_FILTERS_FILTER =
'woocommerce_admin_customers_report_filters';
diff --git a/plugins/woocommerce-admin/client/analytics/report/customers/index.js b/plugins/woocommerce-admin/client/analytics/report/customers/index.js
index d10072fbc9a..15312213b81 100644
--- a/plugins/woocommerce-admin/client/analytics/report/customers/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/customers/index.js
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
*/
import { filters, advancedFilters } from './config';
import CustomersReportTable from './table';
-import ReportFilters from 'analytics/components/report-filters';
+import ReportFilters from '../../components/report-filters';
export default class CustomersReport extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/customers/table.js b/plugins/woocommerce-admin/client/analytics/report/customers/table.js
index f6620f60ed2..78057fe6a1a 100644
--- a/plugins/woocommerce-admin/client/analytics/report/customers/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/customers/table.js
@@ -4,22 +4,18 @@
import { __, _n } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { Tooltip } from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
import { Date, Link } from '@woocommerce/components';
import { formatValue } from '@woocommerce/number';
import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
-import { defaultTableDateFormat } from 'lib/date';
const { countries } = getSetting( 'dataEndpoints', { countries: {} } );
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
-import { CurrencyContext } from 'lib/currency-context';
+import { defaultTableDateFormat } from '../../../lib/date';
+import ReportTable from '../../components/report-table';
+import { CurrencyContext } from '../../../lib/currency-context';
class CustomersReportTable extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/downloads/config.js b/plugins/woocommerce-admin/client/analytics/report/downloads/config.js
index de07d1dde8c..2c7de24b97d 100644
--- a/plugins/woocommerce-admin/client/analytics/report/downloads/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/downloads/config.js
@@ -7,7 +7,10 @@ import { applyFilters } from '@wordpress/hooks';
/**
* Internal dependencies
*/
-import { getCustomerLabels, getProductLabels } from 'lib/async-requests';
+import {
+ getCustomerLabels,
+ getProductLabels,
+} from '../../../lib/async-requests';
const DOWLOADS_REPORT_CHARTS_FILTER =
'woocommerce_admin_downloads_report_charts';
diff --git a/plugins/woocommerce-admin/client/analytics/report/downloads/index.js b/plugins/woocommerce-admin/client/analytics/report/downloads/index.js
index 0d12353ad55..e13be72f42d 100644
--- a/plugins/woocommerce-admin/client/analytics/report/downloads/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/downloads/index.js
@@ -9,10 +9,10 @@ import PropTypes from 'prop-types';
*/
import { charts, filters, advancedFilters } from './config';
import DownloadsReportTable from './table';
-import getSelectedChart from 'lib/get-selected-chart';
-import ReportChart from 'analytics/components/report-chart';
-import ReportSummary from 'analytics/components/report-summary';
-import ReportFilters from 'analytics/components/report-filters';
+import getSelectedChart from '../../../lib/get-selected-chart';
+import ReportChart from '../../components/report-chart';
+import ReportSummary from '../../components/report-summary';
+import ReportFilters from '../../components/report-filters';
export default class DownloadsReport extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/downloads/table.js b/plugins/woocommerce-admin/client/analytics/report/downloads/table.js
index 0a4793626eb..1c78d060fd5 100644
--- a/plugins/woocommerce-admin/client/analytics/report/downloads/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/downloads/table.js
@@ -6,11 +6,6 @@ import { Component } from '@wordpress/element';
import { withSelect } from '@wordpress/data';
import { map } from 'lodash';
import moment from 'moment';
-
-/**
- * WooCommerce dependencies
- */
-import { getCurrentDates, defaultTableDateFormat } from 'lib/date';
import { Date, Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
import { formatValue } from '@woocommerce/number';
@@ -20,8 +15,9 @@ import { SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
-import { CurrencyContext } from 'lib/currency-context';
+import { getCurrentDates, defaultTableDateFormat } from '../../../lib/date';
+import ReportTable from '../../components/report-table';
+import { CurrencyContext } from '../../../lib/currency-context';
class CouponsReportTable extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/get-reports.js b/plugins/woocommerce-admin/client/analytics/report/get-reports.js
index 514a12cd7e6..9649aa81b4d 100644
--- a/plugins/woocommerce-admin/client/analytics/report/get-reports.js
+++ b/plugins/woocommerce-admin/client/analytics/report/get-reports.js
@@ -6,9 +6,11 @@ import { applyFilters } from '@wordpress/hooks';
import { lazy } from '@wordpress/element';
/**
- * WooCommerce dependencies
+ * Internal dependencies
*/
import { getSetting } from '../../settings';
+import { REPORTS_FILTER } from './index';
+
const manageStock = getSetting( 'manageStock', 'no' );
/**
@@ -44,8 +46,6 @@ const CustomersReport = lazy( () =>
import( /* webpackChunkName: "analytics-report-customers" */ './customers' )
);
-import { REPORTS_FILTER } from './index';
-
export default () => {
const reports = [
{
diff --git a/plugins/woocommerce-admin/client/analytics/report/index.js b/plugins/woocommerce-admin/client/analytics/report/index.js
index 57ce87637c5..f83e67df788 100644
--- a/plugins/woocommerce-admin/client/analytics/report/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/index.js
@@ -5,10 +5,6 @@ import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
import { find } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { useFilters } from '@woocommerce/components';
import { getQuery, getSearchWords } from '@woocommerce/navigation';
@@ -16,13 +12,13 @@ import { getQuery, getSearchWords } from '@woocommerce/navigation';
* Internal dependencies
*/
import './style.scss';
-import ReportError from 'analytics/components/report-error';
-import { searchItemsByString } from 'wc-api/items/utils';
-import withSelect from 'wc-api/with-select';
+import ReportError from '../components/report-error';
+import { searchItemsByString } from '../../wc-api/items/utils';
+import withSelect from '../../wc-api/with-select';
import {
CurrencyContext,
getFilteredCurrencyInstance,
-} from 'lib/currency-context';
+} from '../../lib/currency-context';
import getReports from './get-reports';
export const REPORTS_FILTER = 'woocommerce_admin_reports_list';
diff --git a/plugins/woocommerce-admin/client/analytics/report/orders/config.js b/plugins/woocommerce-admin/client/analytics/report/orders/config.js
index 46b28cfc4a4..491f775422d 100644
--- a/plugins/woocommerce-admin/client/analytics/report/orders/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/orders/config.js
@@ -12,7 +12,7 @@ import {
getCouponLabels,
getProductLabels,
getTaxRateLabels,
-} from 'lib/async-requests';
+} from '../../../lib/async-requests';
const ORDERS_REPORT_CHARTS_FILTER = 'woocommerce_admin_orders_report_charts';
const ORDERS_REPORT_FILTERS_FILTER = 'woocommerce_admin_orders_report_filters';
diff --git a/plugins/woocommerce-admin/client/analytics/report/orders/index.js b/plugins/woocommerce-admin/client/analytics/report/orders/index.js
index 91447f4d3cc..93358fb841b 100644
--- a/plugins/woocommerce-admin/client/analytics/report/orders/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/orders/index.js
@@ -8,11 +8,11 @@ import PropTypes from 'prop-types';
* Internal dependencies
*/
import { advancedFilters, charts, filters } from './config';
-import getSelectedChart from 'lib/get-selected-chart';
+import getSelectedChart from '../../../lib/get-selected-chart';
import OrdersReportTable from './table';
-import ReportChart from 'analytics/components/report-chart';
-import ReportSummary from 'analytics/components/report-summary';
-import ReportFilters from 'analytics/components/report-filters';
+import ReportChart from '../../components/report-chart';
+import ReportSummary from '../../components/report-summary';
+import ReportFilters from '../../components/report-filters';
export default class OrdersReport extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/orders/table.js b/plugins/woocommerce-admin/client/analytics/report/orders/table.js
index 588a29f688f..bb5a06f9b77 100644
--- a/plugins/woocommerce-admin/client/analytics/report/orders/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/orders/table.js
@@ -4,21 +4,17 @@
import { __, _n, sprintf } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { map } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { Date, Link, OrderStatus, ViewMoreList } from '@woocommerce/components';
import { formatValue } from '@woocommerce/number';
import { getSetting } from '@woocommerce/wc-admin-settings';
-import { defaultTableDateFormat } from 'lib/date';
+import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
-import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
-import { CurrencyContext } from 'lib/currency-context';
+import { defaultTableDateFormat } from '../../../lib/date';
+import ReportTable from '../../components/report-table';
+import { CurrencyContext } from '../../../lib/currency-context';
import './style.scss';
class OrdersReportTable extends Component {
diff --git a/plugins/woocommerce-admin/client/analytics/report/products/config.js b/plugins/woocommerce-admin/client/analytics/report/products/config.js
index d9530958cc2..07ceb06fe2d 100644
--- a/plugins/woocommerce-admin/client/analytics/report/products/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/products/config.js
@@ -7,7 +7,10 @@ import { applyFilters } from '@wordpress/hooks';
/**
* Internal dependencies
*/
-import { getProductLabels, getVariationLabels } from 'lib/async-requests';
+import {
+ getProductLabels,
+ getVariationLabels,
+} from '../../../lib/async-requests';
const PRODUCTS_REPORT_CHARTS_FILTER =
'woocommerce_admin_products_report_charts';
diff --git a/plugins/woocommerce-admin/client/analytics/report/products/index.js b/plugins/woocommerce-admin/client/analytics/report/products/index.js
index a2dd41b81e3..2d9fabcfb8b 100644
--- a/plugins/woocommerce-admin/client/analytics/report/products/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/products/index.js
@@ -10,14 +10,14 @@ import PropTypes from 'prop-types';
* Internal dependencies
*/
import { advancedFilters, charts, filters } from './config';
-import getSelectedChart from 'lib/get-selected-chart';
+import getSelectedChart from '../../../lib/get-selected-chart';
import ProductsReportTable from './table';
-import ReportChart from 'analytics/components/report-chart';
-import ReportError from 'analytics/components/report-error';
-import ReportSummary from 'analytics/components/report-summary';
+import ReportChart from '../../components/report-chart';
+import ReportError from '../../components/report-error';
+import ReportSummary from '../../components/report-summary';
import VariationsReportTable from './table-variations';
-import withSelect from 'wc-api/with-select';
-import ReportFilters from 'analytics/components/report-filters';
+import withSelect from '../../../wc-api/with-select';
+import ReportFilters from '../../components/report-filters';
class ProductsReport extends Component {
getChartMeta() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/products/table-variations.js b/plugins/woocommerce-admin/client/analytics/report/products/table-variations.js
index b8aeefd9cab..0e16530f19e 100644
--- a/plugins/woocommerce-admin/client/analytics/report/products/table-variations.js
+++ b/plugins/woocommerce-admin/client/analytics/report/products/table-variations.js
@@ -4,10 +4,6 @@
import { __, _n, _x } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { map, get } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
import { formatValue } from '@woocommerce/number';
@@ -16,9 +12,9 @@ import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
+import ReportTable from '../../components/report-table';
import { isLowStock } from './utils';
-import { CurrencyContext } from 'lib/currency-context';
+import { CurrencyContext } from '../../../lib/currency-context';
const manageStock = getSetting( 'manageStock', 'no' );
const stockStatuses = getSetting( 'stockStatuses', {} );
diff --git a/plugins/woocommerce-admin/client/analytics/report/products/table.js b/plugins/woocommerce-admin/client/analytics/report/products/table.js
index 081156203ed..dc7378ab0a3 100644
--- a/plugins/woocommerce-admin/client/analytics/report/products/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/products/table.js
@@ -6,10 +6,6 @@ import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { decodeEntities } from '@wordpress/html-entities';
import { map } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
import { Link, Tag } from '@woocommerce/components';
import { formatValue } from '@woocommerce/number';
@@ -20,9 +16,9 @@ import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
*/
import CategoryBreacrumbs from '../categories/breadcrumbs';
import { isLowStock } from './utils';
-import ReportTable from 'analytics/components/report-table';
-import withSelect from 'wc-api/with-select';
-import { CurrencyContext } from 'lib/currency-context';
+import ReportTable from '../../components/report-table';
+import withSelect from '../../../wc-api/with-select';
+import { CurrencyContext } from '../../../lib/currency-context';
import './style.scss';
const manageStock = getSetting( 'manageStock', 'no' );
diff --git a/plugins/woocommerce-admin/client/analytics/report/revenue/index.js b/plugins/woocommerce-admin/client/analytics/report/revenue/index.js
index 63b089e7204..f7a68728bac 100644
--- a/plugins/woocommerce-admin/client/analytics/report/revenue/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/revenue/index.js
@@ -8,11 +8,11 @@ import PropTypes from 'prop-types';
* Internal dependencies
*/
import { advancedFilters, charts, filters } from './config';
-import getSelectedChart from 'lib/get-selected-chart';
-import ReportChart from 'analytics/components/report-chart';
-import ReportSummary from 'analytics/components/report-summary';
+import getSelectedChart from '../../../lib/get-selected-chart';
+import ReportChart from '../../components/report-chart';
+import ReportSummary from '../../components/report-summary';
import RevenueReportTable from './table';
-import ReportFilters from 'analytics/components/report-filters';
+import ReportFilters from '../../components/report-filters';
export default class RevenueReport extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/revenue/table.js b/plugins/woocommerce-admin/client/analytics/report/revenue/table.js
index bcb6e5c6fe8..e1afe17a160 100644
--- a/plugins/woocommerce-admin/client/analytics/report/revenue/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/revenue/table.js
@@ -6,15 +6,6 @@ import { Component } from '@wordpress/element';
import { format as formatDate } from '@wordpress/date';
import { compose } from '@wordpress/compose';
import { get } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
-import {
- appendTimestamp,
- defaultTableDateFormat,
- getCurrentDates,
-} from 'lib/date';
import { Date, Link } from '@woocommerce/components';
import { formatValue } from '@woocommerce/number';
import { getSetting } from '@woocommerce/wc-admin-settings';
@@ -23,11 +14,16 @@ import { SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import ReportTable from 'analytics/components/report-table';
-import withSelect from 'wc-api/with-select';
-import { getReportTableQuery } from 'wc-api/reports/utils';
-import { CurrencyContext } from 'lib/currency-context';
+import {
+ appendTimestamp,
+ defaultTableDateFormat,
+ getCurrentDates,
+} from '../../../lib/date';
+import { QUERY_DEFAULTS } from '../../../wc-api/constants';
+import ReportTable from '../../components/report-table';
+import withSelect from '../../../wc-api/with-select';
+import { getReportTableQuery } from '../../../wc-api/reports/utils';
+import { CurrencyContext } from '../../../lib/currency-context';
class RevenueReportTable extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/stock/index.js b/plugins/woocommerce-admin/client/analytics/report/stock/index.js
index d83e1cbff71..37d2d1958df 100644
--- a/plugins/woocommerce-admin/client/analytics/report/stock/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/stock/index.js
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
*/
import { advancedFilters, showDatePicker, filters } from './config';
import StockReportTable from './table';
-import ReportFilters from 'analytics/components/report-filters';
+import ReportFilters from '../../components/report-filters';
export default class StockReport extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/stock/table.js b/plugins/woocommerce-admin/client/analytics/report/stock/table.js
index 1e29df960c6..f9b6e193ae7 100644
--- a/plugins/woocommerce-admin/client/analytics/report/stock/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/stock/table.js
@@ -4,10 +4,6 @@
import { __, _n, _x } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { decodeEntities } from '@wordpress/html-entities';
-
-/**
- * WooCommerce dependencies
- */
import { Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
import { formatValue } from '@woocommerce/number';
@@ -16,9 +12,9 @@ import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
+import ReportTable from '../../components/report-table';
import { isLowStock } from './utils';
-import { CurrencyContext } from 'lib/currency-context';
+import { CurrencyContext } from '../../../lib/currency-context';
const stockStatuses = getSetting( 'stockStatuses', {} );
diff --git a/plugins/woocommerce-admin/client/analytics/report/taxes/config.js b/plugins/woocommerce-admin/client/analytics/report/taxes/config.js
index 0734fc1b62d..3924a99f702 100644
--- a/plugins/woocommerce-admin/client/analytics/report/taxes/config.js
+++ b/plugins/woocommerce-admin/client/analytics/report/taxes/config.js
@@ -7,9 +7,9 @@ import { applyFilters } from '@wordpress/hooks';
/**
* Internal dependencies
*/
-import { getRequestByIdString } from 'lib/async-requests';
+import { getRequestByIdString } from '../../../lib/async-requests';
import { getTaxCode } from './utils';
-import { NAMESPACE } from 'wc-api/constants';
+import { NAMESPACE } from '../../../wc-api/constants';
const TAXES_REPORT_CHARTS_FILTER = 'woocommerce_admin_taxes_report_charts';
const TAXES_REPORT_FILTERS_FILTER = 'woocommerce_admin_taxes_report_filters';
diff --git a/plugins/woocommerce-admin/client/analytics/report/taxes/index.js b/plugins/woocommerce-admin/client/analytics/report/taxes/index.js
index 0d2d46a686e..e5c9c87c403 100644
--- a/plugins/woocommerce-admin/client/analytics/report/taxes/index.js
+++ b/plugins/woocommerce-admin/client/analytics/report/taxes/index.js
@@ -9,11 +9,11 @@ import { __ } from '@wordpress/i18n';
* Internal dependencies
*/
import { advancedFilters, charts, filters } from './config';
-import getSelectedChart from 'lib/get-selected-chart';
-import ReportChart from 'analytics/components/report-chart';
-import ReportSummary from 'analytics/components/report-summary';
+import getSelectedChart from '../../../lib/get-selected-chart';
+import ReportChart from '../../components/report-chart';
+import ReportSummary from '../../components/report-summary';
import TaxesReportTable from './table';
-import ReportFilters from 'analytics/components/report-filters';
+import ReportFilters from '../../components/report-filters';
export default class TaxesReport extends Component {
getChartMeta() {
diff --git a/plugins/woocommerce-admin/client/analytics/report/taxes/table.js b/plugins/woocommerce-admin/client/analytics/report/taxes/table.js
index 25afb75953b..d1b249df2b9 100644
--- a/plugins/woocommerce-admin/client/analytics/report/taxes/table.js
+++ b/plugins/woocommerce-admin/client/analytics/report/taxes/table.js
@@ -4,20 +4,16 @@
import { __, _n } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { map } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
-import { getTaxCode } from './utils';
import { formatValue } from '@woocommerce/number';
/**
* Internal dependencies
*/
-import ReportTable from 'analytics/components/report-table';
-import { CurrencyContext } from 'lib/currency-context';
+import { getTaxCode } from './utils';
+import ReportTable from '../../components/report-table';
+import { CurrencyContext } from '../../../lib/currency-context';
class TaxesReportTable extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/settings/default-date.js b/plugins/woocommerce-admin/client/analytics/settings/default-date.js
index ce0b9d31b6b..6fec91396ed 100644
--- a/plugins/woocommerce-admin/client/analytics/settings/default-date.js
+++ b/plugins/woocommerce-admin/client/analytics/settings/default-date.js
@@ -2,6 +2,8 @@
* External dependencies
*/
import { parse, stringify } from 'qs';
+import { DateRangeFilterPicker } from '@woocommerce/components';
+import { useSettings } from '@woocommerce/data';
/**
* Internal dependencies
@@ -10,13 +12,7 @@ import {
getCurrentDates,
getDateParamsFromQuery,
isoDateFormat,
-} from 'lib/date';
-
-/**
- * WooCommerce dependencies
- */
-import { DateRangeFilterPicker } from '@woocommerce/components';
-import { useSettings } from '@woocommerce/data';
+} from '../../lib/date';
const DefaultDate = ( { value, onChange } ) => {
const { wcAdminSettings } = useSettings( 'wc_admin', [
diff --git a/plugins/woocommerce-admin/client/analytics/settings/historical-data/index.js b/plugins/woocommerce-admin/client/analytics/settings/historical-data/index.js
index 664b5f0603e..26bc7987297 100644
--- a/plugins/woocommerce-admin/client/analytics/settings/historical-data/index.js
+++ b/plugins/woocommerce-admin/client/analytics/settings/historical-data/index.js
@@ -15,9 +15,9 @@ import { withSpokenMessages } from '@wordpress/components';
*/
import { formatParams } from './utils';
import HistoricalDataLayout from './layout';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import { recordEvent } from 'lib/tracks';
-import withSelect from 'wc-api/with-select';
+import { QUERY_DEFAULTS } from '../../../wc-api/constants';
+import { recordEvent } from '../../../lib/tracks';
+import withSelect from '../../../wc-api/with-select';
class HistoricalData extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/analytics/settings/historical-data/layout.js b/plugins/woocommerce-admin/client/analytics/settings/historical-data/layout.js
index 67b14aef0fe..b35aeb74132 100644
--- a/plugins/woocommerce-admin/client/analytics/settings/historical-data/layout.js
+++ b/plugins/woocommerce-admin/client/analytics/settings/historical-data/layout.js
@@ -5,23 +5,19 @@ import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { isNil } from 'lodash';
import { SECOND } from '@fresh-data/framework';
-
-/**
- * WooCommerce dependencies
- */
import { SectionHeader } from '@woocommerce/components';
/**
* Internal dependencies
*/
-import { DEFAULT_REQUIREMENT } from 'wc-api/constants';
+import { DEFAULT_REQUIREMENT } from '../../../wc-api/constants';
import { formatParams, getStatus } from './utils';
import HistoricalDataActions from './actions';
import HistoricalDataPeriodSelector from './period-selector';
import HistoricalDataProgress from './progress';
import HistoricalDataStatus from './status';
import HistoricalDataSkipCheckbox from './skip-checkbox';
-import withSelect from 'wc-api/with-select';
+import withSelect from '../../../wc-api/with-select';
import './style.scss';
class HistoricalDataLayout extends Component {
diff --git a/plugins/woocommerce-admin/client/analytics/settings/historical-data/period-selector.js b/plugins/woocommerce-admin/client/analytics/settings/historical-data/period-selector.js
index bcf9a8ab9a7..e9cfcd429cf 100644
--- a/plugins/woocommerce-admin/client/analytics/settings/historical-data/period-selector.js
+++ b/plugins/woocommerce-admin/client/analytics/settings/historical-data/period-selector.js
@@ -4,12 +4,12 @@
import { __ } from '@wordpress/i18n';
import moment from 'moment';
import { SelectControl } from '@wordpress/components';
+import { DatePicker } from '@woocommerce/components';
/**
- * WooCommerce dependencies
+ * Internal dependencies
*/
-import { DatePicker } from '@woocommerce/components';
-import { dateValidationMessages } from 'lib/date';
+import { dateValidationMessages } from '../../../lib/date';
function HistoricalDataPeriodSelector( {
dateFormat,
diff --git a/plugins/woocommerce-admin/client/analytics/settings/historical-data/status.js b/plugins/woocommerce-admin/client/analytics/settings/historical-data/status.js
index ff79a01f93a..c6f701d6039 100644
--- a/plugins/woocommerce-admin/client/analytics/settings/historical-data/status.js
+++ b/plugins/woocommerce-admin/client/analytics/settings/historical-data/status.js
@@ -5,10 +5,6 @@ import { __, sprintf } from '@wordpress/i18n';
import { applyFilters } from '@wordpress/hooks';
import moment from 'moment';
import { Spinner } from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
import { useFilters } from '@woocommerce/components';
const HISTORICAL_DATA_STATUS_FILTER = 'woocommerce_admin_import_status';
diff --git a/plugins/woocommerce-admin/client/analytics/settings/index.js b/plugins/woocommerce-admin/client/analytics/settings/index.js
index 155cd81b22d..deb9c398db9 100644
--- a/plugins/woocommerce-admin/client/analytics/settings/index.js
+++ b/plugins/woocommerce-admin/client/analytics/settings/index.js
@@ -6,10 +6,6 @@ import { Button } from '@wordpress/components';
import { Fragment, useEffect, useRef } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { SectionHeader, useFilters, ScrollTo } from '@woocommerce/components';
import { useSettings } from '@woocommerce/data';
@@ -20,7 +16,7 @@ import './index.scss';
import { config } from './config';
import Setting from './setting';
import HistoricalData from './historical-data';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
const SETTINGS_FILTER = 'woocommerce_admin_analytics_settings';
diff --git a/plugins/woocommerce-admin/client/dashboard/components/cart-modal.js b/plugins/woocommerce-admin/client/dashboard/components/cart-modal.js
index 0d1430512df..8f4f02266d2 100644
--- a/plugins/woocommerce-admin/client/dashboard/components/cart-modal.js
+++ b/plugins/woocommerce-admin/client/dashboard/components/cart-modal.js
@@ -8,10 +8,6 @@ import { Button, Modal } from '@wordpress/components';
import { find } from 'lodash';
import { decodeEntities } from '@wordpress/html-entities';
import { withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import { List } from '@woocommerce/components';
import { ONBOARDING_STORE_NAME, PLUGINS_STORE_NAME } from '@woocommerce/data';
@@ -19,10 +15,10 @@ import { ONBOARDING_STORE_NAME, PLUGINS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { getProductIdsForCart } from 'dashboard/utils';
-import sanitizeHTML from 'lib/sanitize-html';
-import { recordEvent } from 'lib/tracks';
-import { getInAppPurchaseUrl } from 'lib/in-app-purchase';
+import { getProductIdsForCart } from '../utils';
+import sanitizeHTML from '../../lib/sanitize-html';
+import { recordEvent } from '../../lib/tracks';
+import { getInAppPurchaseUrl } from '../../lib/in-app-purchase';
class CartModal extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/dashboard/components/connect/index.js b/plugins/woocommerce-admin/client/dashboard/components/connect/index.js
index 7e8a22750b3..e7783e26204 100644
--- a/plugins/woocommerce-admin/client/dashboard/components/connect/index.js
+++ b/plugins/woocommerce-admin/client/dashboard/components/connect/index.js
@@ -7,10 +7,6 @@ import { Component, Fragment } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { PLUGINS_STORE_NAME } from '@woocommerce/data';
class Connect extends Component {
diff --git a/plugins/woocommerce-admin/client/dashboard/components/settings/general/store-address.js b/plugins/woocommerce-admin/client/dashboard/components/settings/general/store-address.js
index c13a83b4173..fb94edf6ccd 100644
--- a/plugins/woocommerce-admin/client/dashboard/components/settings/general/store-address.js
+++ b/plugins/woocommerce-admin/client/dashboard/components/settings/general/store-address.js
@@ -7,10 +7,6 @@ import { escapeRegExp } from 'lodash';
import { Fragment } from '@wordpress/element';
import { useEffect, useMemo, useState } from 'react';
import { getSetting } from '@woocommerce/wc-admin-settings';
-
-/**
- * Internal dependencies
- */
import { SelectControl, TextControl } from '@woocommerce/components';
const { countries } = getSetting( 'dataEndpoints', { countries: {} } );
diff --git a/plugins/woocommerce-admin/client/dashboard/customizable.js b/plugins/woocommerce-admin/client/dashboard/customizable.js
index 927b2038003..fbacbf29ded 100644
--- a/plugins/woocommerce-admin/client/dashboard/customizable.js
+++ b/plugins/woocommerce-admin/client/dashboard/customizable.js
@@ -8,10 +8,6 @@ import { partial } from 'lodash';
import { Dropdown, Button, Icon } from '@wordpress/components';
import { applyFilters } from '@wordpress/hooks';
import { Icon as WPIcon, plusCircleFilled } from '@wordpress/icons';
-
-/**
- * WooCommerce dependencies
- */
import { H, Spinner } from '@woocommerce/components';
import {
SETTINGS_STORE_NAME,
@@ -26,19 +22,19 @@ import { getQuery } from '@woocommerce/navigation';
import './style.scss';
import defaultSections from './default-sections';
import Section from './section';
-import withSelect from 'wc-api/with-select';
-import { recordEvent } from 'lib/tracks';
-import { isOnboardingEnabled } from 'dashboard/utils';
+import withSelect from '../wc-api/with-select';
+import { recordEvent } from '../lib/tracks';
+import { isOnboardingEnabled } from './utils';
import {
getCurrentDates,
getDateParamsFromQuery,
isoDateFormat,
-} from 'lib/date';
-import ReportFilters from 'analytics/components/report-filters';
+} from '../lib/date';
+import ReportFilters from '../analytics/components/report-filters';
import {
CurrencyContext,
getFilteredCurrencyInstance,
-} from 'lib/currency-context';
+} from '../lib/currency-context';
const TaskList = lazy( () =>
import( /* webpackChunkName: "task-list" */ '../task-list' )
diff --git a/plugins/woocommerce-admin/client/dashboard/dashboard-charts/block.js b/plugins/woocommerce-admin/client/dashboard/dashboard-charts/block.js
index 2e8609ce7bf..f6afe31e9c4 100644
--- a/plugins/woocommerce-admin/client/dashboard/dashboard-charts/block.js
+++ b/plugins/woocommerce-admin/client/dashboard/dashboard-charts/block.js
@@ -4,10 +4,6 @@
import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
import { __, sprintf } from '@wordpress/i18n';
-
-/**
- * WooCommerce dependencies
- */
import { Card } from '@woocommerce/components';
import {
getHistory,
@@ -19,7 +15,7 @@ import { getAdminLink } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import ReportChart from 'analytics/components/report-chart';
+import ReportChart from '../../analytics/components/report-chart';
import './block.scss';
class ChartBlock extends Component {
diff --git a/plugins/woocommerce-admin/client/dashboard/dashboard-charts/config.js b/plugins/woocommerce-admin/client/dashboard/dashboard-charts/config.js
index 1bc5a686ccb..fd6ea68c348 100644
--- a/plugins/woocommerce-admin/client/dashboard/dashboard-charts/config.js
+++ b/plugins/woocommerce-admin/client/dashboard/dashboard-charts/config.js
@@ -7,13 +7,12 @@ import { applyFilters } from '@wordpress/hooks';
/**
* Internal dependencies
*/
-
-import { charts as ordersCharts } from 'analytics/report/orders/config';
-import { charts as productsCharts } from 'analytics/report/products/config';
-import { charts as revenueCharts } from 'analytics/report/revenue/config';
-import { charts as couponsCharts } from 'analytics/report/coupons/config';
-import { charts as taxesCharts } from 'analytics/report/taxes/config';
-import { charts as downloadsCharts } from 'analytics/report/downloads/config';
+import { charts as ordersCharts } from '../../analytics/report/orders/config';
+import { charts as productsCharts } from '../../analytics/report/products/config';
+import { charts as revenueCharts } from '../../analytics/report/revenue/config';
+import { charts as couponsCharts } from '../../analytics/report/coupons/config';
+import { charts as taxesCharts } from '../../analytics/report/taxes/config';
+import { charts as downloadsCharts } from '../../analytics/report/downloads/config';
const DASHBOARD_CHARTS_FILTER = 'woocommerce_admin_dashboard_charts_filter';
diff --git a/plugins/woocommerce-admin/client/dashboard/dashboard-charts/index.js b/plugins/woocommerce-admin/client/dashboard/dashboard-charts/index.js
index bd4dfc22c7e..7e6e5044ae7 100644
--- a/plugins/woocommerce-admin/client/dashboard/dashboard-charts/index.js
+++ b/plugins/woocommerce-admin/client/dashboard/dashboard-charts/index.js
@@ -8,9 +8,6 @@ import Gridicon from 'gridicons';
import PropTypes from 'prop-types';
import { Button, NavigableMenu, SelectControl } from '@wordpress/components';
-/**
- * WooCommerce dependencies
- */
import {
EllipsisMenu,
MenuItem,
@@ -18,14 +15,14 @@ import {
SectionHeader,
} from '@woocommerce/components';
import { useUserPreferences } from '@woocommerce/data';
-import { getAllowedIntervalsForQuery } from 'lib/date';
/**
* Internal dependencies
*/
+import { getAllowedIntervalsForQuery } from '../../lib/date';
import ChartBlock from './block';
import { uniqCharts } from './config';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
import './style.scss';
const renderChartToggles = ( { hiddenBlocks, onToggleHiddenBlock } ) => {
diff --git a/plugins/woocommerce-admin/client/dashboard/default-sections.js b/plugins/woocommerce-admin/client/dashboard/default-sections.js
index 968f740490b..a7ce7b68674 100644
--- a/plugins/woocommerce-admin/client/dashboard/default-sections.js
+++ b/plugins/woocommerce-admin/client/dashboard/default-sections.js
@@ -4,11 +4,11 @@
import { __ } from '@wordpress/i18n';
import { applyFilters } from '@wordpress/hooks';
import { lazy, Suspense } from '@wordpress/element';
+import { Spinner } from '@woocommerce/components';
/**
* Internal dependencies
*/
-import { Spinner } from '@woocommerce/components';
const LazyDashboardCharts = lazy( () =>
import( /* webpackChunkName: "dashboard-charts" */ './dashboard-charts' )
);
diff --git a/plugins/woocommerce-admin/client/dashboard/index.js b/plugins/woocommerce-admin/client/dashboard/index.js
index 7b5dc426096..0a1c2fa1e62 100644
--- a/plugins/woocommerce-admin/client/dashboard/index.js
+++ b/plugins/woocommerce-admin/client/dashboard/index.js
@@ -5,10 +5,6 @@ import { Component, Suspense, lazy } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';
import { identity } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import {
ONBOARDING_STORE_NAME,
@@ -21,7 +17,7 @@ import { getHistory, getNewPath } from '@woocommerce/navigation';
* Internal dependencies
*/
import './style.scss';
-import { isOnboardingEnabled } from 'dashboard/utils';
+import { isOnboardingEnabled } from './utils';
const CustomizableDashboard = lazy( () =>
import( /* webpackChunkName: "customizable-dashboard" */ './customizable' )
diff --git a/plugins/woocommerce-admin/client/dashboard/leaderboards/index.js b/plugins/woocommerce-admin/client/dashboard/leaderboards/index.js
index 11106c4fb75..ab79644e4cd 100644
--- a/plugins/woocommerce-admin/client/dashboard/leaderboards/index.js
+++ b/plugins/woocommerce-admin/client/dashboard/leaderboards/index.js
@@ -7,9 +7,6 @@ import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
import { SelectControl } from '@wordpress/components';
-/**
- * WooCommerce dependencies
- */
import {
EllipsisMenu,
MenuItem,
@@ -22,9 +19,9 @@ import { getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import Leaderboard from 'analytics/components/leaderboard';
-import withSelect from 'wc-api/with-select';
-import { recordEvent } from 'lib/tracks';
+import Leaderboard from '../../analytics/components/leaderboard';
+import withSelect from '../../wc-api/with-select';
+import { recordEvent } from '../../lib/tracks';
import './style.scss';
const renderLeaderboardToggles = ( {
diff --git a/plugins/woocommerce-admin/client/dashboard/section-controls.js b/plugins/woocommerce-admin/client/dashboard/section-controls.js
index 61ff46d2103..d36b2d63820 100644
--- a/plugins/woocommerce-admin/client/dashboard/section-controls.js
+++ b/plugins/woocommerce-admin/client/dashboard/section-controls.js
@@ -4,10 +4,6 @@
import { __ } from '@wordpress/i18n';
import { Icon, TextControl } from '@wordpress/components';
import { Component, Fragment } from '@wordpress/element';
-
-/**
- * Internal dependencies
- */
import { MenuItem } from '@woocommerce/components';
class SectionControls extends Component {
diff --git a/plugins/woocommerce-admin/client/dashboard/store-performance/index.js b/plugins/woocommerce-admin/client/dashboard/store-performance/index.js
index ff3db9ff0aa..5940921e16d 100644
--- a/plugins/woocommerce-admin/client/dashboard/store-performance/index.js
+++ b/plugins/woocommerce-admin/client/dashboard/store-performance/index.js
@@ -4,18 +4,9 @@
import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { compose } from '@wordpress/compose';
-
-/**
- * WooCommerce dependencies
- */
-import { getDateParamsFromQuery } from 'lib/date';
import { getPersistedQuery } from '@woocommerce/navigation';
import { getSetting } from '@woocommerce/wc-admin-settings';
import { SETTINGS_STORE_NAME } from '@woocommerce/data';
-
-/**
- * Internal dependencies
- */
import {
EllipsisMenu,
MenuItem,
@@ -25,10 +16,15 @@ import {
SummaryListPlaceholder,
SummaryNumber,
} from '@woocommerce/components';
-import withSelect from 'wc-api/with-select';
+
+/**
+ * Internal dependencies
+ */
+import { getDateParamsFromQuery } from '../../lib/date';
+import withSelect from '../../wc-api/with-select';
import './style.scss';
-import { recordEvent } from 'lib/tracks';
-import { CurrencyContext } from 'lib/currency-context';
+import { recordEvent } from '../../lib/tracks';
+import { CurrencyContext } from '../../lib/currency-context';
import { getIndicatorData, getIndicatorValues } from './utils';
const { performanceIndicators: indicators } = getSetting( 'dataEndpoints', {
diff --git a/plugins/woocommerce-admin/client/dashboard/store-performance/utils.js b/plugins/woocommerce-admin/client/dashboard/store-performance/utils.js
index 64cbaf807cc..6de655d1a5a 100644
--- a/plugins/woocommerce-admin/client/dashboard/store-performance/utils.js
+++ b/plugins/woocommerce-admin/client/dashboard/store-performance/utils.js
@@ -3,16 +3,16 @@
*/
import moment from 'moment';
import { find } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getCurrentDates, appendTimestamp } from '@woocommerce/date';
import { SETTINGS_STORE_NAME } from '@woocommerce/data';
import { getNewPath } from '@woocommerce/navigation';
import { calculateDelta, formatValue } from '@woocommerce/number';
import { getAdminLink } from '@woocommerce/wc-admin-settings';
-import { getFilterQuery } from 'wc-api/reports/utils';
+
+/**
+ * Internal dependencies
+ */
+import { getFilterQuery } from '../../wc-api/reports/utils';
function getReportUrl( href, persistedQuery, primaryItem ) {
if ( ! href ) {
diff --git a/plugins/woocommerce-admin/client/dashboard/utils.js b/plugins/woocommerce-admin/client/dashboard/utils.js
index befd65654f3..91d9a8aa1b2 100644
--- a/plugins/woocommerce-admin/client/dashboard/utils.js
+++ b/plugins/woocommerce-admin/client/dashboard/utils.js
@@ -3,10 +3,6 @@
*/
import { decodeEntities } from '@wordpress/html-entities';
import { without } from 'lodash';
-
-/**
- * Internal dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
/**
diff --git a/plugins/woocommerce-admin/client/devdocs/index.js b/plugins/woocommerce-admin/client/devdocs/index.js
index 5b316e45b57..97d0b97e318 100755
--- a/plugins/woocommerce-admin/client/devdocs/index.js
+++ b/plugins/woocommerce-admin/client/devdocs/index.js
@@ -4,13 +4,13 @@
import classnames from 'classnames';
import { Component, Fragment } from '@wordpress/element';
import { find, get } from 'lodash';
+import { Card, Link } from '@woocommerce/components';
/**
* Internal dependencies
*/
import ComponentExample from './example';
import ComponentDocs from './docs';
-import { Card, Link } from '@woocommerce/components';
import examples from './examples.json';
import './style.scss';
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/activity-card/index.js b/plugins/woocommerce-admin/client/header/activity-panel/activity-card/index.js
index 537bcde9828..03bd6391e23 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/activity-card/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/activity-card/index.js
@@ -6,12 +6,12 @@ import { cloneElement, Component } from '@wordpress/element';
import Gridicon from 'gridicons';
import moment from 'moment';
import PropTypes from 'prop-types';
+import { H, Section } from '@woocommerce/components';
/**
* Internal dependencies
*/
import './style.scss';
-import { H, Section } from '@woocommerce/components';
class ActivityCard extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/activity-card/test/index.js b/plugins/woocommerce-admin/client/header/activity-panel/activity-card/test/index.js
index 408e6a0f8f6..951012dc029 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/activity-card/test/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/activity-card/test/index.js
@@ -5,12 +5,12 @@ import { Button } from '@wordpress/components';
import Gridicon from 'gridicons';
import { shallow } from 'enzyme';
import moment from 'moment';
+import { Gravatar } from '@woocommerce/components';
/**
* Internal dependencies
*/
import { ActivityCard } from '../';
-import { Gravatar } from '@woocommerce/components';
describe( 'ActivityCard', () => {
test( 'should have correct title', () => {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/activity-header/index.js b/plugins/woocommerce-admin/client/header/activity-panel/activity-header/index.js
index df9aba8bd35..e7b38dc5aa9 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/activity-header/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/activity-header/index.js
@@ -5,12 +5,12 @@ import classnames from 'classnames';
import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
import { __experimentalText as Text } from '@wordpress/components';
+import { EllipsisMenu } from '@woocommerce/components';
/**
* Internal dependencies
*/
import './style.scss';
-import { EllipsisMenu } from '@woocommerce/components';
class ActivityHeader extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/activity-outbound-link/index.js b/plugins/woocommerce-admin/client/header/activity-panel/activity-outbound-link/index.js
index 8b4c1e0cc31..15d30ea17bc 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/activity-outbound-link/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/activity-outbound-link/index.js
@@ -4,12 +4,12 @@
import PropTypes from 'prop-types';
import classnames from 'classnames';
import Gridicon from 'gridicons';
+import { Link } from '@woocommerce/components';
/**
* Internal dependencies
*/
import './style.scss';
-import { Link } from '@woocommerce/components';
const ActivityOutboundLink = ( props ) => {
const { href, type, className, children, ...restOfProps } = props;
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/index.js b/plugins/woocommerce-admin/client/header/activity-panel/index.js
index 8ad572e87a3..42ed1977be2 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/index.js
@@ -12,10 +12,6 @@ import PagesIcon from 'gridicons/dist/pages';
import CrossIcon from 'gridicons/dist/cross-small';
import classnames from 'classnames';
import { Icon, lifesaver } from '@wordpress/icons';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting, getAdminLink } from '@woocommerce/wc-admin-settings';
import { H, Section, Spinner } from '@woocommerce/components';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
@@ -32,8 +28,10 @@ import {
getUnapprovedReviews,
getUnreadStock,
} from './unread-indicators';
-import { isOnboardingEnabled, isWCAdmin } from 'dashboard/utils';
-import withSelect from 'wc-api/with-select';
+import { isOnboardingEnabled, isWCAdmin } from '../../dashboard/utils';
+import withSelect from '../../wc-api/with-select';
+import { Tabs } from './tabs';
+import { SetupProgress } from './setup-progress';
const HelpPanel = lazy( () =>
import( /* webpackChunkName: "activity-panels-help" */ './panels/help' )
@@ -52,9 +50,6 @@ const ReviewsPanel = lazy( () =>
import( /* webpackChunkName: "activity-panels-inbox" */ './panels/reviews' )
);
-import { Tabs } from './tabs';
-import { SetupProgress } from './setup-progress';
-
const manageStock = getSetting( 'manageStock', 'no' );
const reviewsEnabled = getSetting( 'reviewsEnabled', 'no' );
export class ActivityPanel extends Component {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/help.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/help.js
index e1d564b8a43..60ba80bcb7c 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/help.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/help.js
@@ -8,10 +8,6 @@ import { Fragment, useEffect } from '@wordpress/element';
import { applyFilters } from '@wordpress/hooks';
import { Icon, chevronRight, page } from '@wordpress/icons';
import { partial } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import { List, Section } from '@woocommerce/components';
import {
@@ -19,15 +15,15 @@ import {
PLUGINS_STORE_NAME,
SETTINGS_STORE_NAME,
} from '@woocommerce/data';
+import { compose } from 'redux';
/**
* Internal dependencies
*/
import ActivityHeader from '../activity-header';
-import { getCountryCode } from 'dashboard/utils';
-import { recordEvent } from 'lib/tracks';
-import { getPaymentMethods } from 'task-list/tasks/payments/methods';
-import { compose } from 'redux';
+import { getCountryCode } from '../../../dashboard/utils';
+import { recordEvent } from '../../../lib/tracks';
+import { getPaymentMethods } from '../../../task-list/tasks/payments/methods';
export const SETUP_TASK_HELP_ITEMS_FILTER =
'woocommerce_admin_setup_task_help_items';
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/action.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/action.js
index 245a8c71701..82b65076e55 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/action.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/action.js
@@ -6,10 +6,6 @@ import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { ADMIN_URL as adminUrl } from '@woocommerce/wc-admin-settings';
class InboxNoteAction extends Component {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/card.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/card.js
index 56862e7ad8f..b12fd5b4693 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/card.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/card.js
@@ -7,17 +7,17 @@ import { Button, Dropdown, Modal } from '@wordpress/components';
import PropTypes from 'prop-types';
import VisibilitySensor from 'react-visibility-sensor';
import moment from 'moment';
+import classnames from 'classnames';
+import { H, Section } from '@woocommerce/components';
/**
* Internal dependencies
*/
import NoteAction from './action';
-import sanitizeHTML from 'lib/sanitize-html';
-import classnames from 'classnames';
-import { recordEvent } from 'lib/tracks';
+import sanitizeHTML from '../../../../lib/sanitize-html';
+import { recordEvent } from '../../../../lib/tracks';
import './style.scss';
-import { H, Section } from '@woocommerce/components';
-import { getScreenName } from 'utils';
+import { getScreenName } from '../../../../utils';
class InboxNoteCard extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/index.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/index.js
index 240fb9c918b..0875939686f 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox/index.js
@@ -4,10 +4,7 @@
import { __ } from '@wordpress/i18n';
import { Fragment, useEffect } from '@wordpress/element';
import { compose } from '@wordpress/compose';
-
-/**
- * WooCommerce dependencies
- */
+import { EmptyContent, Section } from '@woocommerce/components';
import { useUserPreferences } from '@woocommerce/data';
/**
@@ -17,9 +14,8 @@ import { ActivityCard } from '../../activity-card';
import InboxNotePlaceholder from './placeholder';
import ActivityHeader from '../../activity-header';
import InboxNoteCard from './card';
-import { EmptyContent, Section } from '@woocommerce/components';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import withSelect from 'wc-api/with-select';
+import { QUERY_DEFAULTS } from '../../../../wc-api/constants';
+import withSelect from '../../../../wc-api/with-select';
import { getUnreadNotesCount, hasValidNotes } from './utils';
const renderEmptyCard = () => (
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/orders.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/orders.js
index 709c1d81957..e509f76e77a 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/orders.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/orders.js
@@ -10,9 +10,6 @@ import PropTypes from 'prop-types';
import interpolateComponents from 'interpolate-components';
import { keyBy, map, merge } from 'lodash';
-/**
- * WooCommerce dependencies
- */
import {
EmptyContent,
Flag,
@@ -30,11 +27,11 @@ import { SETTINGS_STORE_NAME } from '@woocommerce/data';
import { ActivityCard, ActivityCardPlaceholder } from '../activity-card';
import ActivityHeader from '../activity-header';
import ActivityOutboundLink from '../activity-outbound-link';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import { DEFAULT_ACTIONABLE_STATUSES } from 'analytics/settings/config';
-import withSelect from 'wc-api/with-select';
-import { CurrencyContext } from 'lib/currency-context';
-import { recordEvent } from 'lib/tracks';
+import { QUERY_DEFAULTS } from '../../../wc-api/constants';
+import { DEFAULT_ACTIONABLE_STATUSES } from '../../../analytics/settings/config';
+import withSelect from '../../../wc-api/with-select';
+import { CurrencyContext } from '../../../lib/currency-context';
+import { recordEvent } from '../../../lib/tracks';
class OrdersPanel extends Component {
recordOrderEvent( eventName ) {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js
index 85d248418d5..00c387c0022 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js
@@ -10,9 +10,6 @@ import interpolateComponents from 'interpolate-components';
import { get, isNull } from 'lodash';
import PropTypes from 'prop-types';
-/**
- * WooCommerce dependencies
- */
import {
EmptyContent,
Gravatar,
@@ -29,10 +26,10 @@ import { REVIEWS_STORE_NAME } from '@woocommerce/data';
*/
import { ActivityCard, ActivityCardPlaceholder } from '../activity-card';
import ActivityHeader from '../activity-header';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import sanitizeHTML from 'lib/sanitize-html';
-import withSelect from 'wc-api/with-select';
-import { recordEvent } from 'lib/tracks';
+import { QUERY_DEFAULTS } from '../../../wc-api/constants';
+import sanitizeHTML from '../../../lib/sanitize-html';
+import withSelect from '../../../wc-api/with-select';
+import { recordEvent } from '../../../lib/tracks';
class ReviewsPanel extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/card.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/card.js
index af5d92384f0..a56d333664f 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/card.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/card.js
@@ -9,10 +9,6 @@ import { compose } from '@wordpress/compose';
import { ESCAPE } from '@wordpress/keycodes';
import { get } from 'lodash';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Link, ProductImage } from '@woocommerce/components';
import { getSetting } from '@woocommerce/wc-admin-settings';
@@ -20,7 +16,7 @@ import { getSetting } from '@woocommerce/wc-admin-settings';
* Internal dependencies
*/
import { ActivityCard } from '../../activity-card';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../../lib/tracks';
class ProductStockCard extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/index.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/index.js
index b6a79da7e2c..135bebf1272 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/stock/index.js
@@ -5,10 +5,7 @@ import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
+import Gridicon from 'gridicons';
import { EmptyContent, Section } from '@woocommerce/components';
/**
@@ -16,10 +13,9 @@ import { EmptyContent, Section } from '@woocommerce/components';
*/
import { ActivityCard, ActivityCardPlaceholder } from '../../activity-card';
import ActivityHeader from '../../activity-header';
-import Gridicon from 'gridicons';
import ProductStockCard from './card';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import withSelect from 'wc-api/with-select';
+import { QUERY_DEFAULTS } from '../../../../wc-api/constants';
+import withSelect from '../../../../wc-api/with-select';
class StockPanel extends Component {
renderEmptyCard() {
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/tab/test/index.js b/plugins/woocommerce-admin/client/header/activity-panel/tab/test/index.js
index 9a8e0d05b15..1dd56e1d244 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/tab/test/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/tab/test/index.js
@@ -1,7 +1,13 @@
+/**
+ * External dependencies
+ */
import { render, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom';
import PagesIcon from 'gridicons/dist/pages';
+/**
+ * Internal dependencies
+ */
import { Tab } from '../';
const renderTab = () =>
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/tabs/index.js b/plugins/woocommerce-admin/client/header/activity-panel/tabs/index.js
index 2a7210d624a..bff150f9743 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/tabs/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/tabs/index.js
@@ -1,8 +1,14 @@
+/**
+ * External dependencies
+ */
import { NavigableMenu } from '@wordpress/components';
import { useEffect, useState } from '@wordpress/element';
+/**
+ * Internal dependencies
+ */
import { Tab } from '../tab';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
export const Tabs = ( {
tabs,
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/tabs/test/index.js b/plugins/woocommerce-admin/client/header/activity-panel/tabs/test/index.js
index 2a6bc961693..b0ccd542655 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/tabs/test/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/tabs/test/index.js
@@ -1,11 +1,15 @@
-jest.mock( 'lib/tracks', () => ( { recordEvent: jest.fn() } ) );
-
+/**
+ * External dependencies
+ */
import { render, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom';
-
+/**
+ * Internal dependencies
+ */
import { Tabs } from '../';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../../lib/tracks';
+jest.mock( 'lib/tracks', () => ( { recordEvent: jest.fn() } ) );
const generateTabs = () => {
return [ '0', '1', '2', '3' ].map( ( name ) => ( {
name,
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/unread-indicators.js b/plugins/woocommerce-admin/client/header/activity-panel/unread-indicators.js
index 2d262b57ac7..3b30bb498dc 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/unread-indicators.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/unread-indicators.js
@@ -1,18 +1,18 @@
/**
- * WooCommerce dependencies
+ * External dependencies
*/
import {
SETTINGS_STORE_NAME,
USER_STORE_NAME,
REVIEWS_STORE_NAME,
} from '@woocommerce/data';
+import { getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import { DEFAULT_ACTIONABLE_STATUSES } from 'analytics/settings/config';
-import { getSetting } from '@woocommerce/wc-admin-settings';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
+import { DEFAULT_ACTIONABLE_STATUSES } from '../../analytics/settings/config';
+import { QUERY_DEFAULTS } from '../../wc-api/constants';
import { getUnreadNotesCount } from './panels/inbox/utils';
export function getUnreadNotes( select ) {
diff --git a/plugins/woocommerce-admin/client/header/index.js b/plugins/woocommerce-admin/client/header/index.js
index 9d6f3b81abe..2e6c9d718ad 100644
--- a/plugins/woocommerce-admin/client/header/index.js
+++ b/plugins/woocommerce-admin/client/header/index.js
@@ -6,10 +6,6 @@ import { Component, createRef } from '@wordpress/element';
import classnames from 'classnames';
import { decodeEntities } from '@wordpress/html-entities';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { getNewPath } from '@woocommerce/navigation';
import { Link } from '@woocommerce/components';
import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
@@ -19,7 +15,7 @@ import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
*/
import './style.scss';
import ActivityPanel from './activity-panel';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../lib/tracks';
class Header extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/homescreen/index.js b/plugins/woocommerce-admin/client/homescreen/index.js
index cbd9a2c0e7f..74a9b599424 100644
--- a/plugins/woocommerce-admin/client/homescreen/index.js
+++ b/plugins/woocommerce-admin/client/homescreen/index.js
@@ -5,9 +5,6 @@ import { compose } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';
import { identity } from 'lodash';
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import {
ONBOARDING_STORE_NAME,
@@ -18,8 +15,7 @@ import { getHistory, getNewPath } from '@woocommerce/navigation';
/**
* Internal dependencies
*/
-import { isOnboardingEnabled } from 'dashboard/utils';
-
+import { isOnboardingEnabled } from '../dashboard/utils';
import Layout from './layout';
const Homescreen = ( { profileItems, query } ) => {
diff --git a/plugins/woocommerce-admin/client/homescreen/layout.js b/plugins/woocommerce-admin/client/homescreen/layout.js
index 19dcaffe57d..aaffc47cf37 100644
--- a/plugins/woocommerce-admin/client/homescreen/layout.js
+++ b/plugins/woocommerce-admin/client/homescreen/layout.js
@@ -13,10 +13,6 @@ import { compose } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
import classnames from 'classnames';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
/**
@@ -26,10 +22,10 @@ import QuickLinks from '../quick-links';
import StatsOverview from './stats-overview';
import './style.scss';
import '../dashboard/style.scss';
-import { isOnboardingEnabled } from 'dashboard/utils';
+import { isOnboardingEnabled } from '../dashboard/utils';
import TaskListPlaceholder from '../task-list/placeholder';
import InboxPanel from '../header/activity-panel/panels/inbox';
-import withWCApiSelect from 'wc-api/with-select';
+import withWCApiSelect from '../wc-api/with-select';
import { WelcomeModal } from './welcome-modal';
const TaskList = lazy( () =>
diff --git a/plugins/woocommerce-admin/client/homescreen/stats-overview/index.js b/plugins/woocommerce-admin/client/homescreen/stats-overview/index.js
index 9cf2465c637..02a2309d536 100644
--- a/plugins/woocommerce-admin/client/homescreen/stats-overview/index.js
+++ b/plugins/woocommerce-admin/client/homescreen/stats-overview/index.js
@@ -13,9 +13,6 @@ import {
} from '@wordpress/components';
import { get, xor } from 'lodash';
-/**
- * WooCommerce dependencies
- */
import {
EllipsisMenu,
MenuItem,
@@ -32,7 +29,7 @@ import { getNewPath } from '@woocommerce/navigation';
import './style.scss';
import { DEFAULT_STATS, DEFAULT_HIDDEN_STATS } from './defaults';
import StatsList from './stats-list';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
import InstallJetpackCta from './install-jetpack-cta';
const { performanceIndicators } = getSetting( 'dataEndpoints', {
diff --git a/plugins/woocommerce-admin/client/homescreen/stats-overview/install-jetpack-cta.js b/plugins/woocommerce-admin/client/homescreen/stats-overview/install-jetpack-cta.js
index 6802d460536..f097d8655ec 100644
--- a/plugins/woocommerce-admin/client/homescreen/stats-overview/install-jetpack-cta.js
+++ b/plugins/woocommerce-admin/client/homescreen/stats-overview/install-jetpack-cta.js
@@ -8,9 +8,6 @@ import { useState } from 'react';
import PropTypes from 'prop-types';
import { withDispatch, withSelect } from '@wordpress/data';
-/**
- * WooCommerce dependencies
- */
import {
__experimentalResolveSelect,
PLUGINS_STORE_NAME,
@@ -22,8 +19,8 @@ import { getAdminLink } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
-import { createNoticesFromResponse } from 'lib/notices';
+import { recordEvent } from '../../lib/tracks';
+import { createNoticesFromResponse } from '../../lib/notices';
function InstallJetpackCta( {
getJetpackConnectUrl,
diff --git a/plugins/woocommerce-admin/client/homescreen/stats-overview/stats-list.js b/plugins/woocommerce-admin/client/homescreen/stats-overview/stats-list.js
index 79e2502f28c..b10f7f81b47 100644
--- a/plugins/woocommerce-admin/client/homescreen/stats-overview/stats-list.js
+++ b/plugins/woocommerce-admin/client/homescreen/stats-overview/stats-list.js
@@ -5,9 +5,6 @@ import { useContext } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
-/**
- * WooCommerce dependencies
- */
import {
SummaryNumber,
SummaryNumberPlaceholder,
@@ -17,13 +14,13 @@ import { getPersistedQuery } from '@woocommerce/navigation';
/**
* Internal dependencies
*/
-import withSelect from 'wc-api/with-select';
-import { recordEvent } from 'lib/tracks';
-import { CurrencyContext } from 'lib/currency-context';
+import withSelect from '../../wc-api/with-select';
+import { recordEvent } from '../../lib/tracks';
+import { CurrencyContext } from '../../lib/currency-context';
import {
getIndicatorData,
getIndicatorValues,
-} from 'dashboard/store-performance/utils';
+} from '../../dashboard/store-performance/utils';
export const StatsList = ( {
stats,
diff --git a/plugins/woocommerce-admin/client/homescreen/stats-overview/test/index.js b/plugins/woocommerce-admin/client/homescreen/stats-overview/test/index.js
index f7c612c1333..a1ec1a34541 100644
--- a/plugins/woocommerce-admin/client/homescreen/stats-overview/test/index.js
+++ b/plugins/woocommerce-admin/client/homescreen/stats-overview/test/index.js
@@ -2,13 +2,14 @@
* External dependencies
*/
import { render, fireEvent, screen, waitFor } from '@testing-library/react';
+import { useUserPreferences } from '@woocommerce/data';
/**
* Internal dependencies
*/
import { StatsOverview } from '../index';
import StatsList from '../stats-list';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
jest.mock( 'lib/tracks' );
// Mock the stats list so that it can be tested separately.
@@ -22,7 +23,6 @@ jest.mock( '../install-jetpack-cta', () => {
.mockImplementation( () =>
mocked install jetpack cta
);
} );
-import { useUserPreferences } from '@woocommerce/data';
jest.mock( '@woocommerce/data' );
describe( 'StatsOverview tracking', () => {
diff --git a/plugins/woocommerce-admin/client/homescreen/stats-overview/test/stats-list.js b/plugins/woocommerce-admin/client/homescreen/stats-overview/test/stats-list.js
index c59e8f43b7e..98985501854 100644
--- a/plugins/woocommerce-admin/client/homescreen/stats-overview/test/stats-list.js
+++ b/plugins/woocommerce-admin/client/homescreen/stats-overview/test/stats-list.js
@@ -7,7 +7,7 @@ import { render, screen, fireEvent } from '@testing-library/react';
* Internal dependencies
*/
import { StatsList } from '../stats-list';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
jest.mock( 'lib/tracks' );
diff --git a/plugins/woocommerce-admin/client/homescreen/test/index.js b/plugins/woocommerce-admin/client/homescreen/test/index.js
index 04cbadbdd22..6b00a452b3b 100644
--- a/plugins/woocommerce-admin/client/homescreen/test/index.js
+++ b/plugins/woocommerce-admin/client/homescreen/test/index.js
@@ -2,6 +2,10 @@
* External dependencies
*/
import { render, screen } from '@testing-library/react';
+
+/**
+ * Internal dependencies
+ */
import { Layout } from '../layout';
// Rendering breaks tests.
diff --git a/plugins/woocommerce-admin/client/homescreen/welcome-modal/index.js b/plugins/woocommerce-admin/client/homescreen/welcome-modal/index.js
index 581ec689f56..0d14f56ca90 100644
--- a/plugins/woocommerce-admin/client/homescreen/welcome-modal/index.js
+++ b/plugins/woocommerce-admin/client/homescreen/welcome-modal/index.js
@@ -8,7 +8,7 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
import { LineChartIllustration } from './illustrations/line-chart';
import { InboxIllustration } from './illustrations/inbox';
import { PieChartIllustration } from './illustrations/pie-chart';
diff --git a/plugins/woocommerce-admin/client/homescreen/welcome-modal/test/index.js b/plugins/woocommerce-admin/client/homescreen/welcome-modal/test/index.js
index c12ef7a4255..aa98a2d0b52 100644
--- a/plugins/woocommerce-admin/client/homescreen/welcome-modal/test/index.js
+++ b/plugins/woocommerce-admin/client/homescreen/welcome-modal/test/index.js
@@ -8,7 +8,7 @@ import '@testing-library/jest-dom';
* Internal dependencies
*/
import { WelcomeModal } from '../index';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
jest.mock( 'lib/tracks', () => ( { recordEvent: jest.fn() } ) );
diff --git a/plugins/woocommerce-admin/client/index.js b/plugins/woocommerce-admin/client/index.js
index 50029ac8509..ceb96b9ce8b 100644
--- a/plugins/woocommerce-admin/client/index.js
+++ b/plugins/woocommerce-admin/client/index.js
@@ -3,17 +3,17 @@
*/
import '@wordpress/notices';
import { render } from '@wordpress/element';
+import {
+ withCurrentUserHydration,
+ withSettingsHydration,
+} from '@woocommerce/data';
/**
* Internal dependencies
*/
import './stylesheets/_index.scss';
import { PageLayout, EmbedLayout, PrimaryLayout as NoticeArea } from './layout';
-import 'wc-api/wp-data-store';
-import {
- withCurrentUserHydration,
- withSettingsHydration,
-} from '@woocommerce/data';
+import './wc-api/wp-data-store';
// Modify webpack pubilcPath at runtime based on location of WordPress Plugin.
// eslint-disable-next-line no-undef,camelcase
diff --git a/plugins/woocommerce-admin/client/layout/controller.js b/plugins/woocommerce-admin/client/layout/controller.js
index b4ffbae2a80..ced9494a047 100644
--- a/plugins/woocommerce-admin/client/layout/controller.js
+++ b/plugins/woocommerce-admin/client/layout/controller.js
@@ -6,10 +6,6 @@ import { parse, stringify } from 'qs';
import { find, isEqual, last, omit } from 'lodash';
import { applyFilters } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
-
-/**
- * WooCommerce dependencies
- */
import {
getNewPath,
getPersistedQuery,
@@ -20,31 +16,35 @@ import { Spinner } from '@woocommerce/components';
/**
* Internal dependencies
*/
-import { getUrlParams } from 'utils';
+import { getUrlParams } from '../utils';
+import getReports from '../analytics/report/get-reports';
+import { isWCAdmin } from '../dashboard/utils';
const AnalyticsReport = lazy( () =>
- import( /* webpackChunkName: "analytics-report" */ 'analytics/report' )
+ import( /* webpackChunkName: "analytics-report" */ '../analytics/report' )
);
const AnalyticsSettings = lazy( () =>
- import( /* webpackChunkName: "analytics-settings" */ 'analytics/settings' )
+ import(
+ /* webpackChunkName: "analytics-settings" */ '../analytics/settings'
+ )
);
const Dashboard = lazy( () =>
- import( /* webpackChunkName: "dashboard" */ 'dashboard' )
+ import( /* webpackChunkName: "dashboard" */ '../dashboard' )
);
const DevDocs = lazy( () =>
- import( /* webpackChunkName: "devdocs" */ 'devdocs' )
+ import( /* webpackChunkName: "devdocs" */ '../devdocs' )
);
const Homescreen = lazy( () =>
- import( /* webpackChunkName: "homescreen" */ 'homescreen' )
+ import( /* webpackChunkName: "homescreen" */ '../homescreen' )
);
const MarketingOverview = lazy( () =>
- import( /* webpackChunkName: "marketing-overview" */ 'marketing/overview' )
+ import(
+ /* webpackChunkName: "marketing-overview" */ '../marketing/overview'
+ )
);
const ProfileWizard = lazy( () =>
- import( /* webpackChunkName: "profile-wizard" */ 'profile-wizard' )
+ import( /* webpackChunkName: "profile-wizard" */ '../profile-wizard' )
);
-import getReports from 'analytics/report/get-reports';
-import { isWCAdmin } from 'dashboard/utils';
const TIME_EXCLUDED_SCREENS_FILTER = 'woocommerce_admin_time_excluded_screens';
diff --git a/plugins/woocommerce-admin/client/layout/index.js b/plugins/woocommerce-admin/client/layout/index.js
index 42dd8b8f2fe..400838caf5a 100644
--- a/plugins/woocommerce-admin/client/layout/index.js
+++ b/plugins/woocommerce-admin/client/layout/index.js
@@ -8,10 +8,6 @@ import { Router, Route, Switch } from 'react-router-dom';
import PropTypes from 'prop-types';
import { get, isFunction, identity } from 'lodash';
import { parse } from 'qs';
-
-/**
- * WooCommerce dependencies
- */
import { useFilters, Spinner } from '@woocommerce/components';
import { getHistory } from '@woocommerce/navigation';
import { getSetting } from '@woocommerce/wc-admin-settings';
@@ -26,14 +22,15 @@ import {
*/
import './style.scss';
import { Controller, getPages, PAGES_FILTER } from './controller';
-import Header from 'header';
+import Header from '../header';
import Notices from './notices';
-import { recordPageView } from 'lib/tracks';
+import { recordPageView } from '../lib/tracks';
import TransientNotices from './transient-notices';
+import { REPORTS_FILTER } from '../analytics/report';
+
const StoreAlerts = lazy( () =>
import( /* webpackChunkName: "store-alerts" */ './store-alerts' )
);
-import { REPORTS_FILTER } from 'analytics/report';
export class PrimaryLayout extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/layout/store-alerts/index.js b/plugins/woocommerce-admin/client/layout/store-alerts/index.js
index 87007acc7cb..4bd5fc4f902 100644
--- a/plugins/woocommerce-admin/client/layout/store-alerts/index.js
+++ b/plugins/woocommerce-admin/client/layout/store-alerts/index.js
@@ -10,21 +10,17 @@ import { compose } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
import moment from 'moment';
import { Icon, chevronLeft, chevronRight } from '@wordpress/icons';
-
-/**
- * WooCommerce dependencies
- */
import { Card } from '@woocommerce/components';
import { getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import withSelect from 'wc-api/with-select';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import sanitizeHTML from 'lib/sanitize-html';
+import withSelect from '../../wc-api/with-select';
+import { QUERY_DEFAULTS } from '../../wc-api/constants';
+import sanitizeHTML from '../../lib/sanitize-html';
import StoreAlertsPlaceholder from './placeholder';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
import './style.scss';
diff --git a/plugins/woocommerce-admin/client/layout/transient-notices/index.js b/plugins/woocommerce-admin/client/layout/transient-notices/index.js
index b46047a174c..639e2f44d9a 100644
--- a/plugins/woocommerce-admin/client/layout/transient-notices/index.js
+++ b/plugins/woocommerce-admin/client/layout/transient-notices/index.js
@@ -12,7 +12,7 @@ import { withDispatch } from '@wordpress/data';
* Internal dependencies
*/
import './style.scss';
-import withSelect from 'wc-api/with-select';
+import withSelect from '../../wc-api/with-select';
class TransientNotices extends Component {
render() {
diff --git a/plugins/woocommerce-admin/client/lib/async-requests/index.js b/plugins/woocommerce-admin/client/lib/async-requests/index.js
index e6610bd38ec..6ca10612762 100644
--- a/plugins/woocommerce-admin/client/lib/async-requests/index.js
+++ b/plugins/woocommerce-admin/client/lib/async-requests/index.js
@@ -4,17 +4,13 @@
import { addQueryArgs } from '@wordpress/url';
import apiFetch from '@wordpress/api-fetch';
import { identity } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getIdsFromQuery } from '@woocommerce/navigation';
/**
* Internal dependencies
*/
-import { getTaxCode } from 'analytics/report/taxes/utils';
-import { NAMESPACE } from 'wc-api/constants';
+import { getTaxCode } from '../../analytics/report/taxes/utils';
+import { NAMESPACE } from '../../wc-api/constants';
/**
* Get a function that accepts ids as they are found in url parameter and
diff --git a/plugins/woocommerce-admin/client/lib/currency-context.js b/plugins/woocommerce-admin/client/lib/currency-context.js
index 852d2c8cdc7..67879a7b66a 100644
--- a/plugins/woocommerce-admin/client/lib/currency-context.js
+++ b/plugins/woocommerce-admin/client/lib/currency-context.js
@@ -3,15 +3,7 @@
*/
import { createContext } from '@wordpress/element';
import { applyFilters } from '@wordpress/hooks';
-
-/**
- * WooCommerce dependencies
- */
import CurrencyFactory from '@woocommerce/currency';
-
-/**
- * Internal dependencies
- */
import { CURRENCY } from '@woocommerce/wc-admin-settings';
const appCurrency = CurrencyFactory( CURRENCY );
diff --git a/plugins/woocommerce-admin/client/lib/date.js b/plugins/woocommerce-admin/client/lib/date.js
index 445d7af1de4..6204c901494 100644
--- a/plugins/woocommerce-admin/client/lib/date.js
+++ b/plugins/woocommerce-admin/client/lib/date.js
@@ -1,14 +1,6 @@
/**
* External dependencies
*/
-
-/**
- * Internal dependencies
- */
-
-/**
- * WooCommerce dependencies
- */
import {
isoDateFormat,
presetValues,
diff --git a/plugins/woocommerce-admin/client/lib/in-app-purchase.js b/plugins/woocommerce-admin/client/lib/in-app-purchase.js
index 7c8596019c2..f1406741e89 100644
--- a/plugins/woocommerce-admin/client/lib/in-app-purchase.js
+++ b/plugins/woocommerce-admin/client/lib/in-app-purchase.js
@@ -2,10 +2,6 @@
* External dependencies
*/
import { addQueryArgs } from '@wordpress/url';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
/**
diff --git a/plugins/woocommerce-admin/client/marketing/components/knowledge-base/index.js b/plugins/woocommerce-admin/client/marketing/components/knowledge-base/index.js
index 7df3f933bea..1627cf96370 100644
--- a/plugins/woocommerce-admin/client/marketing/components/knowledge-base/index.js
+++ b/plugins/woocommerce-admin/client/marketing/components/knowledge-base/index.js
@@ -7,12 +7,7 @@ import { Spinner } from '@wordpress/components';
import classNames from 'classnames';
import { withDispatch, withSelect } from '@wordpress/data';
import { useState } from '@wordpress/element';
-import { recordEvent } from 'lib/tracks';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Card, Pagination, EmptyContent } from '@woocommerce/components';
/**
@@ -21,6 +16,7 @@ import { Card, Pagination, EmptyContent } from '@woocommerce/components';
import './style.scss';
import { Slider } from '../../components';
import { STORE_KEY } from '../../data/constants';
+import { recordEvent } from '../../../lib/tracks';
const KnowledgeBase = ( {
posts,
diff --git a/plugins/woocommerce-admin/client/marketing/components/knowledge-base/test/index.js b/plugins/woocommerce-admin/client/marketing/components/knowledge-base/test/index.js
index db58d43acc8..e348d6930cd 100644
--- a/plugins/woocommerce-admin/client/marketing/components/knowledge-base/test/index.js
+++ b/plugins/woocommerce-admin/client/marketing/components/knowledge-base/test/index.js
@@ -2,17 +2,13 @@
* External dependencies
*/
import { shallow, mount } from 'enzyme';
-import { recordEvent } from 'lib/tracks';
import { Spinner } from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
import { Card, Pagination, EmptyContent } from '@woocommerce/components';
/**
* Internal dependencies
*/
+import { recordEvent } from '../../../../lib/tracks';
import { KnowledgeBase } from '../index.js';
import Slider from '../../slider';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/amazon-ebay.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/amazon-ebay.js
index b9dcd0555bc..c0c9b8151c9 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/amazon-ebay.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/amazon-ebay.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo-alt.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo-alt.js
index ee2d3b9b2a0..1651837385e 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo-alt.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo-alt.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo.js
index 904c626a561..66e38c344ad 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/automatewoo.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/blank.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/blank.js
index 4ce7936b64a..e4cc1ad694f 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/blank.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/blank.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/currency-dollar.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/currency-dollar.js
index a93d2037346..ffea40ccbb1 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/currency-dollar.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/currency-dollar.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { Path, SVG } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/facebook.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/facebook.js
index 6be89bab6b8..e1b591328b2 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/facebook.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/facebook.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/gift.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/gift.js
index dc7be2ac326..cd48402dae3 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/gift.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/gift.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/google.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/google.js
index 2725b86abc8..95fd9b43e6b 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/google.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/google.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/hubspot.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/hubspot.js
index 32253f0a047..f4540c75381 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/hubspot.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/hubspot.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/link.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/link.js
index 48375903deb..a65bdf7f68e 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/link.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/link.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/mailchimp.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/mailchimp.js
index be64a8dd13f..a39f3284adb 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/mailchimp.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/mailchimp.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/people.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/people.js
index a521af10f3b..62c210d3f72 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/people.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/people.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/tip.js b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/tip.js
index d76c6ae1ea9..f38f2374b41 100644
--- a/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/tip.js
+++ b/plugins/woocommerce-admin/client/marketing/components/product-icon/icons/library/tip.js
@@ -1,5 +1,5 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
import { SVG, Path } from '@wordpress/primitives';
diff --git a/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/index.js b/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/index.js
index 8d5444d08bc..be4ed5a005e 100644
--- a/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/index.js
+++ b/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/index.js
@@ -8,10 +8,6 @@ import { Spinner } from '@wordpress/components';
import classnames from 'classnames';
import { withDispatch, withSelect } from '@wordpress/data';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Card } from '@woocommerce/components';
/**
diff --git a/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/item.js b/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/item.js
index e34c67b2512..73ffb95ca10 100644
--- a/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/item.js
+++ b/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/item.js
@@ -8,8 +8,8 @@ import PropTypes from 'prop-types';
*/
import './style.scss';
import { ProductIcon } from '../../components/';
-import { recordEvent } from 'lib/tracks';
-import { getInAppPurchaseUrl } from 'lib/in-app-purchase';
+import { recordEvent } from '../../../lib/tracks';
+import { getInAppPurchaseUrl } from '../../../lib/in-app-purchase';
const RecommendedExtensionsItem = ( {
title,
diff --git a/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/test/index.js b/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/test/index.js
index 157918a774b..f31e3dbbbe7 100644
--- a/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/test/index.js
+++ b/plugins/woocommerce-admin/client/marketing/components/recommended-extensions/test/index.js
@@ -2,17 +2,13 @@
* External dependencies
*/
import { shallow } from 'enzyme';
-import { recordEvent } from 'lib/tracks';
import { Spinner } from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
import { Card } from '@woocommerce/components';
/**
* Internal dependencies
*/
+import { recordEvent } from '../../../../lib/tracks';
import { RecommendedExtensions } from '../index.js';
import RecommendedExtensionsItem from '../item.js';
diff --git a/plugins/woocommerce-admin/client/marketing/coupons/index.js b/plugins/woocommerce-admin/client/marketing/coupons/index.js
index c25a1892c79..aed2b11c6b6 100644
--- a/plugins/woocommerce-admin/client/marketing/coupons/index.js
+++ b/plugins/woocommerce-admin/client/marketing/coupons/index.js
@@ -1,11 +1,7 @@
/**
- * External depenencies
+ * External dependencies
*/
import { __ } from '@wordpress/i18n';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
/**
diff --git a/plugins/woocommerce-admin/client/marketing/data/actions.js b/plugins/woocommerce-admin/client/marketing/data/actions.js
index 2c145aac9a5..746cdca2a38 100644
--- a/plugins/woocommerce-admin/client/marketing/data/actions.js
+++ b/plugins/woocommerce-admin/client/marketing/data/actions.js
@@ -3,12 +3,12 @@
*/
import { apiFetch } from '@wordpress/data-controls';
import { dispatch } from '@wordpress/data';
+import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { API_NAMESPACE } from './constants';
-import { __ } from '@wordpress/i18n';
export function receiveInstalledPlugins( plugins ) {
return {
diff --git a/plugins/woocommerce-admin/client/marketing/overview/index.js b/plugins/woocommerce-admin/client/marketing/overview/index.js
index 59d55441160..5b8e90e988a 100644
--- a/plugins/woocommerce-admin/client/marketing/overview/index.js
+++ b/plugins/woocommerce-admin/client/marketing/overview/index.js
@@ -1,11 +1,7 @@
/**
- * WooCommerce dependencies
+ * External dependencies
*/
import { getSetting } from '@woocommerce/wc-admin-settings';
-
-/**
- * WooCommerce dependencies
- */
import { withOptionsHydration } from '@woocommerce/data';
/**
diff --git a/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/index.js b/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/index.js
index 2c9c2a8a192..9ace1e8a97e 100644
--- a/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/index.js
+++ b/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/index.js
@@ -6,10 +6,6 @@ import { __ } from '@wordpress/i18n';
import { compose } from '@wordpress/compose';
import { withSelect, withDispatch } from '@wordpress/data';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Card } from '@woocommerce/components';
/**
diff --git a/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/row.js b/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/row.js
index 0aa2e23228e..6323f036868 100644
--- a/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/row.js
+++ b/plugins/woocommerce-admin/client/marketing/overview/installed-extensions/row.js
@@ -4,17 +4,13 @@
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Link } from '@woocommerce/components';
/**
* Internal dependencies
*/
import { Button, ProductIcon } from '../../components';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
class InstalledExtensionRow extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/marketing/overview/welcome-card/index.js b/plugins/woocommerce-admin/client/marketing/overview/welcome-card/index.js
index 1f9c4571edf..f70b4f2368c 100644
--- a/plugins/woocommerce-admin/client/marketing/overview/welcome-card/index.js
+++ b/plugins/woocommerce-admin/client/marketing/overview/welcome-card/index.js
@@ -7,10 +7,6 @@ import Gridicon from 'gridicons';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Card } from '@woocommerce/components';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
@@ -18,7 +14,7 @@ import { OPTIONS_STORE_NAME } from '@woocommerce/data';
* Internal dependencies
*/
import './style.scss';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
import WelcomeImage from './images/welcome.svg';
const WelcomeCard = ( { isHidden, updateOptions } ) => {
diff --git a/plugins/woocommerce-admin/client/marketing/overview/welcome-card/test/index.js b/plugins/woocommerce-admin/client/marketing/overview/welcome-card/test/index.js
index 3a71d8b3ad2..dc5bf69676f 100644
--- a/plugins/woocommerce-admin/client/marketing/overview/welcome-card/test/index.js
+++ b/plugins/woocommerce-admin/client/marketing/overview/welcome-card/test/index.js
@@ -2,12 +2,12 @@
* External dependencies
*/
import { shallow } from 'enzyme';
-import { recordEvent } from 'lib/tracks';
import { Button } from '@wordpress/components';
/**
* Internal dependencies
*/
+import { recordEvent } from '../../../../lib/tracks';
import { WelcomeCard } from '../index.js';
jest.mock( 'lib/tracks' );
diff --git a/plugins/woocommerce-admin/client/profile-wizard/header.js b/plugins/woocommerce-admin/client/profile-wizard/header.js
index e0d2cee6eb0..78c2bffa165 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/header.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/header.js
@@ -3,16 +3,8 @@
*/
import { Component } from '@wordpress/element';
import { filter } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
-import { updateQueryString } from '@woocommerce/navigation';
-
-/**
- * Internal dependencies
- */
import { Stepper } from '@woocommerce/components';
+import { updateQueryString } from '@woocommerce/navigation';
export default class ProfileWizardHeader extends Component {
renderStepper() {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/index.js b/plugins/woocommerce-admin/client/profile-wizard/index.js
index fa91b68f12c..9c7a75f302f 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/index.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/index.js
@@ -6,10 +6,6 @@ import { Component, createElement, Fragment } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { identity, pick } from 'lodash';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { getAdminLink } from '@woocommerce/wc-admin-settings';
import {
getHistory,
@@ -29,15 +25,15 @@ import {
*/
import Benefits from './steps/benefits';
import BusinessDetails from './steps/business-details';
-import { createNoticesFromResponse } from 'lib/notices';
+import { createNoticesFromResponse } from '../lib/notices';
import Industry from './steps/industry';
import ProductTypes from './steps/product-types';
import ProfileWizardHeader from './header';
-import { QUERY_DEFAULTS } from 'wc-api/constants';
-import { recordEvent } from 'lib/tracks';
+import { QUERY_DEFAULTS } from '../wc-api/constants';
+import { recordEvent } from '../lib/tracks';
import StoreDetails from './steps/store-details';
import Theme from './steps/theme';
-import withSelect from 'wc-api/with-select';
+import withSelect from '../wc-api/with-select';
import './style.scss';
class ProfileWizard extends Component {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/benefits/index.js b/plugins/woocommerce-admin/client/profile-wizard/steps/benefits/index.js
index adce3d74b6d..3c337d1cd77 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/benefits/index.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/benefits/index.js
@@ -8,10 +8,6 @@ import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
import { filter } from 'lodash';
import interpolateComponents from 'interpolate-components';
-
-/**
- * WooCommerce dependencies
- */
import { Card, H, Link } from '@woocommerce/components';
import {
pluginNames,
@@ -23,13 +19,13 @@ import {
/**
* Internal dependencies
*/
-import { createNoticesFromResponse } from 'lib/notices';
+import { createNoticesFromResponse } from '../../../lib/notices';
import Logo from './logo';
import ManagementIcon from './images/management';
import SalesTaxIcon from './images/sales_tax';
import ShippingLabels from './images/shipping_labels';
import SpeedIcon from './images/speed';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
class Benefits extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/business-details.js b/plugins/woocommerce-admin/client/profile-wizard/steps/business-details.js
index 7f7e9f73657..476e6ea024b 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/business-details.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/business-details.js
@@ -13,10 +13,13 @@ import {
import interpolateComponents from 'interpolate-components';
import { withDispatch, withSelect } from '@wordpress/data';
import { keys, get, pickBy } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
+import {
+ H,
+ Card,
+ SelectControl,
+ Form,
+ TextControl,
+} from '@woocommerce/components';
import { formatValue } from '@woocommerce/number';
import { getSetting } from '@woocommerce/wc-admin-settings';
import {
@@ -29,17 +32,10 @@ import {
/**
* Internal dependencies
*/
-import {
- H,
- Card,
- SelectControl,
- Form,
- TextControl,
-} from '@woocommerce/components';
-import { recordEvent } from 'lib/tracks';
-import { getCountryCode, getCurrencyRegion } from 'dashboard/utils';
-import { CurrencyContext } from 'lib/currency-context';
-import { createNoticesFromResponse } from 'lib/notices';
+import { recordEvent } from '../../lib/tracks';
+import { getCountryCode, getCurrencyRegion } from '../../dashboard/utils';
+import { CurrencyContext } from '../../lib/currency-context';
+import { createNoticesFromResponse } from '../../lib/notices';
const wcAdminAssetUrl = getSetting( 'wcAdminAssetUrl', '' );
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/industry.js b/plugins/woocommerce-admin/client/profile-wizard/steps/industry.js
index 63e13ff9628..6b25abb2855 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/industry.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/industry.js
@@ -7,20 +7,16 @@ import { Button, CheckboxControl } from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { filter, find, findIndex, get } from 'lodash';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce Dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import { ONBOARDING_STORE_NAME, SETTINGS_STORE_NAME } from '@woocommerce/data';
+import { H, Card, TextControl } from '@woocommerce/components';
/**
* Internal dependencies
*/
-import { H, Card, TextControl } from '@woocommerce/components';
-import { getCurrencyRegion } from 'dashboard/utils';
-import withSelect from 'wc-api/with-select';
-import { recordEvent } from 'lib/tracks';
+import { getCurrencyRegion } from '../../dashboard/utils';
+import withSelect from '../../wc-api/with-select';
+import { recordEvent } from '../../lib/tracks';
const onboarding = getSetting( 'onboarding', {} );
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/product-types.js b/plugins/woocommerce-admin/client/profile-wizard/steps/product-types.js
index 58e8ca9269b..4a3886a67e7 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/product-types.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/product-types.js
@@ -8,10 +8,6 @@ import { Button, CheckboxControl, Tooltip } from '@wordpress/components';
import { includes, filter, get } from 'lodash';
import interpolateComponents from 'interpolate-components';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import { H, Card, Link, Pill } from '@woocommerce/components';
import { ONBOARDING_STORE_NAME } from '@woocommerce/data';
@@ -19,7 +15,7 @@ import { ONBOARDING_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
import './product-types.scss';
function getLabel( description, yearlyPrice ) {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/store-details.js b/plugins/woocommerce-admin/client/profile-wizard/steps/store-details.js
index ec182f997b3..9c1dc675fe6 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/store-details.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/store-details.js
@@ -16,10 +16,6 @@ import {
import { Component, Fragment } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { H, Form } from '@woocommerce/components';
import { getCurrencyData } from '@woocommerce/currency';
import { ONBOARDING_STORE_NAME, SETTINGS_STORE_NAME } from '@woocommerce/data';
@@ -27,14 +23,14 @@ import { ONBOARDING_STORE_NAME, SETTINGS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { getCountryCode, getCurrencyRegion } from 'dashboard/utils';
+import { getCountryCode, getCurrencyRegion } from '../../dashboard/utils';
import {
StoreAddress,
validateStoreAddress,
-} from 'dashboard/components/settings/general/store-address';
+} from '../../dashboard/components/settings/general/store-address';
import UsageModal from './usage-modal';
-import { CurrencyContext } from 'lib/currency-context';
-import { recordEvent } from 'lib/tracks';
+import { CurrencyContext } from '../../lib/currency-context';
+import { recordEvent } from '../../lib/tracks';
class StoreDetails extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js
index e7af60ff459..05ff7eaa682 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/index.js
@@ -9,10 +9,6 @@ import { decodeEntities } from '@wordpress/html-entities';
import Gridicon from 'gridicons';
import { Button, TabPanel, Tooltip } from '@wordpress/components';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Card, H } from '@woocommerce/components';
import { getSetting, setSetting } from '@woocommerce/wc-admin-settings';
import { ONBOARDING_STORE_NAME } from '@woocommerce/data';
@@ -20,12 +16,12 @@ import { ONBOARDING_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import withSelect from 'wc-api/with-select';
+import withSelect from '../../../wc-api/with-select';
import './style.scss';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
import ThemeUploader from './uploader';
import ThemePreview from './preview';
-import { getPriceValue } from 'dashboard/utils';
+import { getPriceValue } from '../../../dashboard/utils';
class Theme extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/preview.js b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/preview.js
index 36615b746a7..de0ecb8af1a 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/preview.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/preview.js
@@ -6,16 +6,12 @@ import { Button } from '@wordpress/components';
import classnames from 'classnames';
import { Component } from '@wordpress/element';
import interpolateComponents from 'interpolate-components';
-
-/**
- * WooCommerce dependencies
- */
import { WebPreview } from '@woocommerce/components';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
const devices = [
{
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/uploader.js b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/uploader.js
index 35a4cff359c..afeb32c2f3f 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/theme/uploader.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/theme/uploader.js
@@ -15,10 +15,6 @@ import Gridicon from 'gridicons';
import { noop } from 'lodash';
import PropTypes from 'prop-types';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Card, H, Spinner } from '@woocommerce/components';
class ThemeUploader extends Component {
diff --git a/plugins/woocommerce-admin/client/profile-wizard/steps/usage-modal.js b/plugins/woocommerce-admin/client/profile-wizard/steps/usage-modal.js
index 8f84d9dad2d..900e699586a 100644
--- a/plugins/woocommerce-admin/client/profile-wizard/steps/usage-modal.js
+++ b/plugins/woocommerce-admin/client/profile-wizard/steps/usage-modal.js
@@ -12,16 +12,8 @@ import {
FormToggle,
Modal,
} from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
-import { OPTIONS_STORE_NAME } from '@woocommerce/data';
-
-/**
- * Internal dependencies
- */
import { Link } from '@woocommerce/components';
+import { OPTIONS_STORE_NAME } from '@woocommerce/data';
class UsageModal extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/quick-links/index.js b/plugins/woocommerce-admin/client/quick-links/index.js
index f6578ea60a2..c2d2665e33e 100644
--- a/plugins/woocommerce-admin/client/quick-links/index.js
+++ b/plugins/woocommerce-admin/client/quick-links/index.js
@@ -22,17 +22,13 @@ import {
external,
} from '@wordpress/icons';
import { partial } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import { List } from '@woocommerce/components';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../lib/tracks';
import './style.scss';
function getItems( props ) {
diff --git a/plugins/woocommerce-admin/client/task-list/index.js b/plugins/woocommerce-admin/client/task-list/index.js
index ffb357356f1..769ab8292c9 100644
--- a/plugins/woocommerce-admin/client/task-list/index.js
+++ b/plugins/woocommerce-admin/client/task-list/index.js
@@ -15,10 +15,6 @@ import {
import { withDispatch, withSelect } from '@wordpress/data';
import { Icon, check, chevronRight } from '@wordpress/icons';
import { xor } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { List, EllipsisMenu } from '@woocommerce/components';
import { updateQueryString } from '@woocommerce/navigation';
import {
@@ -32,10 +28,10 @@ import {
* Internal dependencies
*/
import './style.scss';
-import CartModal from 'dashboard/components/cart-modal';
+import CartModal from '../dashboard/components/cart-modal';
import { getAllTasks, recordTaskViewEvent } from './tasks';
-import { getCountryCode } from 'dashboard/utils';
-import { recordEvent } from 'lib/tracks';
+import { getCountryCode } from '../dashboard/utils';
+import { recordEvent } from '../lib/tracks';
class TaskDashboard extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks.js b/plugins/woocommerce-admin/client/task-list/tasks.js
index 024f619b24c..20b98e2cffb 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks.js
@@ -4,10 +4,6 @@
import { __, sprintf } from '@wordpress/i18n';
import { applyFilters } from '@wordpress/hooks';
-
-/**
- * WooCommerce dependencies
- */
import { getSetting } from '@woocommerce/wc-admin-settings';
import {
getHistory,
@@ -20,13 +16,13 @@ import { Fragment } from '@wordpress/element';
* Internal dependencies
*/
import Appearance from './tasks/appearance';
-import { getCategorizedOnboardingProducts } from 'dashboard/utils';
+import { getCategorizedOnboardingProducts } from '../dashboard/utils';
import Products from './tasks/products';
import Shipping from './tasks/shipping';
import Tax from './tasks/tax';
import Payments from './tasks/payments';
import { installActivateAndConnectWcpay } from './tasks/payments/methods';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../lib/tracks';
export function recordTaskViewEvent(
taskName,
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/appearance.js b/plugins/woocommerce-admin/client/task-list/tasks/appearance.js
index e64a3b8f163..328e809297f 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/appearance.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/appearance.js
@@ -9,9 +9,6 @@ import { compose } from '@wordpress/compose';
import { filter } from 'lodash';
import { withDispatch, withSelect } from '@wordpress/data';
-/**
- * WooCommerce dependencies
- */
import {
Card,
Stepper,
@@ -25,8 +22,8 @@ import { OPTIONS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { queueRecordEvent, recordEvent } from 'lib/tracks';
-import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
+import { queueRecordEvent, recordEvent } from '../../lib/tracks';
+import { WC_ADMIN_NAMESPACE } from '../../wc-api/constants';
class Appearance extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/connect.js b/plugins/woocommerce-admin/client/task-list/tasks/connect.js
index 787333ac76a..050c2e8dd24 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/connect.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/connect.js
@@ -7,18 +7,14 @@ import { compose } from '@wordpress/compose';
import apiFetch from '@wordpress/api-fetch';
import { withDispatch } from '@wordpress/data';
import { omit } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { getHistory, getNewPath } from '@woocommerce/navigation';
import { ONBOARDING_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
-import withSelect from 'wc-api/with-select';
+import { WC_ADMIN_NAMESPACE } from '../../wc-api/constants';
+import withSelect from '../../wc-api/with-select';
class Connect extends Component {
componentDidMount() {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/bacs.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/bacs.js
index 347605a4b30..d4a759e90a8 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/bacs.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/bacs.js
@@ -6,10 +6,6 @@ import { Component, Fragment } from '@wordpress/element';
import { Button } from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Form, H, TextControl } from '@woocommerce/components';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/eway.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/eway.js
index de1373db4ef..9d5ed47d251 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/eway.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/eway.js
@@ -7,10 +7,6 @@ import { Button } from '@wordpress/components';
import interpolateComponents from 'interpolate-components';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Form, Link, Stepper, TextControl } from '@woocommerce/components';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js
index bdf0f48b3a4..757eac2ca07 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js
@@ -7,10 +7,6 @@ import { cloneElement, Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { Button, FormToggle } from '@wordpress/components';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Card, H, Plugins } from '@woocommerce/components';
import {
getHistory,
@@ -29,9 +25,9 @@ import {
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
-import { getCountryCode } from 'dashboard/utils';
-import withSelect from 'wc-api/with-select';
+import { recordEvent } from '../../../lib/tracks';
+import { getCountryCode } from '../../../dashboard/utils';
+import withSelect from '../../../wc-api/with-select';
import { getPaymentMethods } from './methods';
class Payments extends Component {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/klarna.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/klarna.js
index 70a83a8fc21..cc108762fc5 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/klarna.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/klarna.js
@@ -5,10 +5,6 @@ import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { Button } from '@wordpress/components';
import interpolateComponents from 'interpolate-components';
-
-/**
- * WooCommerce dependencies
- */
import { ADMIN_URL as adminUrl } from '@woocommerce/wc-admin-settings';
import { Link, Stepper } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/methods.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/methods.js
index 83bebbe47ba..1f5548b05c3 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/methods.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/methods.js
@@ -1,23 +1,22 @@
/**
* External dependencies
*/
-
import { __ } from '@wordpress/i18n';
import apiFetch from '@wordpress/api-fetch';
import { Fragment } from '@wordpress/element';
import { filter, some } from 'lodash';
import interpolateComponents from 'interpolate-components';
-
-/**
- * WooCommerce dependencies
- */
import {
getSetting,
getAdminLink,
WC_ASSET_URL as wcAssetUrl,
} from '@woocommerce/wc-admin-settings';
import { Link } from '@woocommerce/components';
-import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
+
+/**
+ * Internal dependencies
+ */
+import { WC_ADMIN_NAMESPACE } from '../../../wc-api/constants';
/**
* Internal dependencies
@@ -25,7 +24,7 @@ import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
import Bacs from './bacs';
import BacsIcon from './images/bacs';
import CodIcon from './images/cod';
-import { createNoticesFromResponse } from 'lib/notices';
+import { createNoticesFromResponse } from '../../../lib/notices';
import Stripe from './stripe';
import Square from './square';
import WCPay from './wcpay';
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/payfast.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/payfast.js
index fc7042ff27e..ba6705ab530 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/payfast.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/payfast.js
@@ -7,10 +7,6 @@ import { Button } from '@wordpress/components';
import interpolateComponents from 'interpolate-components';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Form, Link, Stepper, TextControl } from '@woocommerce/components';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/paypal.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/paypal.js
index a4ac5917097..fd6697e1a53 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/paypal.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/paypal.js
@@ -9,15 +9,15 @@ import { compose } from '@wordpress/compose';
import interpolateComponents from 'interpolate-components';
import { withDispatch, withSelect } from '@wordpress/data';
import { isEmail } from '@wordpress/url';
-
-/**
- * WooCommerce dependencies
- */
import { Form, Link, Stepper, TextControl } from '@woocommerce/components';
import { getQuery } from '@woocommerce/navigation';
-import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
import { PLUGINS_STORE_NAME, OPTIONS_STORE_NAME } from '@woocommerce/data';
+/**
+ * Internal dependencies
+ */
+import { WC_ADMIN_NAMESPACE } from '../../../wc-api/constants';
+
export class PayPal extends Component {
constructor( props ) {
super( props );
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/square.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/square.js
index 33e1ca35eb7..f5672b4b5a1 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/square.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/square.js
@@ -6,17 +6,17 @@ import { Component, Fragment } from '@wordpress/element';
import apiFetch from '@wordpress/api-fetch';
import { Button } from '@wordpress/components';
import { withDispatch, withSelect } from '@wordpress/data';
-import { compose } from '@wordpress/compose';
-
-/**
- * WooCommerce dependencies
- */
import { getQuery } from '@woocommerce/navigation';
-import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
+import { compose } from '@wordpress/compose';
import { Stepper } from '@woocommerce/components';
import { getAdminLink } from '@woocommerce/wc-admin-settings';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
+/**
+ * Internal dependencies
+ */
+import { WC_ADMIN_NAMESPACE } from '../../../wc-api/constants';
+
class Square extends Component {
constructor( props ) {
super( props );
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/stripe.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/stripe.js
index 4e55f22507b..8226817ae11 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/stripe.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/stripe.js
@@ -8,16 +8,16 @@ import apiFetch from '@wordpress/api-fetch';
import { withDispatch, withSelect } from '@wordpress/data';
import interpolateComponents from 'interpolate-components';
import { Button } from '@wordpress/components';
-
-/**
- * WooCommerce dependencies
- */
import { Form, Link, Stepper, TextControl } from '@woocommerce/components';
import { getAdminLink } from '@woocommerce/wc-admin-settings';
import { getQuery } from '@woocommerce/navigation';
-import { WCS_NAMESPACE } from 'wc-api/constants';
import { PLUGINS_STORE_NAME, OPTIONS_STORE_NAME } from '@woocommerce/data';
+/**
+ * Internal dependencies
+ */
+import { WCS_NAMESPACE } from '../../../wc-api/constants';
+
class Stripe extends Component {
constructor( props ) {
super( props );
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/wcpay.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/wcpay.js
index e9f3034e8ee..f0314e6f40c 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/payments/wcpay.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/wcpay.js
@@ -4,10 +4,6 @@
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { withDispatch } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { getQuery } from '@woocommerce/navigation';
class WCPay extends Component {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/products.js b/plugins/woocommerce-admin/client/task-list/tasks/products.js
index bae41fb8b98..5b570025125 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/products.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/products.js
@@ -3,17 +3,13 @@
*/
import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
-
-/**
- * WooCommerce dependencies
- */
import { Card, List } from '@woocommerce/components';
import { getAdminLink } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../lib/tracks';
const subTasks = [
{
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/shipping/index.js b/plugins/woocommerce-admin/client/task-list/tasks/shipping/index.js
index dc44ea00e41..25210e63e9e 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/shipping/index.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/shipping/index.js
@@ -8,10 +8,6 @@ import { compose } from '@wordpress/compose';
import { difference, filter } from 'lodash';
import interpolateComponents from 'interpolate-components';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Card, Link, Stepper, Plugins } from '@woocommerce/components';
import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings';
import { getHistory, getNewPath } from '@woocommerce/navigation';
@@ -20,11 +16,11 @@ import { SETTINGS_STORE_NAME, PLUGINS_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import Connect from 'dashboard/components/connect';
-import { getCountryCode } from 'dashboard/utils';
+import Connect from '../../../dashboard/components/connect';
+import { getCountryCode } from '../../../dashboard/utils';
import StoreLocation from '../steps/location';
import ShippingRates from './rates';
-import { recordEvent } from 'lib/tracks';
+import { recordEvent } from '../../../lib/tracks';
class Shipping extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/shipping/rates.js b/plugins/woocommerce-admin/client/task-list/tasks/shipping/rates.js
index 67d378e484a..d6d9391ec72 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/shipping/rates.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/shipping/rates.js
@@ -6,18 +6,14 @@ import apiFetch from '@wordpress/api-fetch';
import { Component, Fragment } from '@wordpress/element';
import { Button, FormToggle } from '@wordpress/components';
import PropTypes from 'prop-types';
-
-/**
- * WooCommerce dependencies
- */
import { Flag, Form, TextControlWithAffixes } from '@woocommerce/components';
import { getSetting, setSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import { recordEvent } from 'lib/tracks';
-import { CurrencyContext } from 'lib/currency-context';
+import { recordEvent } from '../../../lib/tracks';
+import { CurrencyContext } from '../../../lib/currency-context';
class ShippingRates extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/steps/location.js b/plugins/woocommerce-admin/client/task-list/tasks/steps/location.js
index f179f4a9d0d..ccf0da821c7 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/steps/location.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/steps/location.js
@@ -4,10 +4,6 @@
import { __ } from '@wordpress/i18n';
import { Button } from '@wordpress/components';
import { Component, Fragment } from '@wordpress/element';
-
-/**
- * WooCommerce dependencies
- */
import { Form } from '@woocommerce/components';
/**
@@ -16,7 +12,7 @@ import { Form } from '@woocommerce/components';
import {
StoreAddress,
validateStoreAddress,
-} from 'dashboard/components/settings/general/store-address';
+} from '../../../dashboard/components/settings/general/store-address';
export default class StoreLocation extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/client/task-list/tasks/tax.js b/plugins/woocommerce-admin/client/task-list/tasks/tax.js
index aa6dcd0b765..66171f48e8e 100644
--- a/plugins/woocommerce-admin/client/task-list/tasks/tax.js
+++ b/plugins/woocommerce-admin/client/task-list/tasks/tax.js
@@ -8,10 +8,6 @@ import { compose } from '@wordpress/compose';
import { difference, filter } from 'lodash';
import interpolateComponents from 'interpolate-components';
import { withDispatch, withSelect } from '@wordpress/data';
-
-/**
- * WooCommerce dependencies
- */
import { Card, H, Link, Stepper, Plugins } from '@woocommerce/components';
import { getHistory, getNewPath } from '@woocommerce/navigation';
import {
@@ -28,11 +24,11 @@ import {
/**
* Internal dependencies
*/
-import Connect from 'dashboard/components/connect';
-import { createNoticesFromResponse } from 'lib/notices';
-import { getCountryCode } from 'dashboard/utils';
+import Connect from '../../dashboard/components/connect';
+import { createNoticesFromResponse } from '../../lib/notices';
+import { getCountryCode } from '../../dashboard/utils';
import StoreLocation from './steps/location';
-import { recordEvent, queueRecordEvent } from 'lib/tracks';
+import { recordEvent, queueRecordEvent } from '../../lib/tracks';
class Tax extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/client/task-list/test/payments.js b/plugins/woocommerce-admin/client/task-list/test/payments.js
index 339442c66b2..8a01e3f5b01 100644
--- a/plugins/woocommerce-admin/client/task-list/test/payments.js
+++ b/plugins/woocommerce-admin/client/task-list/test/payments.js
@@ -1,19 +1,18 @@
/**
- * External dependenices
+ * External dependencies
*/
import { render, screen, waitFor } from '@testing-library/react';
import user from '@testing-library/user-event';
-// @todo: Figure out conflict with Enzyme for global config.
import '@testing-library/jest-dom/extend-expect';
import apiFetch from '@wordpress/api-fetch';
-jest.mock( '@wordpress/api-fetch' );
-
/**
- * Internal dependenices
+ * Internal dependencies
*/
import { PayPal } from '../tasks/payments/paypal';
+jest.mock( '@wordpress/api-fetch' );
+
describe( 'TaskList > Payments', () => {
describe( 'PayPal', () => {
afterEach( () => jest.clearAllMocks() );
diff --git a/plugins/woocommerce-admin/client/wc-api/items/utils.js b/plugins/woocommerce-admin/client/wc-api/items/utils.js
index 81b3980272a..9082c4dd6d9 100644
--- a/plugins/woocommerce-admin/client/wc-api/items/utils.js
+++ b/plugins/woocommerce-admin/client/wc-api/items/utils.js
@@ -1,11 +1,7 @@
/**
- * External dependencies
+ * Internal dependencies
*/
-
-/**
- * WooCommerce dependencies
- */
-import { appendTimestamp, getCurrentDates } from 'lib/date';
+import { appendTimestamp, getCurrentDates } from '../../lib/date';
/**
* Returns leaderboard data to render a leaderboard table.
diff --git a/plugins/woocommerce-admin/client/wc-api/reports/stats/operations.js b/plugins/woocommerce-admin/client/wc-api/reports/stats/operations.js
index 06e5a6dbceb..6a052d79588 100644
--- a/plugins/woocommerce-admin/client/wc-api/reports/stats/operations.js
+++ b/plugins/woocommerce-admin/client/wc-api/reports/stats/operations.js
@@ -7,8 +7,8 @@ import apiFetch from '@wordpress/api-fetch';
/**
* Internal dependencies
*/
-import { getResourceIdentifier, getResourcePrefix } from 'wc-api/utils';
-import { NAMESPACE } from 'wc-api/constants';
+import { getResourceIdentifier, getResourcePrefix } from '../../utils';
+import { NAMESPACE } from '../../constants';
const statEndpoints = [
'coupons',
diff --git a/plugins/woocommerce-admin/client/wc-api/reports/utils.js b/plugins/woocommerce-admin/client/wc-api/reports/utils.js
index 2e39323e14c..98a2dda16da 100644
--- a/plugins/woocommerce-admin/client/wc-api/reports/utils.js
+++ b/plugins/woocommerce-admin/client/wc-api/reports/utils.js
@@ -3,15 +3,6 @@
*/
import { find, forEach, isNull, get, includes } from 'lodash';
import moment from 'moment';
-
-/**
- * WooCommerce dependencies
- */
-import {
- appendTimestamp,
- getCurrentDates,
- getIntervalForQuery,
-} from 'lib/date';
import {
flattenFilters,
getActiveFiltersFromQuery,
@@ -21,7 +12,12 @@ import {
/**
* Internal dependencies
*/
-import { MAX_PER_PAGE, QUERY_DEFAULTS } from 'wc-api/constants';
+import {
+ appendTimestamp,
+ getCurrentDates,
+ getIntervalForQuery,
+} from '../../lib/date';
+import { MAX_PER_PAGE, QUERY_DEFAULTS } from '../constants';
import * as reportsUtils from './utils';
/**
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-homepage-notice/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-homepage-notice/index.js
index 33ee4b92c90..ece384a4fec 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-homepage-notice/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-homepage-notice/index.js
@@ -4,16 +4,12 @@
import { dispatch } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import domReady from '@wordpress/dom-ready';
-
-/**
- * WooCommerce dependencies
- */
import { getAdminLink } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
-import { queueRecordEvent } from 'lib/tracks';
+import { queueRecordEvent } from '../../lib/tracks';
/**
* Returns a promise and resolves when the post begins to publish.
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-import-notice/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-import-notice/index.js
index 886d1375ab7..16de1804b36 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-import-notice/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-import-notice/index.js
@@ -3,10 +3,6 @@
*/
import { __ } from '@wordpress/i18n';
import domReady from '@wordpress/dom-ready';
-
-/**
- * WooCommerce dependencies
- */
import { getAdminLink } from '@woocommerce/wc-admin-settings';
domReady( () => {
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-notice/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-notice/index.js
index 1e3bec8600b..3d9dd056063 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-notice/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-product-notice/index.js
@@ -4,10 +4,6 @@
import { __ } from '@wordpress/i18n';
import { dispatch } from '@wordpress/data';
import domReady from '@wordpress/dom-ready';
-
-/**
- * WooCommerce dependencies
- */
import { getAdminLink } from '@woocommerce/wc-admin-settings';
/**
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-tax-notice/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-tax-notice/index.js
index d700dc29110..d3cabb17b10 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-tax-notice/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/onboarding-tax-notice/index.js
@@ -4,10 +4,6 @@
import { __ } from '@wordpress/i18n';
import { dispatch } from '@wordpress/data';
import domReady from '@wordpress/dom-ready';
-
-/**
- * WooCommerce dependencies
- */
import { getAdminLink } from '@woocommerce/wc-admin-settings';
/**
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/dismiss-modal/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/dismiss-modal/index.js
index 007c89a4ad1..d291bef11d3 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/dismiss-modal/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/dismiss-modal/index.js
@@ -6,10 +6,6 @@ import { Component } from '@wordpress/element';
import { Button, Modal } from '@wordpress/components';
import { withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';
-
-/**
- * WooCommerce dependencies
- */
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
/**
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/index.js
index 29842bbf211..40d34021b2f 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/index.js
@@ -2,10 +2,6 @@
* External dependencies
*/
import { render } from '@wordpress/element';
-
-/**
- * WooCommerce dependencies
- */
import { withPluginsHydration } from '@woocommerce/data';
/**
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js
index b670413143a..dca5923f58d 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js
@@ -5,25 +5,21 @@ import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { Button, ExternalLink } from '@wordpress/components';
import { compose } from '@wordpress/compose';
-import { recordEvent } from 'lib/tracks';
import interpolateComponents from 'interpolate-components';
import PropTypes from 'prop-types';
import { get, isArray } from 'lodash';
-
-/**
- * WooCommerce dependencies
- */
import { PLUGINS_STORE_NAME } from '@woocommerce/data';
+import { withDispatch } from '@wordpress/data';
+import { getSetting } from '@woocommerce/wc-admin-settings';
/**
* Internal dependencies
*/
import '../style.scss';
+import { recordEvent } from '../../../lib/tracks';
import DismissModal from '../dismiss-modal';
-import { getSetting } from '@woocommerce/wc-admin-settings';
-import withSelect from 'wc-api/with-select';
+import withSelect from '../../../wc-api/with-select';
import SetupNotice, { setupErrorTypes } from '../setup-notice';
-import { withDispatch } from '@wordpress/data';
import { getWcsAssets, acceptWcsTos } from '../wcs-api';
const wcAdminAssetUrl = getSetting( 'wcAdminAssetUrl', '' );
diff --git a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js
index 6c2efa565cb..8a2182399dc 100644
--- a/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js
+++ b/plugins/woocommerce-admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js
@@ -2,20 +2,19 @@
* External dependencies
*/
import { shallow } from 'enzyme';
-import { recordEvent } from 'lib/tracks';
import { ExternalLink, Button } from '@wordpress/components';
/**
* Internal dependencies
*/
-
-jest.mock( '../../wcs-api.js' );
+import { recordEvent } from '../../../../lib/tracks';
import { acceptWcsTos, getWcsAssets } from '../../wcs-api.js';
import { setupErrorTypes } from '../../setup-notice';
+jest.mock( '../../wcs-api.js' );
+
acceptWcsTos.mockReturnValue( Promise.resolve() );
const wcsAssetsMock = {};
getWcsAssets.mockReturnValue( Promise.resolve( wcsAssetsMock ) );
-
import { ShippingBanner } from '../index.js';
jest.mock( 'lib/tracks' );
diff --git a/plugins/woocommerce-admin/packages/components/src/advanced-filters/date-filter.js b/plugins/woocommerce-admin/packages/components/src/advanced-filters/date-filter.js
index 04b46ec417e..ec04db51493 100644
--- a/plugins/woocommerce-admin/packages/components/src/advanced-filters/date-filter.js
+++ b/plugins/woocommerce-admin/packages/components/src/advanced-filters/date-filter.js
@@ -7,18 +7,14 @@ import { SelectControl } from '@wordpress/components';
import { find, partial } from 'lodash';
import classnames from 'classnames';
import { __, _x } from '@wordpress/i18n';
-
-/**
- * WooCommerce dependencies
- */
import { isoDateFormat, toMoment } from '@woocommerce/date';
+import moment from 'moment';
/**
* Internal dependencies
*/
import DatePicker from '../calendar/date-picker';
import { textContent } from './utils';
-import moment from 'moment';
const dateStringFormat = __( 'MMM D, YYYY', 'woocommerce-admin' );
const dateFormat = __( 'MM/DD/YYYY', 'woocommerce-admin' );
diff --git a/plugins/woocommerce-admin/packages/components/src/advanced-filters/docs/example.js b/plugins/woocommerce-admin/packages/components/src/advanced-filters/docs/example.js
index 9cba5490d8d..06ab5e4c986 100644
--- a/plugins/woocommerce-admin/packages/components/src/advanced-filters/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/advanced-filters/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { AdvancedFilters } from '@woocommerce/components';
import { CURRENCY } from '@woocommerce/wc-admin-settings';
diff --git a/plugins/woocommerce-admin/packages/components/src/advanced-filters/index.js b/plugins/woocommerce-admin/packages/components/src/advanced-filters/index.js
index d506b2d06d6..decb681860e 100644
--- a/plugins/woocommerce-admin/packages/components/src/advanced-filters/index.js
+++ b/plugins/woocommerce-admin/packages/components/src/advanced-filters/index.js
@@ -10,9 +10,6 @@ import Gridicon from 'gridicons';
import interpolateComponents from 'interpolate-components';
import classnames from 'classnames';
-/**
- * WooCommerce dependencies
- */
import {
getActiveFiltersFromQuery,
getDefaultOptionValue,
diff --git a/plugins/woocommerce-admin/packages/components/src/advanced-filters/number-filter.js b/plugins/woocommerce-admin/packages/components/src/advanced-filters/number-filter.js
index 69cb4227289..96e899613f6 100644
--- a/plugins/woocommerce-admin/packages/components/src/advanced-filters/number-filter.js
+++ b/plugins/woocommerce-admin/packages/components/src/advanced-filters/number-filter.js
@@ -8,9 +8,6 @@ import interpolateComponents from 'interpolate-components';
import classnames from 'classnames';
import { sprintf, __, _x } from '@wordpress/i18n';
-/**
- * WooCommerce dependencies
- */
import CurrencyFactory from '@woocommerce/currency';
/**
diff --git a/plugins/woocommerce-admin/packages/components/src/advanced-filters/select-filter.js b/plugins/woocommerce-admin/packages/components/src/advanced-filters/select-filter.js
index e829c2d05fc..59b95d562c9 100644
--- a/plugins/woocommerce-admin/packages/components/src/advanced-filters/select-filter.js
+++ b/plugins/woocommerce-admin/packages/components/src/advanced-filters/select-filter.js
@@ -7,17 +7,13 @@ import { find, partial } from 'lodash';
import PropTypes from 'prop-types';
import interpolateComponents from 'interpolate-components';
import classnames from 'classnames';
+import { getDefaultOptionValue } from '@woocommerce/navigation';
/**
* Internal dependencies
*/
import { textContent } from './utils';
-/**
- * WooCommerce dependencies
- */
-import { getDefaultOptionValue } from '@woocommerce/navigation';
-
class SelectFilter extends Component {
constructor( { filter, config, onFilterChange } ) {
super( ...arguments );
diff --git a/plugins/woocommerce-admin/packages/components/src/animation-slider/docs/example.js b/plugins/woocommerce-admin/packages/components/src/animation-slider/docs/example.js
index 5f137938f97..c7d6b8223b2 100644
--- a/plugins/woocommerce-admin/packages/components/src/animation-slider/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/animation-slider/docs/example.js
@@ -1,11 +1,7 @@
-/**
- * Internal dependencies
- */
-import { AnimationSlider } from '@woocommerce/components';
-
/**
* External dependencies
*/
+import { AnimationSlider } from '@woocommerce/components';
import { Component } from '@wordpress/element';
export default class MyAnimationSlider extends Component {
diff --git a/plugins/woocommerce-admin/packages/components/src/calendar/date-picker.js b/plugins/woocommerce-admin/packages/components/src/calendar/date-picker.js
index 244c477c57d..ed1f43e423c 100644
--- a/plugins/woocommerce-admin/packages/components/src/calendar/date-picker.js
+++ b/plugins/woocommerce-admin/packages/components/src/calendar/date-picker.js
@@ -9,10 +9,7 @@ import { Dropdown, DatePicker as WpDatePicker } from '@wordpress/components';
import { partial } from 'lodash';
import { TAB } from '@wordpress/keycodes';
import moment from 'moment';
-
-/**
- * WooCommerce dependencies
- */
+import PropTypes from 'prop-types';
import { dateValidationMessages, toMoment } from '@woocommerce/date';
/**
@@ -20,7 +17,6 @@ import { dateValidationMessages, toMoment } from '@woocommerce/date';
*/
import DateInput from './input';
import { H, Section } from '../section';
-import PropTypes from 'prop-types';
class DatePicker extends Component {
constructor( props ) {
diff --git a/plugins/woocommerce-admin/packages/components/src/calendar/date-range.js b/plugins/woocommerce-admin/packages/components/src/calendar/date-range.js
index aa9be8e6fb9..0ac314e2b63 100644
--- a/plugins/woocommerce-admin/packages/components/src/calendar/date-range.js
+++ b/plugins/woocommerce-admin/packages/components/src/calendar/date-range.js
@@ -12,9 +12,6 @@ import { partial } from 'lodash';
import PropTypes from 'prop-types';
import { withViewportMatch } from '@wordpress/viewport';
-/**
- * WooCommerce dependencies
- */
import { validateDateInputForRange } from '@woocommerce/date';
/**
diff --git a/plugins/woocommerce-admin/packages/components/src/calendar/docs/example.js b/plugins/woocommerce-admin/packages/components/src/calendar/docs/example.js
index e650d000712..a817730be80 100644
--- a/plugins/woocommerce-admin/packages/components/src/calendar/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/calendar/docs/example.js
@@ -1,13 +1,9 @@
-/**
- * Internal dependencies
- */
-import { DateRange, DatePicker, H, Section } from '@woocommerce/components';
-
/**
* External dependencies
*/
import moment from 'moment';
import { withState } from '@wordpress/compose';
+import { DateRange, DatePicker, H, Section } from '@woocommerce/components';
const dateFormat = 'MM/DD/YYYY';
diff --git a/plugins/woocommerce-admin/packages/components/src/card/docs/example.js b/plugins/woocommerce-admin/packages/components/src/card/docs/example.js
index df91cc1cd2f..ed280f316d7 100644
--- a/plugins/woocommerce-admin/packages/components/src/card/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/card/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { Card } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/d3base/test/index.js b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/d3base/test/index.js
index 4f8f9fadb70..f1d9b8fb4ab 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/d3base/test/index.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/d3base/test/index.js
@@ -1,6 +1,5 @@
/**
* External dependencies
- *
*/
import { shallow, mount } from 'enzyme';
import { noop } from 'lodash';
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/test/legend.js b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/test/legend.js
index d57e8716cd4..527313b86b9 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/test/legend.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/test/legend.js
@@ -1,6 +1,5 @@
/**
* External dependencies
- *
*/
import { mount } from 'enzyme';
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis-x.js b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis-x.js
index 11ebc93cac7..7c6dd0ec2e8 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis-x.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis-x.js
@@ -2,9 +2,13 @@
* External dependencies
*/
import { axisBottom as d3AxisBottom } from 'd3-axis';
-import { smallBreak, wideBreak } from './breakpoints';
import moment from 'moment';
+/**
+ * Internal dependencies
+ */
+import { smallBreak, wideBreak } from './breakpoints';
+
const dayTicksThreshold = 63;
const weekTicksThreshold = 9;
const mediumBreak = 1130;
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis.js b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis.js
index 74b35a6a9d0..ebbce3f9939 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/axis.js
@@ -1,5 +1,5 @@
/**
- * External dependencies
+ * Internal dependencies
*/
import { drawXAxis } from './axis-x';
import { drawYAxis } from './axis-y';
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/color.js b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/color.js
index d07904a173a..7ea21e12f7c 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/color.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/utils/color.js
@@ -1,13 +1,13 @@
-/**
- * Internal dependencies
- */
-import { colorScales, selectionLimit } from '../../constants';
-
/**
* External dependencies
*/
import { findIndex } from 'lodash';
+/**
+ * Internal dependencies
+ */
+import { colorScales, selectionLimit } from '../../constants';
+
export const getColor = ( orderedKeys, colorScheme ) => ( key ) => {
const len =
orderedKeys.length > selectionLimit
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/docs/example.js b/plugins/woocommerce-admin/packages/components/src/chart/docs/example.js
index c23daac244c..1949c535057 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { Chart } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/packages/components/src/chart/index.js b/plugins/woocommerce-admin/packages/components/src/chart/index.js
index f5347b43a9b..de9ac048a97 100644
--- a/plugins/woocommerce-admin/packages/components/src/chart/index.js
+++ b/plugins/woocommerce-admin/packages/components/src/chart/index.js
@@ -13,9 +13,6 @@ import memoize from 'memoize-one';
import PropTypes from 'prop-types';
import { withViewportMatch } from '@wordpress/viewport';
-/**
- * WooCommerce dependencies
- */
import { getIdsFromQuery, updateQueryString } from '@woocommerce/navigation';
/**
diff --git a/plugins/woocommerce-admin/packages/components/src/compare-filter/docs/example.js b/plugins/woocommerce-admin/packages/components/src/compare-filter/docs/example.js
index babe9f0e8a8..5ddfc0b1504 100644
--- a/plugins/woocommerce-admin/packages/components/src/compare-filter/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/compare-filter/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { CompareFilter } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/packages/components/src/compare-filter/index.js b/plugins/woocommerce-admin/packages/components/src/compare-filter/index.js
index ac56d93eea7..96b207eec77 100644
--- a/plugins/woocommerce-admin/packages/components/src/compare-filter/index.js
+++ b/plugins/woocommerce-admin/packages/components/src/compare-filter/index.js
@@ -7,9 +7,6 @@ import { Button } from '@wordpress/components';
import { isEqual } from 'lodash';
import PropTypes from 'prop-types';
-/**
- * WooCommerce dependencies
- */
import { getIdsFromQuery, updateQueryString } from '@woocommerce/navigation';
/**
diff --git a/plugins/woocommerce-admin/packages/components/src/count/docs/example.js b/plugins/woocommerce-admin/packages/components/src/count/docs/example.js
index 3ec69637437..29602ce2b1c 100644
--- a/plugins/woocommerce-admin/packages/components/src/count/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/count/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { Count } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/compare-periods.js b/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/compare-periods.js
index a494402d1b2..a44befaeae5 100644
--- a/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/compare-periods.js
+++ b/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/compare-periods.js
@@ -5,9 +5,6 @@ import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import PropTypes from 'prop-types';
-/**
- * WooCommerce dependencies
- */
import { periods } from '@woocommerce/date';
/**
diff --git a/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/docs/example.js b/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/docs/example.js
index 36659b96f18..81926765e97 100644
--- a/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { DateRangeFilterPicker } from '@woocommerce/components';
import {
diff --git a/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/preset-periods.js b/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/preset-periods.js
index 5216acce1d2..69810cd366e 100644
--- a/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/preset-periods.js
+++ b/plugins/woocommerce-admin/packages/components/src/date-range-filter-picker/preset-periods.js
@@ -6,9 +6,6 @@ import { Component } from '@wordpress/element';
import { filter } from 'lodash';
import PropTypes from 'prop-types';
-/**
- * WooCommerce dependencies
- */
import { presetValues } from '@woocommerce/date';
/**
diff --git a/plugins/woocommerce-admin/packages/components/src/date/docs/example.js b/plugins/woocommerce-admin/packages/components/src/date/docs/example.js
index d8897c8360b..2802b9ae68e 100644
--- a/plugins/woocommerce-admin/packages/components/src/date/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/date/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { Date } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/packages/components/src/date/test/index.js b/plugins/woocommerce-admin/packages/components/src/date/test/index.js
index d3e38039437..69a33e44305 100644
--- a/plugins/woocommerce-admin/packages/components/src/date/test/index.js
+++ b/plugins/woocommerce-admin/packages/components/src/date/test/index.js
@@ -1,6 +1,5 @@
/**
* External dependencies
- *
*/
import { shallow } from 'enzyme';
diff --git a/plugins/woocommerce-admin/packages/components/src/pill/docs/example.js b/plugins/woocommerce-admin/packages/components/src/pill/docs/example.js
index 95758e25501..5563df03f25 100644
--- a/plugins/woocommerce-admin/packages/components/src/pill/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/pill/docs/example.js
@@ -1,5 +1,5 @@
/**
- * Internal dependencies
+ * External dependencies
*/
import { Pill } from '@woocommerce/components';
diff --git a/plugins/woocommerce-admin/packages/components/src/plugins/index.js b/plugins/woocommerce-admin/packages/components/src/plugins/index.js
index 6c232a3a4df..972f5592af6 100644
--- a/plugins/woocommerce-admin/packages/components/src/plugins/index.js
+++ b/plugins/woocommerce-admin/packages/components/src/plugins/index.js
@@ -7,12 +7,12 @@ import { Component, Fragment } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import PropTypes from 'prop-types';
import { withSelect, withDispatch } from '@wordpress/data';
+import { PLUGINS_STORE_NAME } from '@woocommerce/data';
/**
- * WooCommerce dependencies
+ * Internal dependencies
*/
-import { createNoticesFromResponse } from 'lib/notices';
-import { PLUGINS_STORE_NAME } from '@woocommerce/data';
+import { createNoticesFromResponse } from '../../../../client/lib/notices';
export class Plugins extends Component {
constructor() {
diff --git a/plugins/woocommerce-admin/packages/components/src/segmented-selection/docs/example.js b/plugins/woocommerce-admin/packages/components/src/segmented-selection/docs/example.js
index 6a8130ad3bc..c1d4f6abc67 100644
--- a/plugins/woocommerce-admin/packages/components/src/segmented-selection/docs/example.js
+++ b/plugins/woocommerce-admin/packages/components/src/segmented-selection/docs/example.js
@@ -1,12 +1,8 @@
-/**
- * Internal dependencies
- */
-import { SegmentedSelection } from '@woocommerce/components';
-
/**
* External dependencies
*/
import { withState } from '@wordpress/compose';
+import { SegmentedSelection } from '@woocommerce/components';
const name = 'number';
diff --git a/plugins/woocommerce-admin/packages/data/src/plugins/index.js b/plugins/woocommerce-admin/packages/data/src/plugins/index.js
index 58fef4a6a8c..ad86eb25132 100644
--- a/plugins/woocommerce-admin/packages/data/src/plugins/index.js
+++ b/plugins/woocommerce-admin/packages/data/src/plugins/index.js
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
-
import { registerStore, select } from '@wordpress/data';
import { controls } from '@wordpress/data-controls';
diff --git a/plugins/woocommerce-admin/webpack.config.js b/plugins/woocommerce-admin/webpack.config.js
index d34e46e7f9b..1ff61a41fa4 100644
--- a/plugins/woocommerce-admin/webpack.config.js
+++ b/plugins/woocommerce-admin/webpack.config.js
@@ -14,7 +14,7 @@ const TerserPlugin = require( 'terser-webpack-plugin' );
const UnminifyWebpackPlugin = require( './unminify' );
/**
- * WordPress dependencies
+ * External dependencies
*/
const CustomTemplatedPathPlugin = require( '@wordpress/custom-templated-path-webpack-plugin' );
@@ -151,7 +151,6 @@ const webpackConfig = {
},
resolve: {
extensions: [ '.json', '.js', '.jsx' ],
- modules: [ path.join( __dirname, 'client' ), 'node_modules' ],
alias: {
'gutenberg-components': path.resolve(
__dirname,