From b842bdda70a56ea33dd12e9541e6ccb4587ceed1 Mon Sep 17 00:00:00 2001 From: ladunjexa <110838700+ladunjexa@users.noreply.github.com> Date: Mon, 6 May 2024 16:48:08 +0300 Subject: [PATCH] style: format codebase using @prettier --- .eslintrc.json | 5 +- .storybook/main.ts | 2 +- app/(blog)/[slug]/page.jsx | 2 +- app/(blog)/blog/page.tsx | 2 +- next.config.js | 2 +- src/components/atoms/Providers.tsx | 2 +- src/components/common/ItemGrid.tsx | 8 ++-- src/stories/Configure.mdx | 77 ++++++++++++++++-------------- tsconfig.json | 19 +++++--- 9 files changed, 64 insertions(+), 55 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6a6da8ee..bb8b1c09 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,3 @@ { - "extends": [ - "next/core-web-vitals", - "plugin:storybook/recommended" - ] + "extends": ["next/core-web-vitals", "plugin:storybook/recommended"] } diff --git a/.storybook/main.ts b/.storybook/main.ts index 036ff828..ff27ba27 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -8,7 +8,7 @@ const config: StorybookConfig = { '@storybook/addon-onboarding', '@storybook/addon-interactions', '@storybook/addon-themes', - '@storybook/addon-a11y' + '@storybook/addon-a11y', ], framework: { name: '@storybook/nextjs', diff --git a/app/(blog)/[slug]/page.jsx b/app/(blog)/[slug]/page.jsx index f28a035f..5b27a3da 100644 --- a/app/(blog)/[slug]/page.jsx +++ b/app/(blog)/[slug]/page.jsx @@ -8,7 +8,7 @@ export const dynamicParams = false; const getFormattedDate = (date) => date; -export async function generateMetadata({ params}) { +export async function generateMetadata({ params }) { const post = await findPostBySlug(params.slug); if (!post) { return notFound(); diff --git a/app/(blog)/blog/page.tsx b/app/(blog)/blog/page.tsx index ea473e80..7d187ccd 100644 --- a/app/(blog)/blog/page.tsx +++ b/app/(blog)/blog/page.tsx @@ -19,7 +19,7 @@ export default async function Home({}) {
- {posts.map(({ slug, title, image }: { slug: string, title: string, image: string }) => ( + {posts.map(({ slug, title, image }: { slug: string; title: string; image: string }) => (
{title} diff --git a/next.config.js b/next.config.js index 4aba157b..31d845a1 100644 --- a/next.config.js +++ b/next.config.js @@ -20,5 +20,5 @@ module.exports = { hostname: 'source.unsplash.com', }, ], - } + }, }; diff --git a/src/components/atoms/Providers.tsx b/src/components/atoms/Providers.tsx index 1714c0c9..872ae77d 100644 --- a/src/components/atoms/Providers.tsx +++ b/src/components/atoms/Providers.tsx @@ -3,7 +3,7 @@ import { ThemeProvider } from 'next-themes'; export interface ProvidersProps { - children: React.ReactNode + children: React.ReactNode; } const Providers = ({ children }: ProvidersProps) => ( diff --git a/src/components/common/ItemGrid.tsx b/src/components/common/ItemGrid.tsx index 66c04298..0c6be9e8 100644 --- a/src/components/common/ItemGrid.tsx +++ b/src/components/common/ItemGrid.tsx @@ -24,10 +24,10 @@ const ItemGrid = ({ (columns || defaultColumns) === 4 ? 'lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2' : (columns || defaultColumns) === 3 - ? 'lg:grid-cols-3 sm:grid-cols-2' - : (columns || defaultColumns) === 2 - ? 'sm:grid-cols-2' - : 'max-w-4xl' + ? 'lg:grid-cols-3 sm:grid-cols-2' + : (columns || defaultColumns) === 2 + ? 'sm:grid-cols-2' + : 'max-w-4xl' }`, containerClass, )} diff --git a/src/stories/Configure.mdx b/src/stories/Configure.mdx index 055a3c56..d6009aa7 100644 --- a/src/stories/Configure.mdx +++ b/src/stories/Configure.mdx @@ -1,36 +1,38 @@ -import { Meta } from "@storybook/blocks"; -import Image from "next/image"; - -import Github from "./assets/github.svg"; -import Discord from "./assets/discord.svg"; -import Youtube from "./assets/youtube.svg"; -import Tutorials from "./assets/tutorials.svg"; -import Styling from "./assets/styling.png"; -import Context from "./assets/context.png"; -import Assets from "./assets/assets.png"; -import Docs from "./assets/docs.png"; -import Share from "./assets/share.png"; -import FigmaPlugin from "./assets/figma-plugin.png"; -import Testing from "./assets/testing.png"; -import Accessibility from "./assets/accessibility.png"; -import Theming from "./assets/theming.png"; -import AddonLibrary from "./assets/addon-library.png"; - -export const RightArrow = () => ( + - - + > + + +); @@ -39,6 +41,7 @@ export const RightArrow = () =>
@@ -97,6 +100,7 @@ export const RightArrow = () =>
@@ -234,12 +238,12 @@ export const RightArrow = () => Star on GitHub
- Discord logo
@@ -252,12 +256,12 @@ export const RightArrow = () =>
- Youtube logo
@@ -270,12 +274,12 @@ export const RightArrow = () =>
- A book

Follow guided walkthroughs on for key workflows.

@@ -285,6 +289,7 @@ export const RightArrow = () => Discover tutorials
+