1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-21 14:19:44 +02:00

Move from prettier-eslint to eslint-plugin-prettier, update dependencies

This commit is contained in:
Maksim Eltyshev 2020-02-03 18:42:31 +05:00
parent 1f43d4f214
commit 45bde7e7c0
254 changed files with 5539 additions and 5170 deletions

View file

@ -18,9 +18,7 @@ const StepTypes = {
};
const LabelsStep = React.memo(
({
items, currentIds, title, onSelect, onDeselect, onCreate, onUpdate, onDelete, onBack,
}) => {
({ items, currentIds, title, onSelect, onDeselect, onCreate, onUpdate, onDelete, onBack }) => {
const [t] = useTranslation();
const [step, openStep, handleBack] = useSteps();
@ -29,7 +27,7 @@ const LabelsStep = React.memo(
}, [openStep]);
const handleEdit = useCallback(
(id) => {
id => {
openStep(StepTypes.EDIT, {
id,
});
@ -38,14 +36,14 @@ const LabelsStep = React.memo(
);
const handleSelect = useCallback(
(id) => {
id => {
onSelect(id);
},
[onSelect],
);
const handleDeselect = useCallback(
(id) => {
id => {
onDeselect(id);
},
[onDeselect],
@ -59,7 +57,7 @@ const LabelsStep = React.memo(
);
const handleDelete = useCallback(
(id) => {
id => {
onDelete(id);
},
[onDelete],
@ -70,13 +68,13 @@ const LabelsStep = React.memo(
case StepTypes.ADD:
return <AddStep onCreate={onCreate} onBack={handleBack} />;
case StepTypes.EDIT: {
const currentItem = items.find((item) => item.id === step.params.id);
const currentItem = items.find(item => item.id === step.params.id);
if (currentItem) {
return (
<EditStep
defaultData={pick(currentItem, ['name', 'color'])}
onUpdate={(data) => handleUpdate(currentItem.id, data)}
onUpdate={data => handleUpdate(currentItem.id, data)}
onDelete={() => handleDelete(currentItem.id)}
onBack={handleBack}
/>
@ -95,7 +93,7 @@ const LabelsStep = React.memo(
<>
<Popup.Header onBack={onBack}>{t(title)}</Popup.Header>
<Popup.Content>
{items.map((item) => (
{items.map(item => (
<Item
key={item.id}
name={item.name}