Skip to content

Commit e89df54

Browse files
committed
Activate eslint prefer-const
Enables the eslint rule prefer-const.
1 parent 7efaffa commit e89df54

75 files changed

Lines changed: 293 additions & 293 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export default [
2121
"no-tabs": "off",
2222
"no-unused-expressions": "off",
2323
"object-curly-spacing": "off",
24-
"prefer-const": "off",
2524
"quotes": "off",
2625
"semi": "off",
2726
"spaced-comment": "off",

src/components/configuration/Themes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Themes = () => {
5151
loadThemes();
5252

5353
// Fetch themes every minute
54-
let fetchThemesInterval = setInterval(loadThemes, 5000);
54+
const fetchThemesInterval = setInterval(loadThemes, 5000);
5555

5656
return () => {
5757
allowLoadIntoTable = false;

src/components/events/Events.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Events = () => {
6161
const events = useAppSelector(state => getTotalEvents(state));
6262
const isFetchingAssetUploadOptions = useAppSelector(state => getIsFetchingAssetUploadOptions(state));
6363

64-
let location = useLocation();
64+
const location = useLocation();
6565

6666
useEffect(() => {
6767
// State variable for interrupting the load function
@@ -92,7 +92,7 @@ const Events = () => {
9292
loadEvents();
9393

9494
// Fetch events every five seconds
95-
let fetchEventsInterval = setInterval(() => loadEvents(), 5000);
95+
const fetchEventsInterval = setInterval(() => loadEvents(), 5000);
9696

9797
return () => {
9898
allowLoadIntoTable = false;

src/components/events/Series.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const Series = () => {
3939
const newSeriesModalRef = useRef<ModalHandle>(null);
4040
const deleteModalRef = useRef<ModalHandle>(null);
4141

42-
let location = useLocation();
42+
const location = useLocation();
4343

4444
const series = useAppSelector(state => getTotalSeries(state));
4545
const showActions = useAppSelector(state => isShowActions(state));
@@ -72,7 +72,7 @@ const Series = () => {
7272
loadSeries();
7373

7474
// Fetch series every minute
75-
let fetchSeriesInterval = setInterval(() => loadSeries(), 5000);
75+
const fetchSeriesInterval = setInterval(() => loadSeries(), 5000);
7676

7777
return () => {
7878
allowLoadIntoTable = false;

src/components/events/partials/EventsDateCell.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ const EventsDateCell = ({
2424

2525
// Filter with value of current cell
2626
const addFilter = async (date: string) => {
27-
let filter = filterMap.find(({ name }) => name === "startDate");
27+
const filter = filterMap.find(({ name }) => name === "startDate");
2828
if (!!filter) {
29-
let startDate = new Date(date);
29+
const startDate = new Date(date);
3030
startDate.setHours(0);
3131
startDate.setMinutes(0);
3232
startDate.setSeconds(0);
33-
let endDate = new Date(date);
33+
const endDate = new Date(date);
3434
endDate.setHours(23);
3535
endDate.setMinutes(59);
3636
endDate.setSeconds(59);

src/components/events/partials/EventsLocationCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const EventsLocationCell = ({
2121

2222
// Filter with value of current cell
2323
const addFilter = (location: string) => {
24-
let filter = filterMap.find(({ name }) => name === "location");
24+
const filter = filterMap.find(({ name }) => name === "location");
2525
if (!!filter) {
2626
dispatch(editFilterValue({filterName: filter.name, value: location}));
2727
dispatch(fetchEvents());

src/components/events/partials/EventsPresentersCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const EventsPresentersCell = ({
2121

2222
// Filter with value of current cell
2323
const addFilter = async (presenter: string) => {
24-
let filter = filterMap.find(
24+
const filter = filterMap.find(
2525
({ name }) => name === "presentersBibliographic"
2626
);
2727
if (!!filter) {

src/components/events/partials/EventsSeriesCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const EventsSeriesCell = ({
2121

2222
// Filter with value of current cell
2323
const addFilter = async (seriesId: string) => {
24-
let filter = filterMap.find(({ name }) => name === "series");
24+
const filter = filterMap.find(({ name }) => name === "series");
2525
if (!!filter) {
2626
await dispatch(editFilterValue({filterName: filter.name, value: seriesId}));
2727
await dispatch(fetchEvents());

src/components/events/partials/EventsTechnicalDateCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const EventsTechnicalDateCell = ({
2424

2525
// Filter with value of current cell
2626
const addFilter = async (date: string) => {
27-
let filter = filterMap.find(({ name }) => name === "technicalStart");
27+
const filter = filterMap.find(({ name }) => name === "technicalStart");
2828
if (!!filter) {
2929
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date}));
3030
await dispatch(fetchEvents());

src/components/events/partials/ModalTabsAndPages/DetailsMetadataTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const DetailsMetadataTab = ({
5656

5757
// set current values of metadata fields as initial values
5858
const getInitialValues = (metadataCatalog: MetadataCatalog) => {
59-
let initialValues: { [key: string]: any } = {};
59+
const initialValues: { [key: string]: any } = {};
6060

6161
// Transform metadata fields and their values provided by backend (saved in redux)
6262
if (!!metadataCatalog.fields && metadataCatalog.fields.length > 0) {

0 commit comments

Comments
 (0)