From e3be5924bf4482434b3a5e2310800865cb3781dc Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Fri, 12 Aug 2022 14:01:28 +0700 Subject: [PATCH] ran prettier over project --- package.json | 2 +- src/components/boris/Superpower/index.tsx | 6 +-- src/components/containers/Zone/index.tsx | 10 ++--- .../editors/EditorButtons/index.tsx | 26 ++++++------ src/components/editors/ImageGrid/index.tsx | 12 +++--- src/components/flow/FlowCell/index.tsx | 38 ++++++++--------- src/components/flow/FlowSwiperHero/index.tsx | 28 ++++++------- src/components/node/NodeEditMenu/index.tsx | 28 ++++++------- .../notes/NoteCreationForm/index.tsx | 37 ++++++++-------- .../profile/ProfileSettings/index.tsx | 14 +++---- .../profile/ProfileSidebarNotes/index.tsx | 8 ++-- .../profile/ProfileSidebarSettings/index.tsx | 18 ++++---- src/components/sidebar/SidebarStack/index.tsx | 6 +-- .../auth/SuperPowersToggle/index.tsx | 10 ++--- src/containers/boris/BorisSidebar/index.tsx | 14 +++---- src/containers/dialogs/LoginDialog/index.tsx | 38 ++++++++--------- src/containers/dialogs/PhotoSwipe/index.tsx | 34 +++++++-------- .../profile/ProfileSidebarMenu/index.tsx | 32 +++++++------- .../profile/ProfileToggles/index.tsx | 8 ++-- .../settings/SettingsNotes/index.tsx | 20 ++++----- .../settings/UserSettingsView/index.tsx | 38 ++++++++--------- .../sidebars/ProfileSidebar/index.tsx | 37 +++++++++------- src/containers/tags/TagInput/index.tsx | 42 +++++++++---------- src/pages/boris.tsx | 24 +++++------ src/utils/providers/NoteProvider.tsx | 6 +-- src/utils/providers/SidebarProvider.tsx | 24 +++++------ yarn.lock | 8 ++-- 27 files changed, 286 insertions(+), 282 deletions(-) diff --git a/package.json b/package.json index f1a0721a..bf70f4f4 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "husky": "^7.0.4", "lint-staged": "^12.1.6", "next-transpile-modules": "^9.0.0", - "prettier": "^1.18.2" + "prettier": "^2.7.1" }, "lint-staged": { "./**/*.{js,jsx,ts,tsx}": [ diff --git a/src/components/boris/Superpower/index.tsx b/src/components/boris/Superpower/index.tsx index c29834e1..1ee45c4e 100644 --- a/src/components/boris/Superpower/index.tsx +++ b/src/components/boris/Superpower/index.tsx @@ -1,8 +1,8 @@ -import React, { FC } from "react"; +import React, { FC } from 'react'; -import { observer } from "mobx-react-lite"; +import { observer } from 'mobx-react-lite'; -import { useAuth } from "~/hooks/auth/useAuth"; +import { useAuth } from '~/hooks/auth/useAuth'; interface IProps {} diff --git a/src/components/containers/Zone/index.tsx b/src/components/containers/Zone/index.tsx index 2e6825eb..86c13f71 100644 --- a/src/components/containers/Zone/index.tsx +++ b/src/components/containers/Zone/index.tsx @@ -1,20 +1,20 @@ -import React, { FC } from "react"; +import React, { FC } from 'react'; -import classNames from "classnames"; +import classNames from 'classnames'; -import styles from "./styles.module.scss"; +import styles from './styles.module.scss'; interface ZoneProps { title?: string; className?: string; - color?: "danger" | "normal"; + color?: 'danger' | 'normal'; } const Zone: FC = ({ title, className, children, - color = "normal", + color = 'normal', }) => (
{ const { values, handleChange, isSubmitting } = useNodeFormContext(); const { isTablet } = useWindowSize(); return ( - + @@ -22,7 +22,7 @@ const EditorButtons: FC = () => { { )} @@ -77,9 +77,9 @@ const NodeEditMenu: VFC = ({ - + diff --git a/src/components/notes/NoteCreationForm/index.tsx b/src/components/notes/NoteCreationForm/index.tsx index 3cf9a10d..e07935b6 100644 --- a/src/components/notes/NoteCreationForm/index.tsx +++ b/src/components/notes/NoteCreationForm/index.tsx @@ -1,19 +1,18 @@ -import React, { FC, useCallback, useState } from "react"; +import { FC, useCallback } from 'react'; -import { FormikConfig, useFormik } from "formik"; -import { object, string, Asserts } from "yup"; +import { FormikConfig, useFormik } from 'formik'; +import { Asserts, object, string } from 'yup'; -import { Card } from "~/components/containers/Card"; -import { Filler } from "~/components/containers/Filler"; -import { Group } from "~/components/containers/Group"; -import { Button } from "~/components/input/Button"; -import { Textarea } from "~/components/input/Textarea"; -import { useRandomPhrase } from "~/constants/phrases"; -import { Note } from "~/types/notes"; -import { getErrorMessage } from "~/utils/errors/getErrorMessage"; -import { showErrorToast } from "~/utils/errors/showToast"; +import { Card } from '~/components/containers/Card'; +import { Filler } from '~/components/containers/Filler'; +import { Group } from '~/components/containers/Group'; +import { Button } from '~/components/input/Button'; +import { Textarea } from '~/components/input/Textarea'; +import { useRandomPhrase } from '~/constants/phrases'; +import { getErrorMessage } from '~/utils/errors/getErrorMessage'; +import { showErrorToast } from '~/utils/errors/showToast'; -import styles from "./styles.module.scss"; +import styles from './styles.module.scss'; interface NoteCreationFormProps { text?: string; @@ -22,19 +21,19 @@ interface NoteCreationFormProps { } const validationSchema = object({ - text: string().required("Напишите что-нибудь"), + text: string().required('Напишите что-нибудь'), }); type Values = Asserts; const NoteCreationForm: FC = ({ - text = "", + text = '', onSubmit, onCancel, }) => { - const placeholder = useRandomPhrase("SIMPLE"); + const placeholder = useRandomPhrase('SIMPLE'); - const submit = useCallback["onSubmit"]>( + const submit = useCallback['onSubmit']>( async (values, { resetForm, setSubmitting, setErrors }) => { try { await onSubmit(values.text, () => resetForm()); @@ -72,10 +71,10 @@ const NoteCreationForm: FC = ({