Skip to content

Commit 27ecfaf

Browse files
committed
feat: add consistent type imports
1 parent 3effc1d commit 27ecfaf

File tree

68 files changed

+109
-108
lines changed

Some content is hidden

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

68 files changed

+109
-108
lines changed

packages/apps/dashboard/client/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default tseslint.config(
7272
],
7373
'import/no-duplicates': 'error',
7474
'import/no-unresolved': 'error',
75+
'@typescript-eslint/consistent-type-imports': 'error',
7576
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
7677
'@typescript-eslint/no-explicit-any': 'error',
7778
'no-console': ['error', { allow: ['warn', 'error'] }],

packages/apps/dashboard/client/src/app/AppRoutes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FC } from 'react';
1+
import type { FC } from 'react';
22

33
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
44

packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {
2-
FC,
3-
PropsWithChildren,
2+
type FC,
3+
type PropsWithChildren,
44
useCallback,
55
useEffect,
66
useMemo,
77
useState,
88
} from 'react';
99

10-
import { PaletteMode } from '@mui/material';
10+
import type { PaletteMode } from '@mui/material';
1111
import CssBaseline from '@mui/material/CssBaseline';
1212
import MuiThemeProvider from '@mui/material/styles/ThemeProvider';
1313

packages/apps/dashboard/client/src/features/graph/api/useChartData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import validateResponse from '@/shared/lib/validateResponse';
1010

1111
import {
1212
hcaptchaDailyStatsSchema,
13-
HcaptchaDailyStats,
13+
type HcaptchaDailyStats,
1414
} from '../model/hcaptchaDailyStatsSchema';
1515
import {
1616
hmtDailyStatsSchema,
17-
HMTDailyStats,
17+
type HMTDailyStats,
1818
} from '../model/hmtDailyStatsSchema';
1919

2020
export type ChartData = (HMTDailyStats & Omit<HcaptchaDailyStats, 'date'>)[];

packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import dayjs, { Dayjs } from 'dayjs';
1+
import dayjs, { type Dayjs } from 'dayjs';
22
import { create } from 'zustand';
33

44
const MINIMAL_DATE_FOR_DATE_PICKER = '2021-04-06';

packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { FC, useEffect, useRef, useState } from 'react';
1+
import { type FC, useEffect, useRef, useState } from 'react';
22

33
import Card from '@mui/material/Card';
44
import Stack from '@mui/material/Stack';
55
import useTheme from '@mui/material/styles/useTheme';
66
import Typography from '@mui/material/Typography';
7-
import dayjs, { Dayjs } from 'dayjs';
7+
import dayjs, { type Dayjs } from 'dayjs';
88
import {
99
CartesianGrid,
1010
Tooltip,
@@ -17,7 +17,7 @@ import {
1717

1818
import DatePicker from '@/shared/ui/DatePicker';
1919

20-
import useChartData, { ChartData } from '../api/useChartData';
20+
import useChartData, { type ChartData } from '../api/useChartData';
2121
import formatNumber from '../lib/formatNumber';
2222
import useChartParamsStore, {
2323
initialAllTime,

packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { FC } from 'react';
1+
import type { FC } from 'react';
22

33
import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';
44
import Box from '@mui/material/Box';
55
import Card from '@mui/material/Card';
66
import Grid from '@mui/material/Grid';
77
import Stack from '@mui/material/Stack';
88
import Typography from '@mui/material/Typography';
9-
import { TooltipProps } from 'recharts';
9+
import type { TooltipProps } from 'recharts';
1010

1111
import FormattedNumber from '@/shared/ui/FormattedNumber';
1212

1313
import formatDate from '../lib/formatDate';
1414

15-
import { ChartDataConfigObject } from './AreaChart';
15+
import type { ChartDataConfigObject } from './AreaChart';
1616

1717
const renderTitle = (title: string) => {
1818
const currentTitle: ChartDataConfigObject<string> = {

packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import useTheme from '@mui/material/styles/useTheme';
22
// @ts-expect-error -- import error, but this type work property
3-
import { ContentRenderer } from 'recharts';
3+
import type { ContentRenderer } from 'recharts';
44

55
import formatDate from '../lib/formatDate';
66

packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FC, useEffect } from 'react';
1+
import { type FC, useEffect } from 'react';
22

33
import { Navigation } from 'swiper/modules';
44
import { Swiper, SwiperSlide } from 'swiper/react';

packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FC, Fragment } from 'react';
1+
import { type FC, Fragment } from 'react';
22

33
import Box from '@mui/material/Box';
44
import Card from '@mui/material/Card';
@@ -11,7 +11,7 @@ import {
1111
CartesianGrid,
1212
ResponsiveContainer,
1313
Tooltip,
14-
TooltipProps,
14+
type TooltipProps,
1515
XAxis,
1616
YAxis,
1717
} from 'recharts';

0 commit comments

Comments
 (0)