Skip to content

Commit 2b34ce4

Browse files
committed
Add consistent import type rule as an eslint warning, and autofix all files.
1 parent 2d4dfa5 commit 2b34ce4

File tree

143 files changed

+264
-277
lines changed

Some content is hidden

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

143 files changed

+264
-277
lines changed

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default tseslint.config(
3434
},
3535
],
3636
"@typescript-eslint/no-explicit-any": "off",
37+
"@typescript-eslint/consistent-type-imports": "warn",
3738
},
3839
},
3940
storybook.configs["flat/recommended"],

src/atomic-crm/activity/ActivityLog.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { Alert } from "@/components/ui/alert";
22
import { Separator } from "@/components/ui/separator";
33
import { Skeleton } from "@/components/ui/skeleton";
44
import { useQuery } from "@tanstack/react-query";
5-
import { Identifier, useDataProvider } from "ra-core";
5+
import type { Identifier } from "ra-core";
6+
import { useDataProvider } from "ra-core";
67

7-
import { CrmDataProvider } from "../providers/types";
8+
import type { CrmDataProvider } from "../providers/types";
89
import { ActivityLogContext } from "./ActivityLogContext";
910
import { ActivityLogIterator } from "./ActivityLogIterator";
1011

src/atomic-crm/activity/ActivityLogDealCreated.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link } from "react-router";
22

3-
import { RaRecord } from "ra-core";
3+
import type { RaRecord } from "ra-core";
44
import { RelativeDate } from "../misc/RelativeDate";
55
import type { ActivityDealCreated } from "../types";
66
import { useActivityLogContext } from "./ActivityLogContext";

src/atomic-crm/activity/ActivityLogDealNoteCreated.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ReferenceField } from "@/components/admin";
22

3-
import { RaRecord } from "ra-core";
3+
import type { RaRecord } from "ra-core";
44
import { CompanyAvatar } from "../companies/CompanyAvatar";
55
import { RelativeDate } from "../misc/RelativeDate";
66
import { SaleName } from "../sales/SaleName";

src/atomic-crm/activity/ActivityLogIterator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
DEAL_CREATED,
88
DEAL_NOTE_CREATED,
99
} from "../consts";
10-
import { Activity } from "../types";
10+
import type { Activity } from "../types";
1111
import { ActivityLogCompanyCreated } from "./ActivityLogCompanyCreated";
1212
import { ActivityLogContactCreated } from "./ActivityLogContactCreated";
1313
import { ActivityLogContactNoteCreated } from "./ActivityLogContactNoteCreated";

src/atomic-crm/activity/ActivityLogNote.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Fragment, ReactNode } from "react";
1+
import type { ReactNode } from "react";
2+
import { Fragment } from "react";
23

34
type ActivityLogContactNoteCreatedProps = {
45
header: ReactNode;

src/atomic-crm/companies/CompanyAside.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Globe, Linkedin, Phone } from "lucide-react";
1111
import { useRecordContext } from "ra-core";
1212
import { AsideSection } from "../misc/AsideSection";
1313
import { SaleName } from "../sales/SaleName";
14-
import { Company } from "../types";
14+
import type { Company } from "../types";
1515
import { sizes } from "./sizes";
1616

1717
interface CompanyAsideProps {

src/atomic-crm/companies/CompanyAvatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
22
import { useRecordContext } from "ra-core";
33

4-
import { Company } from "../types";
4+
import type { Company } from "../types";
55

66
export const CompanyAvatar = (props: {
77
record?: Company;

src/atomic-crm/companies/CompanyCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useCreatePath, useListContext, useRecordContext } from "ra-core";
55
import { Link } from "react-router";
66

77
import { Avatar as ContactAvatar } from "../contacts/Avatar";
8-
import { Company } from "../types";
8+
import type { Company } from "../types";
99
import { CompanyAvatar } from "./CompanyAvatar";
1010

1111
export const CompanyCard = (props: { record?: Company }) => {

src/atomic-crm/companies/CompanyInputs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { required, useRecordContext } from "ra-core";
1111
import ImageEditorField from "../misc/ImageEditorField";
1212
import { isLinkedinUrl } from "../misc/isLinkedInUrl";
1313
import { useConfigurationContext } from "../root/ConfigurationContext";
14-
import { Company, Sale } from "../types";
14+
import type { Company, Sale } from "../types";
1515
import { sizes } from "./sizes";
1616

1717
const isUrl = (url: string) => {

0 commit comments

Comments
 (0)