lint: fix lint errors
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable camelcase */
|
||||
import PropTypes from 'prop-types'
|
||||
import Link from 'next/link'
|
||||
import {useState} from 'react'
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import {forwardRef, useRef, useState, useEffect} from 'react'
|
||||
import {
|
||||
forwardRef,
|
||||
useRef,
|
||||
useState,
|
||||
useEffect
|
||||
} from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Table from '@mui/material/Table'
|
||||
import TableBody from '@mui/material/TableBody'
|
||||
@@ -300,8 +305,8 @@ export default function ListVersions({
|
||||
color='primary'
|
||||
size='small'
|
||||
value={viewMode}
|
||||
onChange={handleViewModeChange}
|
||||
sx={{alignSelf: {xs: 'center', sm: 'auto'}}}
|
||||
onChange={handleViewModeChange}
|
||||
>
|
||||
<ToggleButton value='table' aria-label='vue tableau'>
|
||||
<ViewListIcon fontSize='small' sx={{mr: 0.5}} />
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable camelcase */
|
||||
import {
|
||||
createDirectus, rest, authentication, withToken, createItem,
|
||||
readUser, createContentVersion, readContentVersions, saveToContentVersion,
|
||||
@@ -141,7 +140,6 @@ export async function listVersions({
|
||||
|
||||
return versions
|
||||
} catch (error) {
|
||||
|
||||
if (error) {
|
||||
countdownRef.current.startCountdown()
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ export function formatDate(date, formatStr = 'PP', {withTimezone = false} = {})
|
||||
})
|
||||
|
||||
if (withTimezone) {
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
const timezone = new Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
return `${formatted} (${timezone})`
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ const cspDirectives = [
|
||||
`default-src ${SELF}`,
|
||||
`script-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:`,
|
||||
`font-src ${SELF}`,
|
||||
`object-src ${NONE}`,
|
||||
|
||||
+2
-1
@@ -56,7 +56,8 @@
|
||||
],
|
||||
"n/prefer-global/process": "off",
|
||||
"comma-dangle": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"camelcase": ["error", {"properties": "never"}]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user