Skip to content

Commit 16856e6

Browse files
committed
fix inline type imports
1 parent ffff7e4 commit 16856e6

Some content is hidden

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

66 files changed

+147
-143
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@typescript-eslint/consistent-type-imports": [
2323
2,
2424
{
25-
"fixStyle": "separate-type-imports"
25+
"fixStyle": "inline-type-imports"
2626
}
2727
],
2828
"@typescript-eslint/no-restricted-imports": [

src/api/endpoints.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type {
33
MutationDefinition,
44
} from "@reduxjs/toolkit/query"
55

6-
import { FetchBaseQuery } from "./baseQuery"
7-
import { TagTypes } from "./tagTypes"
6+
import { type FetchBaseQuery } from "./baseQuery"
7+
import { type TagTypes } from "./tagTypes"
88

99
export type LogoutQuery = null
1010
export type LogoutResult = null

src/components/App.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react"
2-
import { Provider, ProviderProps } from "react-redux"
3-
import { Action, AnyAction } from "redux"
2+
import { Provider, type ProviderProps } from "react-redux"
3+
import { type Action, type AnyAction } from "redux"
44
import { ThemeProvider, CssBaseline } from "@mui/material"
5-
import { ThemeProviderProps } from "@mui/material/styles/ThemeProvider"
5+
import { type ThemeProviderProps } from "@mui/material/styles/ThemeProvider"
66

77
import {
88
useExternalScript,

src/components/ClickableTooltip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { Tooltip, TooltipProps } from "@mui/material"
2+
import { Tooltip, type TooltipProps } from "@mui/material"
33

44
import { wrap } from "../helpers"
55

src/components/CopyIconButton.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from "react"
2-
import { IconButton, IconButtonProps } from "@mui/material"
1+
import type React from "react"
2+
import { IconButton, type IconButtonProps } from "@mui/material"
33
import { ContentCopy as ContentCopyIcon } from "@mui/icons-material"
44

55
export interface CopyIconButtonProps extends Omit<IconButtonProps, "onClick"> {

src/components/Countdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { Typography, TypographyProps } from "@mui/material"
2+
import { Typography, type TypographyProps } from "@mui/material"
33

44
import { useCountdown } from "../hooks"
55

src/components/ElevatedAppBar.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from "react"
22
import {
33
AppBar,
4-
AppBarProps,
4+
type AppBarProps,
55
Toolbar,
6-
ToolbarProps,
6+
type ToolbarProps,
77
useScrollTrigger,
88
Container,
9-
ContainerProps,
9+
type ContainerProps,
1010
} from "@mui/material"
1111

1212
export interface ElevatedAppBarProps extends Omit<AppBarProps, "position"> {

src/components/Image.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from "react"
2-
import { Box, BoxProps } from "@mui/material"
1+
import type React from "react"
2+
import { Box, type BoxProps } from "@mui/material"
33

44
import { openInNewTab } from "../helpers"
55

src/components/ItemizedList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from "react"
2-
import { List, ListProps, ListItem, ListItemText } from "@mui/material"
1+
import type React from "react"
2+
import { List, type ListProps, type ListItem, type ListItemText } from "@mui/material"
33

44
type ListItemElement = React.ReactElement<typeof ListItem | typeof ListItemText>
55

src/components/OrderedGrid.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from "react"
2-
import { Unstable_Grid2 as Grid, Grid2Props } from "@mui/material"
1+
import type React from "react"
2+
import { Unstable_Grid2 as Grid, type Grid2Props } from "@mui/material"
33

44
interface ItemProps
55
extends Omit<

src/components/ScrollRoutes.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { Routes, RoutesProps, useLocation } from "react-router-dom"
2+
import { Routes, type RoutesProps, useLocation } from "react-router-dom"
33

44
export interface ScrollRoutesProps extends RoutesProps {
55
x?: number

src/components/YouTubeVideo.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from "react"
2-
import { Box, BoxProps } from "@mui/material"
1+
import type React from "react"
2+
import { Box, type BoxProps } from "@mui/material"
33

44
export interface YouTubeVideoProps extends Omit<BoxProps, "component"> {
55
src: string

src/components/form/AutocompleteField.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import React from "react"
22
import { flushSync } from "react-dom"
33
import {
44
Autocomplete,
5-
AutocompleteProps,
6-
ChipTypeMap,
5+
type AutocompleteProps,
6+
type ChipTypeMap,
77
TextField,
8-
TextFieldProps,
8+
type TextFieldProps,
99
useTheme,
1010
InputAdornment,
1111
} from "@mui/material"
1212
import { ErrorOutline as ErrorOutlineIcon } from "@mui/icons-material"
13-
import { Field, FieldProps, FieldConfig } from "formik"
13+
import { Field, type FieldProps, type FieldConfig } from "formik"
1414
import { string as YupString, ValidationError as YupValidationError } from "yup"
1515

1616
import { wrap } from "../../helpers"

src/components/form/CheckboxField.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from "react"
22
import {
33
FormControlLabel,
4-
FormControlLabelProps,
4+
type FormControlLabelProps,
55
Checkbox,
6-
CheckboxProps,
6+
type CheckboxProps,
77
Stack,
88
} from "@mui/material"
99
import { Error as ErrorIcon } from "@mui/icons-material"
10-
import { Field, FieldProps, FieldConfig, FieldValidator } from "formik"
10+
import { Field, type FieldProps, type FieldConfig, type FieldValidator } from "formik"
1111
import { bool as YupBool, BooleanSchema, ValidationError } from "yup"
1212

1313
import { wrap } from "../../helpers"

src/components/form/DateField.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import React from "react"
22
import {
33
Unstable_Grid2 as Grid,
44
Select,
5-
SelectProps,
5+
type SelectProps,
66
MenuItem,
77
FormHelperText,
8-
FormHelperTextProps,
9-
SelectChangeEvent,
8+
type FormHelperTextProps,
9+
type SelectChangeEvent,
1010
} from "@mui/material"
11-
import { Field, FieldProps, FieldConfig } from "formik"
11+
import { Field, type FieldProps, type FieldConfig } from "formik"
1212

1313
import { form as formTypography } from "../../theme/typography"
1414
import { MIN_DATE } from "../../helpers/general"

src/components/form/EmailField.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react"
1+
import type React from "react"
22
import { InputAdornment } from "@mui/material"
33
import { EmailOutlined as EmailOutlinedIcon } from "@mui/icons-material"
44
import { string as YupString } from "yup"
55

6-
import TextField, { TextFieldProps } from "./TextField"
6+
import TextField, { type TextFieldProps } from "./TextField"
77

88
export interface EmailFieldProps extends Omit<TextFieldProps, "type" | "name"> {
99
name?: string

src/components/form/Form.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react"
2-
import { Stack, StackProps } from "@mui/material"
3-
import { Formik, FormikValues, FormikConfig, Form as FormikForm } from "formik"
2+
import { Stack, type StackProps } from "@mui/material"
3+
import { Formik, type FormikValues, type FormikConfig, Form as FormikForm } from "formik"
44

55
export interface FormProps<Values> extends FormikConfig<Values> {
66
stackProps?: Omit<StackProps, "children">

src/components/form/PasswordField.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react"
1+
import type React from "react"
22
import { InputAdornment } from "@mui/material"
33
import { Security as SecurityIcon } from "@mui/icons-material"
44
import { string as YupString } from "yup"
55

6-
import TextField, { TextFieldProps } from "./TextField"
6+
import TextField, { type TextFieldProps } from "./TextField"
77

88
export interface PasswordFieldProps
99
extends Omit<TextFieldProps, "type" | "name"> {

src/components/form/SubmitButton.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from "react"
2-
import { Button, ButtonProps, Stack, StackProps } from "@mui/material"
3-
import { Field, FieldProps, FormikProps } from "formik"
1+
import type React from "react"
2+
import { Button, type ButtonProps, Stack, type StackProps } from "@mui/material"
3+
import { Field, type FieldProps, type FormikProps } from "formik"
44

55
export interface SubmitButtonProps
66
extends Omit<ButtonProps, "type" | "disabled"> {

src/components/form/TextField.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import React from "react"
22
import {
33
TextField as MuiTextField,
4-
TextFieldProps as MuiTextFieldProps,
4+
type TextFieldProps as MuiTextFieldProps,
55
InputAdornment,
66
} from "@mui/material"
77
import { ErrorOutline as ErrorOutlineIcon } from "@mui/icons-material"
8-
import { Field, FieldProps, FieldConfig, FieldValidator } from "formik"
8+
import { Field, type FieldProps, type FieldConfig, type FieldValidator } from "formik"
99
import {
1010
string as YupString,
1111
array as YupArray,
1212
Schema,
13-
StringSchema,
14-
ArraySchema,
15-
AnyObject,
13+
type StringSchema,
14+
type ArraySchema,
15+
type AnyObject,
1616
ValidationError,
1717
} from "yup"
1818

src/components/form/index.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { FormikErrors } from "formik"
1+
import { type FormikErrors } from "formik"
22

3-
import AutocompleteField, { AutocompleteFieldProps } from "./AutocompleteField"
4-
import CheckboxField, { CheckboxFieldProps } from "./CheckboxField"
5-
import DateField, { DateFieldProps } from "./DateField"
6-
import EmailField, { EmailFieldProps } from "./EmailField"
7-
import Form, { FormProps } from "./Form"
8-
import PasswordField, { PasswordFieldProps } from "./PasswordField"
9-
import SubmitButton, { SubmitButtonProps } from "./SubmitButton"
10-
import TextField, { TextFieldProps } from "./TextField"
3+
import AutocompleteField, { type AutocompleteFieldProps } from "./AutocompleteField"
4+
import CheckboxField, { type CheckboxFieldProps } from "./CheckboxField"
5+
import DateField, { type DateFieldProps } from "./DateField"
6+
import EmailField, { type EmailFieldProps } from "./EmailField"
7+
import Form, { type FormProps } from "./Form"
8+
import PasswordField, { type PasswordFieldProps } from "./PasswordField"
9+
import SubmitButton, { type SubmitButtonProps } from "./SubmitButton"
10+
import TextField, { type TextFieldProps } from "./TextField"
1111

1212
export {
1313
type FormikErrors as FormErrors,

src/components/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import App, { AppProps } from "./App"
2-
import ClickableTooltip, { ClickableTooltipProps } from "./ClickableTooltip"
3-
import CopyIconButton, { CopyIconButtonProps } from "./CopyIconButton"
4-
import Countdown, { CountdownProps } from "./Countdown"
5-
import ElevatedAppBar, { ElevatedAppBarProps } from "./ElevatedAppBar"
6-
import Image, { ImageProps } from "./Image"
7-
import ItemizedList, { ItemizedListProps } from "./ItemizedList"
8-
import OrderedGrid, { OrderedGridProps } from "./OrderedGrid"
9-
import ScrollRoutes, { ScrollRoutesProps } from "./ScrollRoutes"
10-
import YouTubeVideo, { YouTubeVideoProps } from "./YouTubeVideo"
1+
import App, { type AppProps } from "./App"
2+
import ClickableTooltip, { type ClickableTooltipProps } from "./ClickableTooltip"
3+
import CopyIconButton, { type CopyIconButtonProps } from "./CopyIconButton"
4+
import Countdown, { type CountdownProps } from "./Countdown"
5+
import ElevatedAppBar, { type ElevatedAppBarProps } from "./ElevatedAppBar"
6+
import Image, { type ImageProps } from "./Image"
7+
import ItemizedList, { type ItemizedListProps } from "./ItemizedList"
8+
import OrderedGrid, { type OrderedGridProps } from "./OrderedGrid"
9+
import ScrollRoutes, { type ScrollRoutesProps } from "./ScrollRoutes"
10+
import YouTubeVideo, { type YouTubeVideoProps } from "./YouTubeVideo"
1111

1212
export {
1313
App,

src/components/page/Banner.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react"
2-
import { Typography, Stack, Button, ButtonProps } from "@mui/material"
1+
import type React from "react"
2+
import { Typography, Stack, Button, type ButtonProps } from "@mui/material"
33

44
import palette from "../../theme/palette"
55
import { primary, secondary, tertiary } from "../../theme/colors"
6-
import Image, { ImageProps } from "../Image"
6+
import Image, { type ImageProps } from "../Image"
77
import Section from "./Section"
88

99
export interface BannerProps {

src/components/page/Container.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Unstable_Grid2 as Grid, Grid2Props } from "@mui/material"
1+
import { Unstable_Grid2 as Grid, type Grid2Props } from "@mui/material"
22
import React from "react"
33
import { useLocation } from "react-router-dom"
44

5-
import Notification, { NotificationProps } from "./Notification"
5+
import Notification, { type NotificationProps } from "./Notification"
66

77
export interface ContainerState {
88
notifications?: Array<{

src/components/page/Section.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React from "react"
1+
import type React from "react"
22
import {
33
Unstable_Grid2 as Grid,
4-
Grid2Props,
4+
type Grid2Props,
55
Container,
6-
ContainerProps,
6+
type ContainerProps,
77
} from "@mui/material"
88

99
export interface SectionProps extends ContainerProps {

src/components/page/TabBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
import {
66
IconButton,
77
Tab,
8-
TabScrollButtonProps,
8+
type TabScrollButtonProps,
99
Tabs,
1010
Typography,
1111
} from "@mui/material"

src/components/page/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Banner, { BannerProps } from "./Banner"
2-
import Container, { ContainerProps, ContainerState } from "./Container"
3-
import Notification, { NotificationProps } from "./Notification"
4-
import Section, { SectionProps } from "./Section"
5-
import TabBar, { TabBarProps } from "./TabBar"
1+
import Banner, { type BannerProps } from "./Banner"
2+
import Container, { type ContainerProps, type ContainerState } from "./Container"
3+
import Notification, { type NotificationProps } from "./Notification"
4+
import Section, { type SectionProps } from "./Section"
5+
import TabBar, { type TabBarProps } from "./TabBar"
66

77
export type {
88
BannerProps,

src/features/InactiveDialog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react"
1+
import type React from "react"
22
import { Button, Dialog, Typography } from "@mui/material"
33

44
import { Countdown } from "../components"

src/features/ScreenTimeDialog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react"
1+
import type React from "react"
22
import { Button, Dialog, Typography } from "@mui/material"
33

44
import { Image } from "../components"

src/features/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import InactiveDialog, { InactiveDialogProps } from "./InactiveDialog"
2-
import ScreenTimeDialog, { ScreenTimeDialogProps } from "./ScreenTimeDialog"
1+
import InactiveDialog, { type InactiveDialogProps } from "./InactiveDialog"
2+
import ScreenTimeDialog, { type ScreenTimeDialogProps } from "./ScreenTimeDialog"
33

44
export {
55
InactiveDialog,

src/helpers/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
openInNewTab,
33
wrap,
44
path,
5-
Path,
5+
type Path,
66
snakeCaseToCamelCase,
77
camelCaseToSnakeCase,
88
} from "./general"

src/helpers/materialUI.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from "react"
2-
import { Divider, DividerProps, ThemeOptions } from "@mui/material"
3-
import { CommonProps } from "@mui/material/OverridableComponent"
1+
import type React from "react"
2+
import { Divider, type DividerProps, type ThemeOptions } from "@mui/material"
3+
import { type CommonProps } from "@mui/material/OverridableComponent"
44

55
import _components from "../theme/components"
66

src/helpers/yup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InferType, ValidateOptions, ValidationError, ObjectSchema } from "yup"
1+
import { type InferType, type ValidateOptions, ValidationError, type ObjectSchema } from "yup"
22

33
export function tryValidateSync<Schema extends ObjectSchema<any>>(
44
value: any,

0 commit comments

Comments
 (0)