Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#40 ESLintルールの整備 #142

Merged
merged 14 commits into from
Sep 25, 2024
Merged

#40 ESLintルールの整備 #142

merged 14 commits into from
Sep 25, 2024

Conversation

FltSv
Copy link
Owner

@FltSv FltSv commented Sep 24, 2024

No description provided.

@FltSv FltSv self-assigned this Sep 24, 2024
@FltSv FltSv linked an issue Sep 24, 2024 that may be closed by this pull request
className="w-fit bg-white text-black"
onClick={() => void loginWith('google')}>
onClick={() => void loginWith('google')}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

className="hidden w-fit bg-white text-black"
onClick={() => void loginWith('facebook')}>
onClick={() => void loginWith('facebook')}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

@@ -26,9 +26,9 @@ const TODAY = new Date();
export const Map = () => (
<div className="h-svh w-svw bg-white">
<GeolocationWrapper
renderErrorView={error => <MapView error={error} />}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

Comment on lines 155 to +158
onClick={() => {
const links = creator.links.filter(x => x !== link);
setCreator({ ...creator, links });
}}>
}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

<MuiJoyButton
color="neutral"
disabled={addLinkError}
onClick={onAddLink}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

Comment on lines 449 to +451
onClick={() => {
onDelete(data);
}}>
}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

Comment on lines 780 to +783
onClick={e => {
clearErrors('name');
void handleSubmit(onValid)(e);
}}>
}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

Comment on lines +76 to +84
onClick={() =>
void (async () => {
// 確認メールを再送信
await sendVerifyEmail();

// ReSentページに遷移
props.setter();
})()
}>
確認メールを再送信する
</a>
);
};
// ReSentページに遷移
props.setter();
})()
}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

collisionDetection={closestCenter}
onDragEnd={onDragEnd}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

MyPage
</Link>
)}
{visibleLogout && (
<Link onClick={onSignOut} to="/" className={styles}>
<Link className={styles} onClick={onSignOut} to="/">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

renderItem={(product, props) => (
<ProductCell
data={product}
key={product.id}
onDelete={() => {
const newProducts = creator.products.filter(
x => x.id !== product.id,
);
setCreator({ ...creator, products: newProducts });
}}
onEdit={() => {
setEditProduct(product);
setVisibleProductPopup(true);
}}
sortableProps={props}
/>
)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react/jsx-no-bind> reported by reviewdog 🐶
JSX props should not use arrow functions

render={({ field }) => (
<Autocomplete
freeSolo
onChange={(e, value) => {
field.onChange(value);
}}
options={galleries?.map(x => x.name) ?? []}
renderInput={params => (
<Input
slotProps={{
root: { ref: params.InputProps.ref },
input: {
...params.inputProps,
onChange: e => {
field.onChange(e);
params.inputProps.onChange?.(e);
},
},
}}
sx={{ borderColor: 'black' }}
/>
)}
value={field.value || null}
/>
)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <func-style> reported by reviewdog 🐶
Expected a function expression.

export function DraggableList<T extends { id: string }>(
props: DraggableListProps<T>,
) {
const { items, setItems, renderItem } = props;
const [activeId, setActiveId] = useState<UniqueIdentifier>();
const sensors = useSensors(useSensor(MouseSensor), useSensor(TouchSensor));
const onDragStart = ({ active }: DragStartEvent) => {
setActiveId(active.id);
};
const onDragEnd = ({ active, over }: DragEndEvent) => {
if (active.id !== over?.id) {
const oldIndex = items.findIndex(item => item.id === active.id);
const newIndex = items.findIndex(item => item.id === over?.id);
setItems(arrayMove(items, oldIndex, newIndex));
}
};
const overlayItem = items.find(item => item.id === activeId);
return (
<DndContext
collisionDetection={closestCenter}
onDragEnd={onDragEnd}
onDragStart={onDragStart}
sensors={sensors}>
<SortableContext items={items} strategy={rectSortingStrategy}>
<div className="flex flex-wrap gap-2">
{items.map(item => (
<SortableItem item={item} key={item.id} renderItem={renderItem} />
))}
</div>
</SortableContext>
{overlayItem && (
<DragOverlay>
<SortableItem item={overlayItem} renderItem={renderItem} />
</DragOverlay>
)}
</DndContext>
);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <func-style> reported by reviewdog 🐶
Expected a function expression.

function SortableItem<T extends { id: string }>(props: SortableItemProps<T>) {
const { item, renderItem } = props;
const {
attributes,
listeners,
setNodeRef,
transform,
transition,
isDragging,
} = useSortable({ id: item.id });
return (
<div
className="rounded-md bg-white bg-opacity-50 p-1 shadow-md"
ref={setNodeRef}
style={{
transform: CSS.Transform.toString(transform),
transition,
zIndex: isDragging ? 5 : 0,
opacity: isDragging ? 0.5 : 1,
}}>
{renderItem(item, {
...attributes,
...listeners,
...{ style: { cursor: 'grab' } },
})}
</div>
);
}

Copy link

Visit the preview URL for this PR (updated for commit 8771a47):

https://gallery-found--pr142-40-eslint-rule-cd66d2pk.web.app

(expires Tue, 01 Oct 2024 13:07:42 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: aacf5e596d89fd00b92da8ae1fefdbb554aab306

@FltSv FltSv merged commit 02377db into develop Sep 25, 2024
6 checks passed
@FltSv FltSv deleted the 40-eslint-rule branch September 25, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EsLintルール追加
1 participant