diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-19 18:13:57 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-09-19 19:12:31 +0200 |
| commit | 2faf2e34331703b3bdea3eb487cb8799c8d65377 (patch) | |
| tree | dedc6557ddaa8fedd42d9bdf77950f8f9168ebcb /src/services | |
| parent | d1fe9e2164fc5c8fd767b456eecc2a4eb929a33f (diff) | |
refactor(build): replace paths aliases with relative paths
Using paths aliases starting with "@" can be confusing and can lead to
conflict with existings modules. I prefer to use relative paths to
avoid extra configuration in tools because of these aliases.
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/graphql/api.ts | 6 | ||||
| -rw-r--r-- | src/services/graphql/articles.ts | 17 | ||||
| -rw-r--r-- | src/services/graphql/comments.ts | 12 | ||||
| -rw-r--r-- | src/services/graphql/contact.ts | 2 | ||||
| -rw-r--r-- | src/services/graphql/thematics.ts | 12 | ||||
| -rw-r--r-- | src/services/graphql/topics.ts | 12 |
6 files changed, 32 insertions, 29 deletions
diff --git a/src/services/graphql/api.ts b/src/services/graphql/api.ts index e587ccc..e7f6e57 100644 --- a/src/services/graphql/api.ts +++ b/src/services/graphql/api.ts @@ -2,13 +2,13 @@ import { Mutations, MutationsInputMap, MutationsResponseMap, -} from '@ts/types/graphql/mutations'; +} from '../../types/graphql/mutations'; import { Queries, QueriesInputMap, QueriesResponseMap, -} from '@ts/types/graphql/queries'; -import { settings } from '@utils/config'; +} from '../../types/graphql/queries'; +import { settings } from '../../utils/config'; /** * Retrieve the API url from settings. diff --git a/src/services/graphql/articles.ts b/src/services/graphql/articles.ts index 1a7b2e0..5f98fe9 100644 --- a/src/services/graphql/articles.ts +++ b/src/services/graphql/articles.ts @@ -1,14 +1,17 @@ -import { type Article, type ArticleCard, type Slug } from '@ts/types/app'; -import { GraphQLEdgesInput, GraphQLPageInfo } from '@ts/types/graphql/generics'; -import { EdgesResponse, EndCursorResponse } from '@ts/types/graphql/queries'; +import { type Article, type ArticleCard, type Slug } from '../../types/app'; +import { + GraphQLEdgesInput, + GraphQLPageInfo, +} from '../../types/graphql/generics'; +import { EdgesResponse, EndCursorResponse } from '../../types/graphql/queries'; import { type RawArticle, type RawArticlePreview, type TotalItems, -} from '@ts/types/raw-data'; -import { getAuthorFromRawData } from '@utils/helpers/author'; -import { getImageFromRawData } from '@utils/helpers/images'; -import { getPageLinkFromRawData } from '@utils/helpers/pages'; +} from '../../types/raw-data'; +import { getAuthorFromRawData } from '../../utils/helpers/author'; +import { getImageFromRawData } from '../../utils/helpers/images'; +import { getPageLinkFromRawData } from '../../utils/helpers/pages'; import { fetchAPI } from './api'; import { articleBySlugQuery, diff --git a/src/services/graphql/comments.ts b/src/services/graphql/comments.ts index 41f80b3..426a649 100644 --- a/src/services/graphql/comments.ts +++ b/src/services/graphql/comments.ts @@ -1,9 +1,9 @@ -import { SingleComment } from '@ts/types/app'; -import { GraphQLEdgesInput } from '@ts/types/graphql/generics'; -import { SendCommentInput, SentComment } from '@ts/types/graphql/mutations'; -import { ContentId } from '@ts/types/graphql/queries'; -import { RawComment, RawCommentsPage } from '@ts/types/raw-data'; -import { getAuthorFromRawData } from '@utils/helpers/author'; +import { SingleComment } from '../../types/app'; +import { GraphQLEdgesInput } from '../../types/graphql/generics'; +import { SendCommentInput, SentComment } from '../../types/graphql/mutations'; +import { ContentId } from '../../types/graphql/queries'; +import { RawComment, RawCommentsPage } from '../../types/raw-data'; +import { getAuthorFromRawData } from '../../utils/helpers/author'; import { fetchAPI } from './api'; import { sendCommentMutation } from './comments.mutation'; import { commentsQuery } from './comments.query'; diff --git a/src/services/graphql/contact.ts b/src/services/graphql/contact.ts index de078b9..37c640d 100644 --- a/src/services/graphql/contact.ts +++ b/src/services/graphql/contact.ts @@ -1,4 +1,4 @@ -import { SendMailInput } from '@ts/types/graphql/mutations'; +import { SendMailInput } from '../../types/graphql/mutations'; import { fetchAPI } from './api'; import { sendMailMutation } from './contact.mutation'; diff --git a/src/services/graphql/thematics.ts b/src/services/graphql/thematics.ts index 508fc2f..9210828 100644 --- a/src/services/graphql/thematics.ts +++ b/src/services/graphql/thematics.ts @@ -1,17 +1,17 @@ -import { PageLink, Slug, Thematic } from '@ts/types/app'; -import { GraphQLEdgesInput } from '@ts/types/graphql/generics'; -import { EdgesResponse } from '@ts/types/graphql/queries'; +import { PageLink, Slug, Thematic } from '../../types/app'; +import { GraphQLEdgesInput } from '../../types/graphql/generics'; +import { EdgesResponse } from '../../types/graphql/queries'; import { RawArticle, RawThematic, RawThematicPreview, TotalItems, -} from '@ts/types/raw-data'; -import { getImageFromRawData } from '@utils/helpers/images'; +} from '../../types/raw-data'; +import { getImageFromRawData } from '../../utils/helpers/images'; import { getPageLinkFromRawData, sortPageLinksByName, -} from '@utils/helpers/pages'; +} from '../../utils/helpers/pages'; import { fetchAPI } from './api'; import { getArticleFromRawData } from './articles'; import { diff --git a/src/services/graphql/topics.ts b/src/services/graphql/topics.ts index 5448d89..4c2f609 100644 --- a/src/services/graphql/topics.ts +++ b/src/services/graphql/topics.ts @@ -1,17 +1,17 @@ -import { PageLink, Slug, Topic } from '@ts/types/app'; -import { GraphQLEdgesInput } from '@ts/types/graphql/generics'; -import { EdgesResponse } from '@ts/types/graphql/queries'; +import { PageLink, Slug, Topic } from '../../types/app'; +import { GraphQLEdgesInput } from '../../types/graphql/generics'; +import { EdgesResponse } from '../../types/graphql/queries'; import { RawArticle, RawTopic, RawTopicPreview, TotalItems, -} from '@ts/types/raw-data'; -import { getImageFromRawData } from '@utils/helpers/images'; +} from '../../types/raw-data'; +import { getImageFromRawData } from '../../utils/helpers/images'; import { getPageLinkFromRawData, sortPageLinksByName, -} from '@utils/helpers/pages'; +} from '../../utils/helpers/pages'; import { fetchAPI } from './api'; import { getArticleFromRawData } from './articles'; import { |
