mirror of
https://github.com/plankanban/planka.git
synced 2025-08-03 20:45:27 +02:00
Move from prettier-eslint to eslint-plugin-prettier, update dependencies
This commit is contained in:
parent
1f43d4f214
commit
45bde7e7c0
254 changed files with 5539 additions and 5170 deletions
|
@ -9,9 +9,7 @@ import User from '../User';
|
|||
import styles from './EditAvatarStep.module.css';
|
||||
|
||||
const EditAvatarStep = React.memo(
|
||||
({
|
||||
defaultValue, name, isUploading, onUpload, onClear, onBack,
|
||||
}) => {
|
||||
({ defaultValue, name, isUploading, onUpload, onClear, onBack }) => {
|
||||
const [t] = useTranslation();
|
||||
|
||||
const field = useRef(null);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import isEmail from 'validator/lib/isEmail';
|
||||
import React, {
|
||||
useCallback, useEffect, useMemo, useRef,
|
||||
} from 'react';
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Form, Message } from 'semantic-ui-react';
|
||||
|
@ -12,7 +10,7 @@ import { useForm } from '../../hooks';
|
|||
|
||||
import styles from './EditNameStep.module.css';
|
||||
|
||||
const createMessage = (error) => {
|
||||
const createMessage = error => {
|
||||
if (!error) {
|
||||
return error;
|
||||
}
|
||||
|
@ -37,9 +35,7 @@ const createMessage = (error) => {
|
|||
};
|
||||
|
||||
const EditEmailStep = React.memo(
|
||||
({
|
||||
defaultData, email, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose,
|
||||
}) => {
|
||||
({ defaultData, email, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose }) => {
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
|
||||
|
@ -92,7 +88,7 @@ const EditEmailStep = React.memo(
|
|||
|
||||
break;
|
||||
case 'Current password is not valid':
|
||||
setData((prevData) => ({
|
||||
setData(prevData => ({
|
||||
...prevData,
|
||||
currentPassword: '',
|
||||
}));
|
||||
|
|
|
@ -8,9 +8,7 @@ import { useField } from '../../hooks';
|
|||
|
||||
import styles from './EditNameStep.module.css';
|
||||
|
||||
const EditNameStep = React.memo(({
|
||||
defaultValue, onUpdate, onBack, onClose,
|
||||
}) => {
|
||||
const EditNameStep = React.memo(({ defaultValue, onUpdate, onBack, onClose }) => {
|
||||
const [t] = useTranslation();
|
||||
const [value, handleFieldChange] = useField(defaultValue);
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import React, {
|
||||
useCallback, useEffect, useMemo, useRef,
|
||||
} from 'react';
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Form, Message } from 'semantic-ui-react';
|
||||
|
@ -11,7 +9,7 @@ import { useForm } from '../../hooks';
|
|||
|
||||
import styles from './EditNameStep.module.css';
|
||||
|
||||
const createMessage = (error) => {
|
||||
const createMessage = error => {
|
||||
if (!error) {
|
||||
return error;
|
||||
}
|
||||
|
@ -31,9 +29,7 @@ const createMessage = (error) => {
|
|||
};
|
||||
|
||||
const EditPasswordStep = React.memo(
|
||||
({
|
||||
defaultData, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose,
|
||||
}) => {
|
||||
({ defaultData, isSubmitting, error, onUpdate, onMessageDismiss, onBack, onClose }) => {
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
|
||||
|
@ -72,7 +68,7 @@ const EditPasswordStep = React.memo(
|
|||
if (!error) {
|
||||
onClose();
|
||||
} else if (error.message === 'Current password is not valid') {
|
||||
setData((prevData) => ({
|
||||
setData(prevData => ({
|
||||
...prevData,
|
||||
currentPassword: '',
|
||||
}));
|
||||
|
|
|
@ -57,7 +57,7 @@ const UserStep = React.memo(
|
|||
}, [openStep]);
|
||||
|
||||
const handleNameUpdate = useCallback(
|
||||
(newName) => {
|
||||
newName => {
|
||||
onUpdate({
|
||||
name: newName,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue