lint: fix lint errors
Déploiement Frontend BETA / Lint et tests (push) Successful in 1m58s
Déploiement Frontend BETA / Déploiement beta (push) Failing after 6m57s

This commit is contained in:
2026-05-15 21:26:03 +04:00
parent f38ff8202d
commit 7e6dc2a536
6 changed files with 11 additions and 8 deletions
-1
View File
@@ -1,4 +1,3 @@
/* eslint-disable camelcase */
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Link from 'next/link' import Link from 'next/link'
import {useState} from 'react' import {useState} from 'react'
+7 -2
View File
@@ -1,4 +1,9 @@
import {forwardRef, useRef, useState, useEffect} from 'react' import {
forwardRef,
useRef,
useState,
useEffect
} from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Table from '@mui/material/Table' import Table from '@mui/material/Table'
import TableBody from '@mui/material/TableBody' import TableBody from '@mui/material/TableBody'
@@ -300,8 +305,8 @@ export default function ListVersions({
color='primary' color='primary'
size='small' size='small'
value={viewMode} value={viewMode}
onChange={handleViewModeChange}
sx={{alignSelf: {xs: 'center', sm: 'auto'}}} sx={{alignSelf: {xs: 'center', sm: 'auto'}}}
onChange={handleViewModeChange}
> >
<ToggleButton value='table' aria-label='vue tableau'> <ToggleButton value='table' aria-label='vue tableau'>
<ViewListIcon fontSize='small' sx={{mr: 0.5}} /> <ViewListIcon fontSize='small' sx={{mr: 0.5}} />
-2
View File
@@ -1,4 +1,3 @@
/* eslint-disable camelcase */
import { import {
createDirectus, rest, authentication, withToken, createItem, createDirectus, rest, authentication, withToken, createItem,
readUser, createContentVersion, readContentVersions, saveToContentVersion, readUser, createContentVersion, readContentVersions, saveToContentVersion,
@@ -141,7 +140,6 @@ export async function listVersions({
return versions return versions
} catch (error) { } catch (error) {
if (error) { if (error) {
countdownRef.current.startCountdown() countdownRef.current.startCountdown()
} else { } else {
+1 -1
View File
@@ -25,7 +25,7 @@ export function formatDate(date, formatStr = 'PP', {withTimezone = false} = {})
}) })
if (withTimezone) { if (withTimezone) {
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone const timezone = new Intl.DateTimeFormat().resolvedOptions().timeZone
return `${formatted} (${timezone})` return `${formatted} (${timezone})`
} }
+1 -1
View File
@@ -27,7 +27,7 @@ const cspDirectives = [
`default-src ${SELF}`, `default-src ${SELF}`,
`script-src ${SELF} ${UNSAFE_INLINE}`, `script-src ${SELF} ${UNSAFE_INLINE}`,
`style-src ${SELF} ${UNSAFE_INLINE}`, `style-src ${SELF} ${UNSAFE_INLINE}`,
`connect-src ${SELF} ${apiUrl} ${wsUrl} ${derivedWsUrl}`.trim().replace(/ {2,}/g, ' '), `connect-src ${SELF} ${apiUrl} ${wsUrl} ${derivedWsUrl}`.trim().replaceAll(/ {2,}/g, ' '),
`img-src ${SELF} data: blob:`, `img-src ${SELF} data: blob:`,
`font-src ${SELF}`, `font-src ${SELF}`,
`object-src ${NONE}`, `object-src ${NONE}`,
+2 -1
View File
@@ -56,7 +56,8 @@
], ],
"n/prefer-global/process": "off", "n/prefer-global/process": "off",
"comma-dangle": "off", "comma-dangle": "off",
"unicorn/prevent-abbreviations": "off" "unicorn/prevent-abbreviations": "off",
"camelcase": ["error", {"properties": "never"}]
}, },
"overrides": [ "overrides": [
{ {