From fb50cbc26335869db33e205431c43468d6b8622a Mon Sep 17 00:00:00 2001 From: TuTiDore Date: Sun, 24 Dec 2023 19:04:28 -0500 Subject: [PATCH] fix prettier config --- .prettierrc | 3 --- .prettierrc.cjs | 3 +++ src/App.tsx | 20 ++++++++++---------- src/components/FourPanel.tsx | 6 ++++-- src/components/FourPanelContainer.tsx | 2 +- src/components/Loading.tsx | 6 +++--- src/components/UpdatePing.tsx | 4 ++-- src/features/Config.tsx | 14 +++++++------- src/features/FeatureForm.tsx | 8 ++++---- src/features/Toy.tsx | 12 ++++++------ src/layout/Button.tsx | 2 +- src/layout/Select.tsx | 2 +- src/layout/Slider.tsx | 10 +++++----- src/layout/Switch.tsx | 2 +- src/layout/Tooltip.tsx | 4 ++-- 15 files changed, 50 insertions(+), 48 deletions(-) delete mode 100644 .prettierrc create mode 100644 .prettierrc.cjs diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 92617e2..0000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-organize-imports"] -} \ No newline at end of file diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 0000000..0518537 --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,3 @@ +module.exports = { + plugins: ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"], +}; diff --git a/src/App.tsx b/src/App.tsx index 00fa7d4..397b851 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -75,7 +75,7 @@ export default function App() { disableOnPortChange={disableOnPortChange} /> ) : !hasOnlineToys ? ( -
+
No Online Toys
@@ -97,13 +97,13 @@ export default function App() { return (
e.preventDefault()} >
-
+
-
-
+
+
{toysList.map((sidebarToy) => (
-
+
setConfig()} /> @@ -175,8 +175,8 @@ export default function App() {
-
-
{mainPanel}
+
+
{mainPanel}
{version} diff --git a/src/components/FourPanel.tsx b/src/components/FourPanel.tsx index 2a0a956..d9db2b5 100644 --- a/src/components/FourPanel.tsx +++ b/src/components/FourPanel.tsx @@ -33,8 +33,10 @@ export default function FourPanel({ label )}
{two}
-
{three}
-
{four}
+
+ {three} +
+
{four}
); } diff --git a/src/components/FourPanelContainer.tsx b/src/components/FourPanelContainer.tsx index fffea2b..0dd5601 100644 --- a/src/components/FourPanelContainer.tsx +++ b/src/components/FourPanelContainer.tsx @@ -6,7 +6,7 @@ export default function FourPanelContainer({ children: ReactNode; }) { return ( -
+
{children}
); diff --git a/src/components/Loading.tsx b/src/components/Loading.tsx index f989bd1..0628bda 100644 --- a/src/components/Loading.tsx +++ b/src/components/Loading.tsx @@ -2,7 +2,7 @@ export default function Loading() { return ( <>
-
-
+
+
)}
diff --git a/src/features/Config.tsx b/src/features/Config.tsx index 23e067a..c0f986d 100644 --- a/src/features/Config.tsx +++ b/src/features/Config.tsx @@ -84,13 +84,13 @@ export default function Config({ } return ( -
-
+
+
Config
-
+
-
+
addParam()}> -
+
-
+
{feature.osc_parameters.map((param, paramIndex) => { // TODO: Using index is generally an anti-pattern, but I think it's required in this specific scenario // If we key on a parameter or other identifiers, typing the parameter name would trigger a refresh from the backend @@ -198,7 +198,7 @@ export default function FeatureForm({ {/* Adding debounce on this makes it more complex b/c separate state, plus parent key on index */} handleOscParam(e, paramIndex)} @@ -428,7 +428,7 @@ export default function FeatureForm({ function HackyScrollArea({ children }: { children: ReactNode }) { return ( - + {children} ); diff --git a/src/features/Toy.tsx b/src/features/Toy.tsx index 6a8799c..ade9b22 100644 --- a/src/features/Toy.tsx +++ b/src/features/Toy.tsx @@ -18,14 +18,14 @@ export default function Toy({ toy }: { toy: FeVCToy }) { }, [toy]); return ( -
-
+
+
{nameInfo.shortName}
-
+
{toy.features.map((feature, featureArrayIndex) => ( diff --git a/src/layout/Select.tsx b/src/layout/Select.tsx index 2507b15..8682f9e 100644 --- a/src/layout/Select.tsx +++ b/src/layout/Select.tsx @@ -14,7 +14,7 @@ export function Select({ }) { return (