Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Convert alias path imports to relative imports #950

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/jsonld/article.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import { setAuthor } from 'src/utils/schema/setAuthor';
import { setPublisher } from 'src/utils/schema/setPublisher';
import { setAuthor } from '../utils/schema/setAuthor';
import { setPublisher } from '../utils/schema/setPublisher';

export interface ArticleJsonLdProps extends JsonLdProps {
type?: 'Article' | 'Blog' | 'NewsArticle';
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/brand.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import type { AggregateRating } from 'src/types';
import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import type { AggregateRating } from '../types';
import { setAggregateRating } from '../utils/schema/setAggregateRating';

import { JsonLd, JsonLdProps } from './jsonld';

Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import type { ItemListElements } from 'src/types';
import { setItemListElements } from 'src/utils/schema/setItemListElements';
import type { ItemListElements } from '../types';
import { setItemListElements } from '../utils/schema/setItemListElements';

import { JsonLd, JsonLdProps } from './jsonld';

Expand Down
16 changes: 8 additions & 8 deletions src/jsonld/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';

import type { CourseJsonLdProps, RecipeJsonLdProps } from 'src/index';
import type { Review, AggregateRating } from 'src/types';
import { setReviews } from 'src/utils/schema/setReviews';
import { setAuthor } from 'src/utils/schema/setAuthor';
import { setNutrition } from 'src/utils/schema/setNutrition';
import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import { setVideo } from 'src/utils/schema/setVideo';
import { setInstruction } from 'src/utils/schema/setInstruction';
import type { CourseJsonLdProps, RecipeJsonLdProps } from '../index';
import type { Review, AggregateRating } from '../types';
import { setReviews } from '../utils/schema/setReviews';
import { setAuthor } from '../utils/schema/setAuthor';
import { setNutrition } from '../utils/schema/setNutrition';
import { setAggregateRating } from '../utils/schema/setAggregateRating';
import { setVideo } from '../utils/schema/setVideo';
import { setInstruction } from '../utils/schema/setInstruction';

type Director = {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/collectionPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type { CreativeWork } from 'src/types';
import { setCreativeWork } from 'src/utils/schema/setCreativeWork';
import type { CreativeWork } from '../types';
import { setCreativeWork } from '../utils/schema/setCreativeWork';

export interface CollectionPageJsonLdProps extends JsonLdProps {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/corporateContact.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type { ContactPoint } from 'src/types';
import type { ContactPoint } from '../types';

import { setContactPoint } from 'src/utils/schema/setContactPoint';
import { setContactPoint } from '../utils/schema/setContactPoint';

export interface CorporateContactJsonLdProps extends JsonLdProps {
url: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/course.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import type { Provider } from 'src/types';
import { setProvider } from 'src/utils/schema/setProvider';
import type { Provider } from '../types';
import { setProvider } from '../utils/schema/setProvider';

import { JsonLd, JsonLdProps } from './jsonld';

Expand Down
10 changes: 5 additions & 5 deletions src/jsonld/event.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type { Location, AggregateOffer, Offers, Performer } from 'src/types';
import { setLocation } from 'src/utils/schema/setLocation';
import { setPerformer } from 'src/utils/schema/setPerformer';
import { setOffers } from 'src/utils/schema/setOffers';
import { setAggregateOffer } from 'src/utils/schema/setAggregateOffer';
import type { Location, AggregateOffer, Offers, Performer } from '../types';
import { setLocation } from '../utils/schema/setLocation';
import { setPerformer } from '../utils/schema/setPerformer';
import { setOffers } from '../utils/schema/setOffers';
import { setAggregateOffer } from '../utils/schema/setAggregateOffer';

export interface EventJsonLdProps extends JsonLdProps {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/faqPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';

import type { Question } from 'src/types';
import type { Question } from '../types';
import { JsonLd, JsonLdProps } from './jsonld';
import { setQuestions } from 'src/utils/schema/setQuestions';
import { setQuestions } from '../utils/schema/setQuestions';

export interface FAQPageJsonLdProps extends JsonLdProps {
mainEntity: Question[];
Expand Down
2 changes: 1 addition & 1 deletion src/jsonld/jsonld.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Head from 'next/head';

import toJson from 'src/utils/toJson';
import toJson from '../utils/toJson';

export interface JsonLdProps {
type?: string;
Expand Down
18 changes: 9 additions & 9 deletions src/jsonld/localBusiness.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import type {
GeoCircle,
OpeningHoursSpecification,
Offer,
} from 'src/types';
import { setAddress } from 'src/utils/schema/setAddress';
import { setReviews } from 'src/utils/schema/setReviews';
import { setGeo } from 'src/utils/schema/setGeo';
import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import { setAction } from 'src/utils/schema/setAction';
import { setGeoCircle } from 'src/utils/schema/setGeoCircle';
import { setOffer } from 'src/utils/schema/setOffer';
import { setOpeningHours } from 'src/utils/schema/setOpeningHours';
} from '../types';
import { setAddress } from '../utils/schema/setAddress';
import { setReviews } from '../utils/schema/setReviews';
import { setGeo } from '../utils/schema/setGeo';
import { setAggregateRating } from '../utils/schema/setAggregateRating';
import { setAction } from '../utils/schema/setAction';
import { setGeoCircle } from '../utils/schema/setGeoCircle';
import { setOffer } from '../utils/schema/setOffer';
import { setOpeningHours } from '../utils/schema/setOpeningHours';

export interface LocalBusinessJsonLdProps extends JsonLdProps {
type: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/newsarticle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { setAuthor } from 'src/utils/schema/setAuthor';
import { setPublisher } from 'src/utils/schema/setPublisher';
import { setAuthor } from '../utils/schema/setAuthor';
import { setPublisher } from '../utils/schema/setPublisher';

import { JsonLd, JsonLdProps } from './jsonld';

Expand Down
6 changes: 3 additions & 3 deletions src/jsonld/organization.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';

import type { Address, OrganizationCategory, ContactPoint } from 'src/types';
import type { Address, OrganizationCategory, ContactPoint } from '../types';
import { JsonLd, JsonLdProps } from './jsonld';
import { setAddress } from 'src/utils/schema/setAddress';
import { setContactPoints } from 'src/utils/schema/setContactPoints';
import { setAddress } from '../utils/schema/setAddress';
import { setContactPoints } from '../utils/schema/setContactPoints';

export interface OrganizationJsonLdProps extends JsonLdProps {
type?: OrganizationCategory;
Expand Down
19 changes: 7 additions & 12 deletions src/jsonld/product.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type {
Review,
AggregateRating,
AggregateOffer,
Offers,
} from 'src/types';
import type { Review, AggregateRating, AggregateOffer, Offers } from '../types';

import { setOffers } from 'src/utils/schema/setOffers';
import { setReviews } from 'src/utils/schema/setReviews';
import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import { setAggregateOffer } from 'src/utils/schema/setAggregateOffer';
import { setManufacturer } from 'src/utils/schema/setManufacturer';
import { setBrand } from 'src/utils/schema/setBrand';
import { setOffers } from '../utils/schema/setOffers';
import { setReviews } from '../utils/schema/setReviews';
import { setAggregateRating } from '../utils/schema/setAggregateRating';
import { setAggregateOffer } from '../utils/schema/setAggregateOffer';
import { setManufacturer } from '../utils/schema/setManufacturer';
import { setBrand } from '../utils/schema/setBrand';

export interface ProductJsonLdProps extends JsonLdProps {
productName: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/profilePage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type { ItemListElements } from 'src/types';
import { setItemListElements } from 'src/utils/schema/setItemListElements';
import type { ItemListElements } from '../types';
import { setItemListElements } from '../utils/schema/setItemListElements';

export interface ProfilePageJsonLdProps extends JsonLdProps {
breadcrumb: string | ItemListElements[];
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/qaPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import type { Question } from 'src/types';
import { setAuthor } from 'src/utils/schema/setAuthor';
import type { Question } from '../types';
import { setAuthor } from '../utils/schema/setAuthor';

import { JsonLd, JsonLdProps } from './jsonld';

Expand Down
12 changes: 6 additions & 6 deletions src/jsonld/recipe.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type { Instruction, AggregateRating, Video } from 'src/types';
import type { Instruction, AggregateRating, Video } from '../types';

import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import { setAuthor } from 'src/utils/schema/setAuthor';
import { setVideo } from 'src/utils/schema/setVideo';
import { setInstruction } from 'src/utils/schema/setInstruction';
import { setNutrition } from 'src/utils/schema/setNutrition';
import { setAggregateRating } from '../utils/schema/setAggregateRating';
import { setAuthor } from '../utils/schema/setAuthor';
import { setVideo } from '../utils/schema/setVideo';
import { setInstruction } from '../utils/schema/setInstruction';
import { setNutrition } from '../utils/schema/setNutrition';

export interface RecipeJsonLdProps extends JsonLdProps {
name: string;
Expand Down
6 changes: 3 additions & 3 deletions src/jsonld/softwareApp.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';

import { JsonLd, JsonLdProps } from './jsonld';
import type { Review, AggregateRating } from 'src/types';
import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import { setReviews } from 'src/utils/schema/setReviews';
import type { Review, AggregateRating } from '../types';
import { setAggregateRating } from '../utils/schema/setAggregateRating';
import { setReviews } from '../utils/schema/setReviews';

export interface SoftwareAppJsonLdProps extends JsonLdProps {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/video.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { Video } from 'src/types';
import { Video } from '../types';

import { JsonLd, JsonLdProps } from './jsonld';
import { setVideo } from 'src/utils/schema/setVideo';
import { setVideo } from '../utils/schema/setVideo';

export interface VideoJsonLdProps extends JsonLdProps, Video {}

Expand Down
18 changes: 9 additions & 9 deletions src/jsonld/videoGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import type {
Video,
Review,
ApplicationCategory,
} from 'src/types';
import { setAggregateRating } from 'src/utils/schema/setAggregateRating';
import { setAuthor } from 'src/utils/schema/setAuthor';
import { setImage } from 'src/utils/schema/setImage';
import { setOffers } from 'src/utils/schema/setOffers';
import { setProducer } from 'src/utils/schema/setProducer';
import { setProvider } from 'src/utils/schema/setProvider';
import { setReviews } from 'src/utils/schema/setReviews';
import { setVideo } from 'src/utils/schema/setVideo';
} from '../types';
import { setAggregateRating } from '../utils/schema/setAggregateRating';
import { setAuthor } from '../utils/schema/setAuthor';
import { setImage } from '../utils/schema/setImage';
import { setOffers } from '../utils/schema/setOffers';
import { setProducer } from '../utils/schema/setProducer';
import { setProvider } from '../utils/schema/setProvider';
import { setReviews } from '../utils/schema/setReviews';
import { setVideo } from '../utils/schema/setVideo';

import { JsonLd, JsonLdProps } from './jsonld';

Expand Down
4 changes: 2 additions & 2 deletions src/jsonld/webPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import type { ReviewedBy } from 'src/types';
import type { ReviewedBy } from '../types';

import { JsonLd } from './jsonld';
import { setReviewedBy } from 'src/utils/schema/setReviewedBy';
import { setReviewedBy } from '../utils/schema/setReviewedBy';

export interface WebPageJsonLdProps {
keyOverride?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setAction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Action } from 'src/types';
import { Action } from '../../types';

export function setAction(action?: Action) {
if (action) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setAddress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address } from 'src/types';
import { Address } from '../../types';

export function setAddress(address?: Address) {
if (address) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setAggregateOffer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AggregateOffer } from 'src/types';
import type { AggregateOffer } from '../../types';
import { setOffers } from './setOffers';

export function setAggregateOffer(aggregateOffer?: AggregateOffer) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setAggregateRating.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AggregateRating } from 'src/types';
import type { AggregateRating } from '../../types';

export function setAggregateRating(aggregateRating?: AggregateRating) {
if (aggregateRating) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setBroadcastEvent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BroadcastEvent } from 'src/types';
import type { BroadcastEvent } from '../../types';

export function setBroadcastEvent(
publication?: BroadcastEvent | BroadcastEvent[],
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setClip.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Clip } from 'src/types';
import { Clip } from '../../types';

export function setClip(clips?: Clip | Clip[]) {
function mapClip(clip: Clip) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setContactPoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContactPoint } from 'src/types';
import { ContactPoint } from '../../types';

export function setContactPoint(contactPoint: ContactPoint) {
if (contactPoint) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setContactPoints.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ContactPoint } from 'src/types';
import type { ContactPoint } from '../../types';

export function setContactPoints(contactPoint?: ContactPoint[]) {
if (contactPoint && contactPoint.length) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setCreativeWork.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CreativeWork } from 'src/types';
import { CreativeWork } from '../../types';

export function setCreativeWork(creativeWork: CreativeWork) {
if (creativeWork) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setGeo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Geo } from 'src/types';
import { Geo } from '../../types';

export function setGeo(geo?: Geo) {
if (geo) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setGeoCircle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GeoCircle } from 'src/types';
import { GeoCircle } from '../../types';

export function setGeoCircle(geoCircle?: GeoCircle) {
if (geoCircle) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setInstruction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Instruction } from 'src/types';
import { Instruction } from '../../types';

export function setInstruction(instruction: Instruction) {
if (instruction) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setItemListElements.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ItemListElements } from 'src/types';
import { ItemListElements } from '../../types';

export function setItemListElements(items: ItemListElements[]) {
if (items && items.length) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setLocation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Location } from 'src/types';
import { Location } from '../../types';
import { setAddress } from './setAddress';

export function setLocation(location: Location) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setOffer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Offer } from 'src/types';
import type { Offer } from '../../types';

export function setOffer(offer?: Offer) {
function setPriceSpecification(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/schema/setOffers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Offers } from 'src/types';
import { Offers } from '../../types';

export function setOffers(offers?: Offers | Offers[]) {
function mapOffer({ seller, ...rest }: Offers) {
Expand Down
Loading