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

Commit

Permalink
style: prefer type { ... } over { type ... }
Browse files Browse the repository at this point in the history
  • Loading branch information
eddybrando committed Jan 16, 2024
1 parent ac56fce commit 4dde30e
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@
</template>

<script setup lang="ts">
import {
ADVOCATES_WORLD_REGION_OPTIONS,
type Advocate,
} from "~/types/advocates";
import { ADVOCATES_WORLD_REGION_OPTIONS } from "~/types/advocates";
import type { Advocate } from "~/types/advocates";
import rawAdvocates from "~/content/advocates/advocates.json";
const advocates = rawAdvocates as Advocate[];
Expand Down
2 changes: 1 addition & 1 deletion components/Events/EventsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Calendar20 from "@carbon/icons-vue/lib/calendar/20";
import Education20 from "@carbon/icons-vue/lib/education/20";
import Map20 from "@carbon/icons-vue/lib/map/20";
import Time20 from "@carbon/icons-vue/lib/time/20";
import { type CtaClickedEventProp } from "~/types/segment";
import type { CtaClickedEventProp } from "~/types/segment";
interface Props {
types?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import EventsFollowOurCalendarInstructionsApple from "~/components/Events/FollowOurCalendar/Instructions/EventsFollowOurCalendarInstructionsApple.vue";
import EventsFollowOurCalendarInstructionsGoogle from "~/components/Events/FollowOurCalendar/Instructions/EventsFollowOurCalendarInstructionsGoogle.vue";
import EventsFollowOurCalendarInstructionsOutlook from "~/components/Events/FollowOurCalendar/Instructions/EventsFollowOurCalendarInstructionsOutlook.vue";
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
const calendarsInstructions = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</template>

<script setup lang="ts">
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
type University = {
image: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
</template>

<script setup lang="ts">
import { type Link } from "~/types/links";
import type { Link } from "~/types/links";
const config = useRuntimeConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
</template>

<script setup lang="ts">
import { type Link } from "~/types/links";
import type { Link } from "~/types/links";
const config = useRuntimeConfig();
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/Footer/LayoutFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import LogoSlack20 from "@carbon/icons-vue/lib/logo--slack/20";
import LogoTwitter20 from "@carbon/icons-vue/lib/logo--twitter/20";
import LogoYouTube20 from "@carbon/icons-vue/lib/logo--youtube/20";
import { SocialMedia } from "~/constants/links";
import { type IconLink, type TextLink } from "~/types/links";
import type { IconLink, TextLink } from "~/types/links";
interface Props {
oldContainer?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/LeadSpace/LayoutLeadSpaceWithCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</template>

<script setup lang="ts">
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
interface Props {
cardTitle: string;
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/DataTable/UiDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</template>

<script setup lang="ts">
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
export interface TableRowElement {
addTooltip?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/Link/UiLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script setup lang="ts">
import { type CtaClickedEventProp } from "~/types/segment";
import type { CtaClickedEventProp } from "~/types/segment";
type NuxtLinkTarget =
| "_blank"
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/Link/UiLinkText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</template>

<script setup lang="ts">
import { type Link } from "~/types/links";
import type { Link } from "~/types/links";
interface Props {
kind?: "primary" | "secondary";
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/Mosaic/UiMosaic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</template>

<script setup lang="ts">
import { type MosaicElement } from "~/types/uiComponents";
import type { MosaicElement } from "~/types/uiComponents";
interface Props {
mosaicElements: MosaicElement[];
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/Mosaic/UiMosaicSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script setup lang="ts">
import { type MosaicElement } from "~/types/uiComponents";
import type { MosaicElement } from "~/types/uiComponents";
interface Props {
description?: string;
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/UiDescriptionCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</template>

<script setup lang="ts">
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
interface Props {
cta: TextLink;
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/UiHelpfulResources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>

<script setup lang="ts">
import { type DescriptionCard } from "~/types/uiComponents";
import type { DescriptionCard } from "~/types/uiComponents";
interface Props {
resources: DescriptionCard[];
Expand Down
2 changes: 1 addition & 1 deletion components/Ui/UiJoinWithCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</template>

<script setup lang="ts">
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
interface Card {
name: string;
Expand Down
8 changes: 5 additions & 3 deletions hooks/event-conversion-utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import Airtable from "airtable";

import {
type CommunityEvent,
type CommunityEventType,
COMMUNITY_EVENT_TYPES,
COMMUNITY_EVENT_TYPE_OPTIONS,
type WorldRegion,
WORLD_REGIONS,
} from "../types/events";
import type {
CommunityEvent,
CommunityEventType,
WorldRegion,
} from "../types/events";
import {
AirtableRecords,
getImageUrl,
Expand Down
2 changes: 1 addition & 1 deletion pages/advocates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>

<script setup lang="ts">
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
definePageMeta({
pageTitle: "Qiskit Advocates",
Expand Down
2 changes: 1 addition & 1 deletion pages/events/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@

<script setup lang="ts">
import {
type CommunityEvent,
WORLD_REGION_OPTIONS,
COMMUNITY_EVENT_TYPE_OPTIONS,
} from "~/types/events";
import type { CommunityEvent } from "~/types/events";
import rawPastEvents from "~/content/events/past-community-events.json";
import rawUpcomingEvents from "~/content/events/upcoming-community-events.json";
Expand Down
6 changes: 3 additions & 3 deletions pages/events/seminar-series.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@
</template>

<script setup lang="ts">
import { type SeminarSeriesEvent } from "~/hooks/event-conversion-utils";
import { type TableRowElement } from "~/components/Ui/DataTable/UiDataTable.vue";
import type { SeminarSeriesEvent } from "~/hooks/event-conversion-utils";
import type { TableRowElement } from "~/components/Ui/DataTable/UiDataTable.vue";
import upcomingSeminarSerieEvents from "~/content/events/upcoming-seminar-series-events.json";
import pastSeminarSeriesEvents from "~/content/events/past-seminar-series-events.json";
import { type TextLink } from "~/types/links";
import type { TextLink } from "~/types/links";
import type { DescriptionCard, MosaicElement } from "~/types/uiComponents";
definePageMeta({
Expand Down
7 changes: 2 additions & 5 deletions tests/hooks/event-conversion-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import axios from "axios";
import { beforeEach, describe, expect, test, vi } from "vitest";
import type { AirtableBase } from "airtable/lib/airtable_base";
import EventsAirtableRecords from "../../hooks/event-conversion-utils";
import {
type CommunityEvent,
COMMUNITY_EVENT_TYPES,
WORLD_REGIONS,
} from "../../types/events";
import { COMMUNITY_EVENT_TYPES, WORLD_REGIONS } from "../../types/events";
import type { CommunityEvent } from "../../types/events";
import { mock } from "./mock/seminarSeriesMock";

vi.mock("axios");
Expand Down

0 comments on commit 4dde30e

Please sign in to comment.