fix: solve various lint warnings

This commit is contained in:
Julien Oculi 2025-05-16 12:36:55 +02:00
parent 08daa55569
commit 80fc6aeb42
11 changed files with 21 additions and 16 deletions

View file

@ -88,7 +88,9 @@ export function BlogPost(
function NewsTags({ tags }: Pick<BlogProps, 'tags'>) { function NewsTags({ tags }: Pick<BlogProps, 'tags'>) {
return ( return (
<div class='components__blog_block__tags'> <div class='components__blog_block__tags'>
{tags ? tags.map((tag) => <span>{tag}</span>) : <span>Aucun tag</span>} {tags
? tags.map((tag, index) => <span key={index}>{tag}</span>)
: <span>Aucun tag</span>}
</div> </div>
) )
} }
@ -116,7 +118,7 @@ function NewsLinks({ links }: Pick<BlogProps['options'], 'links'>) {
{links {links
? links.flatMap(Object.entries).map(( ? links.flatMap(Object.entries).map((
[name, link], [name, link],
) => <a href={link} target='_blank' title={name}>{name}</a>) ) => <a href={link} key={link} target='_blank' title={name}>{name}</a>)
: <span>Aucun lien rapide</span>} : <span>Aucun lien rapide</span>}
</div> </div>
) )

View file

@ -57,7 +57,7 @@ export function Header() {
<SearchBox /> <SearchBox />
<MoreBox> <MoreBox>
<ThemePicker /> <ThemePicker />
<a href='/profil' title={'Accéder à mon compte'}> <a href='/profil' title='Accéder à mon compte'>
<i class='ri-user-line'></i> <i class='ri-user-line'></i>
</a> </a>
<AiChatBox /> <AiChatBox />

View file

@ -21,7 +21,7 @@ export function MachineCard(
<span>{name}</span> <span>{name}</span>
</h3> </h3>
<div class='components__machine_card__tags'> <div class='components__machine_card__tags'>
{tags.map((tag) => <span>{tag}</span>)} {tags.map((tag, index) => <span key={index}>{tag}</span>)}
</div> </div>
<div class='components__machine_card__footer'> <div class='components__machine_card__footer'>
<a href={`/machines/${id}`}>Infos</a> <a href={`/machines/${id}`}>Infos</a>

View file

@ -16,7 +16,7 @@ export function MemberCard(
<a href={`/membres/${id}`}>{name}</a> <a href={`/membres/${id}`}>{name}</a>
</h3> </h3>
<div class='components__member_card__groups'> <div class='components__member_card__groups'>
{groups.map((group) => <span>{group}</span>)} {groups.map((group, index) => <span key={index}>{group}</span>)}
</div> </div>
</div> </div>
</div> </div>

View file

@ -25,7 +25,7 @@ export function ProjectCard(
{toStateSpan(state)} {toStateSpan(state)}
</div> </div>
<div class='components__project_card__tags'> <div class='components__project_card__tags'>
{tags.map((tag) => <span>{tag}</span>)} {tags.map((tag, index) => <span key={index}>{tag}</span>)}
</div> </div>
<div class='components__project_card__summary'> <div class='components__project_card__summary'>
{`${summary.slice(0, 150)} ...`} {`${summary.slice(0, 150)} ...`}

View file

@ -17,7 +17,7 @@ function SponsorCard(
<Picture <Picture
src={asset(src)} src={asset(src)}
alt={alt} alt={alt}
loading={'lazy'} loading='lazy'
formats={['avif']} formats={['avif']}
/> />
</a> </a>

View file

@ -86,9 +86,10 @@ export default function AiChatBox() {
return ( return (
<> <>
<button <button
type='button'
class='islands__ai_chat_box__button' class='islands__ai_chat_box__button'
onClick={() => dialog.current?.showModal()} onClick={() => dialog.current?.showModal()}
title={'Ouvrir la chat box IA'} title='Ouvrir la chat box IA'
> >
<i class='ri-bard-line'></i> <i class='ri-bard-line'></i>
</button> </button>
@ -104,7 +105,7 @@ export default function AiChatBox() {
autoFocus autoFocus
autoComplete='off' autoComplete='off'
/> />
<button> <button type='button'>
<i class='ri-send-plane-2-line'></i> <i class='ri-send-plane-2-line'></i>
</button> </button>
</form> </form>

View file

@ -15,9 +15,10 @@ export default function MoreBox({ children }: { children: VNode | VNode[] }) {
return ( return (
<> <>
<button <button
type='button'
class='islands__more_box__button' class='islands__more_box__button'
onClick={() => dialog.current?.showModal()} onClick={() => dialog.current?.showModal()}
title={"Afficher plus d'options"} title="Afficher plus d'options"
> >
<i class='ri-more-2-line'></i> <i class='ri-more-2-line'></i>
</button> </button>

View file

@ -14,9 +14,10 @@ export default function SearchBox() {
return ( return (
<> <>
<button <button
type='button'
class='islands__search_box__button' class='islands__search_box__button'
onClick={() => dialog.current?.showModal()} onClick={() => dialog.current?.showModal()}
title={'Ouvrir la recherche'} title='Ouvrir la recherche'
> >
<i class='ri-search-line'></i> <i class='ri-search-line'></i>
<span>&nbsp;Rechercher</span> <span>&nbsp;Rechercher</span>

View file

@ -39,7 +39,7 @@ export default function ThemePicker() {
}) })
return ( return (
<label class='islands__theme_picker' title={'Sélectionner un thème'}> <label class='islands__theme_picker' title='Sélectionner un thème'>
<span>{themeIcon}</span> <span>{themeIcon}</span>
<select <select
value={theme} value={theme}

View file

@ -10,8 +10,8 @@ export default function Membres() {
<AutoGrid columnWidth='15rem'> <AutoGrid columnWidth='15rem'>
<MemberCardList <MemberCardList
filters={[['group', 'user.admin']]} filters={[['group', 'user.admin']]}
usePlaceholder={true} usePlaceholder
useObserver={true} useObserver
/> />
</AutoGrid> </AutoGrid>
</section> </section>
@ -20,8 +20,8 @@ export default function Membres() {
<AutoGrid columnWidth='15rem'> <AutoGrid columnWidth='15rem'>
<MemberCardList <MemberCardList
filters={[['group', 'user.member']]} filters={[['group', 'user.member']]}
usePlaceholder={true} usePlaceholder
useObserver={true} useObserver
/> />
</AutoGrid> </AutoGrid>
</section> </section>