Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Use stricter typescript options
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb-sti1 committed Sep 20, 2023
1 parent 69429a1 commit 8afedb3
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
6 changes: 5 additions & 1 deletion backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
"noFallthroughCasesInSwitch": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"strict": true
}
}
3 changes: 2 additions & 1 deletion frontend/src/Components/Conditions/ConditionsMap.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
import ReactSlider from 'react-slider';

import { MapContainer, TileLayer, ScaleControl, GeoJSON } from 'react-leaflet';
import { GeoJSON, MapContainer, ScaleControl, TileLayer } from 'react-leaflet';
import { Layer, PathOptions } from 'leaflet';

import { Feature, FeatureCollection } from 'geojson';
Expand Down Expand Up @@ -79,6 +79,7 @@ const noToYearMonth = (
const years = Math.floor((month - 1) / 12);
return { year: dateRange.start.year + years, month: normalizedMonth };
}
return undefined;
};

const yearMonthtoText = (yearMonth: YearMonth | undefined): string => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Components/Map/Hooks/useMapBounds.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LatLngBounds, Map } from 'leaflet';
import { LatLngBounds } from 'leaflet';
import { useState } from 'react';
import { useMapEvents } from 'react-leaflet';

Expand Down
1 change: 0 additions & 1 deletion frontend/src/Components/Map/MapWrapper.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import MapWrapper from './MapWrapper';

Expand Down
1 change: 0 additions & 1 deletion frontend/src/Components/Navbar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import Navbar from './Navbar';
import { BrowserRouter as Router } from 'react-router-dom';
Expand Down
1 change: 0 additions & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import App from './App';
import { createRoot } from 'react-dom/client';

Expand Down
2 changes: 0 additions & 2 deletions frontend/src/mocks/reactLeafletMock.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

function MapContainer(props: any) {
const { children } = props;

Expand Down
7 changes: 3 additions & 4 deletions frontend/src/models/renderers.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { FC, ReactElement, ReactNode } from 'react';
import { Hotline, Palette } from 'react-leaflet-hotline';
import { FC } from 'react';
import { Palette } from 'react-leaflet-hotline';
import { LeafletEvent, LeafletEventHandlerFnMap } from 'leaflet';
import { LatLng } from './models';
import { Path, Bounds } from './path';
import { Bounds, Path } from './path';
import { PathProperties, RendererOptions } from './properties';
import { HEATMAP_OPTIONS, RENDERER_PALETTE } from '../Components/Map/constants';

Expand Down
5 changes: 4 additions & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
"jsx": "react-jsx",
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true
},
"include": ["src"]
}

0 comments on commit 8afedb3

Please sign in to comment.