diff --git a/package.json b/package.json index f08b4aad5c8..6ecd47c8718 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,9 @@ "devDependencies": { "@woocommerce/dependency-extraction-webpack-plugin": "1.4.0", "@woocommerce/eslint-plugin": "1.1.0", - "@wordpress/scripts": "^13.0.3" + "@wordpress/prettier-config": "^1.0.1", + "@wordpress/scripts": "^13.0.3", + "prettier": "^2.2.1" }, "dependencies": { "@woocommerce/data": "^1.1.1", diff --git a/src/App/app.js b/src/app/app.js similarity index 53% rename from src/App/app.js rename to src/app/app.js index d6482f7213a..d437487ac12 100644 --- a/src/App/app.js +++ b/src/app/app.js @@ -11,26 +11,23 @@ import { AdminNotes } from '../admin-notes'; import { Tools } from '../tools'; import { default as Options } from '../options'; -const tabs = applyFilters( - 'woocommerce_admin_test_helper_tabs', - [ - { - name: 'options', - title: 'Options', - content: , - }, - { - name: 'admin-notes', - title: 'Admin notes', - content: , - }, - { - name: 'tools', - title: 'Tools', - content: , - }, - ] -); +const tabs = applyFilters('woocommerce_admin_test_helper_tabs', [ + { + name: 'options', + title: 'Options', + content: , + }, + { + name: 'admin-notes', + title: 'Admin notes', + content: , + }, + { + name: 'tools', + title: 'Tools', + content: , + }, +]); export function App() { return ( @@ -39,18 +36,18 @@ export function App() { - { ( tab ) => ( + {(tab) => ( <> - { tab.content } - { applyFilters( - `woocommerce_admin_test_helper_tab_${ tab.name }`, + {tab.content} + {applyFilters( + `woocommerce_admin_test_helper_tab_${tab.name}`, [] - ) } + )} - ) } + )} ); diff --git a/src/App/index.js b/src/app/index.js similarity index 100% rename from src/App/index.js rename to src/app/index.js diff --git a/src/index.js b/src/index.js index fb7b8a50ed8..56be948f2cb 100644 --- a/src/index.js +++ b/src/index.js @@ -9,8 +9,10 @@ import { render } from '@wordpress/element'; import { App } from './app'; import './index.scss'; -const appRoot = document.getElementById( 'woocommerce-admin-test-helper-app-root' ); +const appRoot = document.getElementById( + 'woocommerce-admin-test-helper-app-root' +); -if ( appRoot ) { - render( , appRoot ); -} \ No newline at end of file +if (appRoot) { + render(, appRoot); +}