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 = ({