Skip to content

Commit

Permalink
fix: 遵循 import type convention
Browse files Browse the repository at this point in the history
  • Loading branch information
amowu committed Mar 5, 2022
1 parent 64ddaa7 commit 8742734
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/templates/component/component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const COMPONENT_TEMPLATE = `import { FC } from 'react';
const COMPONENT_TEMPLATE = `import type { FC } from 'react';
import { Styled{{name}} } from './{{name}}.style';
import type { {{name}}Props } from './{{name}}.type';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/component/stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const STORIES_TEMPLATE = `import { action } from '@storybook/addon-actions';
import { Meta, Story } from '@storybook/react';
import type { Meta, Story } from '@storybook/react';
import {{name}} from './{{name}}';
import type { {{name}}Props } from './{{name}}.type';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/hoc/hoc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const HOC_TEMPLATE = `import { FC, memo } from 'react';
const HOC_TEMPLATE = `import type { FC, memo } from 'react';
import type { PropsAreEqual } from './{{name}}.type';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/hook/hook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const HOOK_TEMPLATE = `import { gql, useQuery } from '@apollo/client';
import { useReducer } from 'react';
import { QueryCoursesArgs } from '@/types/graphql';
import type { QueryCoursesArgs } from '@/types/graphql';
import type { ActionType, CoursesData } from './{{name}}.type';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/hook/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const TYPE_TEMPLATE = `import { Course } from '@/types/graphql';
const TYPE_TEMPLATE = `import type { Course } from '@/types/graphql';
export interface CoursesData {
courses: {
Expand Down

0 comments on commit 8742734

Please sign in to comment.