-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
#40 ESLintルールの整備 #142
Conversation
className="w-fit bg-white text-black" | ||
onClick={() => void loginWith('google')}> | ||
onClick={() => void loginWith('google')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
className="hidden w-fit bg-white text-black" | ||
onClick={() => void loginWith('facebook')}> | ||
onClick={() => void loginWith('facebook')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
onClick={() => { | ||
const links = creator.links.filter(x => x !== link); | ||
setCreator({ ...creator, links }); | ||
}}> | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
<MuiJoyButton | ||
color="neutral" | ||
disabled={addLinkError} | ||
onClick={onAddLink} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
onClick={() => { | ||
onDelete(data); | ||
}}> | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
onClick={e => { | ||
clearErrors('name'); | ||
void handleSubmit(onValid)(e); | ||
}}> | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
onClick={() => | ||
void (async () => { | ||
// 確認メールを再送信 | ||
await sendVerifyEmail(); | ||
|
||
// ReSentページに遷移 | ||
props.setter(); | ||
})() | ||
}> | ||
確認メールを再送信する | ||
</a> | ||
); | ||
}; | ||
// ReSentページに遷移 | ||
props.setter(); | ||
})() | ||
}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
collisionDetection={closestCenter} | ||
onDragEnd={onDragEnd} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
MyPage | ||
</Link> | ||
)} | ||
{visibleLogout && ( | ||
<Link onClick={onSignOut} to="/" className={styles}> | ||
<Link className={styles} onClick={onSignOut} to="/"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
GalleryFound/Hosting/src/components/pages/Mypage.tsx
Lines 234 to 251 in 97c7e03
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} | |
/> | |
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX props should not use arrow functions
GalleryFound/Hosting/src/components/pages/Mypage.tsx
Lines 642 to 666 in 97c7e03
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} | |
/> | |
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected a function expression.
GalleryFound/Hosting/src/components/ui/DraggableList.tsx
Lines 30 to 73 in 97c7e03
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> | |
); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected a function expression.
GalleryFound/Hosting/src/components/ui/DraggableList.tsx
Lines 80 to 109 in 97c7e03
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> | |
); | |
} |
dde63c7
to
8771a47
Compare
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 |
No description provided.