From 176cf5ff708e1a3a77d90e96476eb08e12bd9a2c Mon Sep 17 00:00:00 2001 From: Sergey Sova Date: Sat, 31 Aug 2024 14:39:48 +0400 Subject: [PATCH] style: reformat with prettier --- documentation/.prettierrc.mjs | 5 ++++ .../src/content/docs/guides/installation.mdx | 2 +- documentation/src/content/docs/index.mdx | 23 +++++++++---------- documentation/src/pages/docs/[operator].astro | 18 ++++++++------- .../src/pages/operators/[operator].astro | 8 +++---- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/documentation/.prettierrc.mjs b/documentation/.prettierrc.mjs index 299c31e0..d9e6bad6 100644 --- a/documentation/.prettierrc.mjs +++ b/documentation/.prettierrc.mjs @@ -1,5 +1,10 @@ /** @type {import("prettier").Config} */ export default { + arrowParens: 'always', + printWidth: 120, + trailingComma: 'all', + singleQuote: true, + jsxSingleQuote: true, plugins: ['prettier-plugin-astro'], overrides: [ { diff --git a/documentation/src/content/docs/guides/installation.mdx b/documentation/src/content/docs/guides/installation.mdx index 78c9717b..48e1cf0c 100644 --- a/documentation/src/content/docs/guides/installation.mdx +++ b/documentation/src/content/docs/guides/installation.mdx @@ -5,7 +5,7 @@ description: A guide how to use effector with patronum. import { PackageManagers } from 'starlight-package-managers'; - + ## Usage diff --git a/documentation/src/content/docs/index.mdx b/documentation/src/content/docs/index.mdx index f57a0696..705921a2 100644 --- a/documentation/src/content/docs/index.mdx +++ b/documentation/src/content/docs/index.mdx @@ -25,20 +25,19 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; ## Next steps - - Patronum enhances your workflows with powerful, reusable operators that streamline - complex state management tasks. + + Patronum enhances your workflows with powerful, reusable operators that streamline complex state management tasks. - - Leverage fully type-safe functions with effector patronum to ensure robustness and - prevent runtime errors in your application. + + Leverage fully type-safe functions with effector patronum to ensure robustness and prevent runtime errors in your + application. - - Patronum integrates effortlessly with your existing effector logic, adding - modularity without the need for extensive refactoring. + + Patronum integrates effortlessly with your existing effector logic, adding modularity without the need for extensive + refactoring. - - Patronum is designed with tree shaking in mind, ensuring that your bundle size - remains minimal by including only the code you actually use. + + Patronum is designed with tree shaking in mind, ensuring that your bundle size remains minimal by including only the + code you actually use. diff --git a/documentation/src/pages/docs/[operator].astro b/documentation/src/pages/docs/[operator].astro index cb5b284a..2a17938c 100644 --- a/documentation/src/pages/docs/[operator].astro +++ b/documentation/src/pages/docs/[operator].astro @@ -1,20 +1,22 @@ --- -import { getCollection, getEntry, render } from "astro:content"; -import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; +import { getCollection, getEntry } from 'astro:content'; +import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; export async function getStaticPaths() { - const operators = await getCollection("operators"); + const operators = await getCollection('operators'); return operators.map((operator) => ({ params: { operator: operator.data.slug }, })); } -const operator = await getEntry("operators", Astro.params.operator); +const operator = await getEntry('operators', Astro.params.operator); --- - - - + + + -

Redirecting to /operators/{operator.data.slug}

+

+ Redirecting to /operators/{operator.data.slug} +

diff --git a/documentation/src/pages/operators/[operator].astro b/documentation/src/pages/operators/[operator].astro index 640e21e0..2cade020 100644 --- a/documentation/src/pages/operators/[operator].astro +++ b/documentation/src/pages/operators/[operator].astro @@ -1,15 +1,15 @@ --- -import { getCollection, getEntry, render } from "astro:content"; -import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; +import { getCollection, getEntry, render } from 'astro:content'; +import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; export async function getStaticPaths() { - const operators = await getCollection("operators"); + const operators = await getCollection('operators'); return operators.map((operator) => ({ params: { operator: operator.data.slug }, })); } -const operator = await getEntry("operators", Astro.params.operator); +const operator = await getEntry('operators', Astro.params.operator); const { Content, headings } = await render(operator); ---