Skip to content

Commit 8cf5f4c

Browse files
authored
Merge pull request #63 from Inist-CNRS/Lint-Fix
fix: resolve ESLint issues
2 parents 38f47e7 + b09f37b commit 8cf5f4c

File tree

6 files changed

+8
-20
lines changed

6 files changed

+8
-20
lines changed

tdm-admin/src/app/components/Menu.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { getPageTitle } from '~/app/util/utils';
22

3-
import DataArrayIcon from '@mui/icons-material/DataArray';
43
import FolderIcon from '@mui/icons-material/Folder';
54
import HomeIcon from '@mui/icons-material/Home';
65
import ScienceIcon from '@mui/icons-material/Science';

tdm-admin/src/app/components/setting/EnrichmentList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const EnrichmentList = ({ enrichments, onChange }: EnrichmentListProps) => {
124124

125125
excluded[excludedIndex] = null;
126126

127-
tag.excluded = excluded.filter((datum) => datum !== null) as string[];
127+
tag.excluded = excluded.filter((datum) => datum !== null);
128128

129129
enrichment.tags[tagIndex] = tag;
130130
localEnrichments[enrichmentIndex] = enrichment;
@@ -150,7 +150,7 @@ const EnrichmentList = ({ enrichments, onChange }: EnrichmentListProps) => {
150150

151151
localEnrichments[enrichmentIndex] = null;
152152

153-
setModifiableEnrichments(localEnrichments.filter((datum) => datum !== null) as ConfigEnrichment[]);
153+
setModifiableEnrichments(localEnrichments.filter((datum) => datum !== null));
154154
};
155155

156156
const handleEnrichmentAddClick = () => () => {

tdm-admin/src/app/components/setting/WrapperList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const WrapperList = ({ wrappers, onChange }: WrapperListProps) => {
9696

9797
excluded[excludedIndex] = null;
9898

99-
tag.excluded = excluded.filter((datum) => datum !== null) as string[];
99+
tag.excluded = excluded.filter((datum) => datum !== null);
100100

101101
wrapper.tags[tagIndex] = tag;
102102
localWrappers[wrapperIndex] = wrapper;
@@ -122,7 +122,7 @@ const WrapperList = ({ wrappers, onChange }: WrapperListProps) => {
122122

123123
localWrappers[wrapperIndex] = null;
124124

125-
setModifiableWrappers(localWrappers.filter((datum) => datum !== null) as ConfigWrapper[]);
125+
setModifiableWrappers(localWrappers.filter((datum) => datum !== null));
126126
};
127127

128128
const handleWrapperAddClick = () => () => {

tdm-admin/src/app/page/Dashboard.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,16 @@ import Paper from '@mui/material/Paper';
77
import Typography from '@mui/material/Typography';
88
import { useQuery } from '@tanstack/react-query';
99
import { useMemo } from 'react';
10-
import {
11-
Area,
12-
AreaChart,
10+
import {
1311
PolarAngleAxis,
1412
PolarGrid,
1513
PolarRadiusAxis,
1614
Radar,
1715
RadarChart,
1816
ResponsiveContainer,
1917
Tooltip,
20-
XAxis,
21-
YAxis,
2218
} from 'recharts';
2319

24-
import type { StorageDashboard } from '~/app/util/type';
25-
2620
const Dashboard = () => {
2721
const { data, isFetching, isLoading } = useQuery({
2822
queryKey: ['dashboard'],

tdm-admin/src/app/page/Database.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const DatabaseSkeleton = () => {
4343
const Database = () => {
4444
const [page, setPage] = useState(1);
4545

46-
const { data, isFetching, isLoading } = useQuery({
46+
const { data, isFetching } = useQuery({
4747
queryKey: ['database', page],
4848
queryFn: () => {
4949
return database(page);
@@ -61,7 +61,7 @@ const Database = () => {
6161
setPage(newPage);
6262
};
6363

64-
if (isFetching || isFetching) {
64+
if (isFetching) {
6565
return <DatabaseSkeleton />;
6666
}
6767

tdm-fe/src/app/components/form/ProcessingFormConfiguration.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,7 @@ const ProcessingFormConfiguration = ({
127127
onChange={handleWrapperParamChange}
128128
onBlur={handleWrapperParamBlur}
129129
options={cleanFields}
130-
renderInput={(params) => (
131-
<TextField
132-
{...params}
133-
label="Nom du champ à exploiter"
134-
/>
135-
)}
130+
renderInput={(params) => <TextField {...params} label="Nom du champ à exploiter" />}
136131
fullWidth
137132
freeSolo
138133
disableClearable

0 commit comments

Comments
 (0)