spherehq/sphere

View on GitHub

Showing 214 of 214 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export enum SphereVerificationCodeOrderByInput {
IdAsc = 'id_ASC',
IdDesc = 'id_DESC',
IssuedAtAsc = 'issuedAt_ASC',
IssuedAtDesc = 'issuedAt_DESC',
Severity: Major
Found in packages/api/src/types.ts and 2 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 1035..1046
packages/api/src/types.ts on lines 2240..2251

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export enum PostMetadataOrderByInput {
IdAsc = 'id_ASC',
IdDesc = 'id_DESC',
FileHashAsc = 'fileHash_ASC',
FileHashDesc = 'fileHash_DESC',
Severity: Major
Found in packages/api/src/types.ts and 2 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 2075..2086
packages/api/src/types.ts on lines 2240..2251

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export enum SphereVerificationOrderByInput {
IdAsc = 'id_ASC',
IdDesc = 'id_DESC',
UrlAsc = 'url_ASC',
UrlDesc = 'url_DESC',
Severity: Major
Found in packages/api/src/types.ts and 2 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 1035..1046
packages/api/src/types.ts on lines 2075..2086

Function ExchangeTokenResolver has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export const ExchangeTokenResolver = async (
_,
args: { input: ExchangeTokenInput },
context: ServerContext,
) => {

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Box
width={{ xs: 1, md: 1, lg: '80%', xl: '70%' }}
pr={{ xs: 0, md: 8, lg: 8 }}
>
<FeaturedArticle
Severity: Major
Found in packages/platform/src/pages/index.tsx and 1 other location - About 1 hr to fix
packages/platform/src/pages/index.tsx on lines 303..336

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Box
width={{ xs: 1, md: 1, lg: '20%', xl: '30%' }}
mt={{ xs: 8, md: 8, lg: 0 }}
>
<MiniArticleList as="ul" flexDirection={`column`}>
Severity: Major
Found in packages/platform/src/pages/index.tsx and 1 other location - About 1 hr to fix
packages/platform/src/pages/index.tsx on lines 251..302

Function fragmentWithArgs has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export const fragmentWithArgs = info => {
const fields = graphqlFields(info)
const fieldsWithArgs = graphqlFields(info, {}, { processArguments: true })
 
let fragmentStr = `{`
Severity: Minor
Found in packages/api/src/utils/index.ts - About 55 mins to fix

Function VerifySphereResolver has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export const VerifySphereResolver = async (
_,
args: { input: VerifySphereInput },
context: ServerContext,
) => {
Severity: Minor
Found in packages/api/src/modules/account/resolvers/Mutation/VerifySphere.ts - About 55 mins to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Box>
<IconLink
href="https://twitter.com/fullstopmediahq"
rel="noopener"
target="_blank"
Severity: Minor
Found in packages/platform/src/components/Footer/Footer.tsx and 1 other location - About 55 mins to fix
packages/platform/src/components/Footer/Footer.tsx on lines 70..78

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<Box>
<IconLink
href="https://github.com/spherehq"
rel="noopener"
target="_blank"
Severity: Minor
Found in packages/platform/src/components/Footer/Footer.tsx and 1 other location - About 55 mins to fix
packages/platform/src/components/Footer/Footer.tsx on lines 79..87

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export type PostWhereUniqueInput = {
readonly id?: Maybe<Scalars['ID']>
readonly slug?: Maybe<Scalars['String']>
}
Severity: Major
Found in packages/api/src/types.ts and 7 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 319..322
packages/api/src/types.ts on lines 1076..1079
packages/api/src/types.ts on lines 1081..1084
packages/api/src/types.ts on lines 1086..1089
packages/api/src/types.ts on lines 1167..1170
packages/api/src/types.ts on lines 2212..2215
packages/api/src/types.ts on lines 2608..2611

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export type MediaCreateManyInput = {
readonly create?: Maybe<ReadonlyArray<MediaCreateInput>>
readonly connect?: Maybe<ReadonlyArray<MediaWhereUniqueInput>>
}
Severity: Major
Found in packages/api/src/types.ts and 3 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 960..963
packages/api/src/types.ts on lines 965..968
packages/api/src/types.ts on lines 1796..1799

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export type SphereCreateManyWithoutAssociatedWithInput = {
readonly create?: Maybe<ReadonlyArray<SphereCreateWithoutAssociatedWithInput>>
readonly connect?: Maybe<ReadonlyArray<SphereWhereUniqueInput>>
}
Severity: Major
Found in packages/api/src/types.ts and 3 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 401..404
packages/api/src/types.ts on lines 960..963
packages/api/src/types.ts on lines 965..968

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export type PostMetadataUpdateDataInput = {
readonly fileHash?: Maybe<Scalars['String']>
readonly filename?: Maybe<Scalars['String']>
}
Severity: Major
Found in packages/api/src/types.ts and 7 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 319..322
packages/api/src/types.ts on lines 1081..1084
packages/api/src/types.ts on lines 1086..1089
packages/api/src/types.ts on lines 1167..1170
packages/api/src/types.ts on lines 1529..1532
packages/api/src/types.ts on lines 2212..2215
packages/api/src/types.ts on lines 2608..2611

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export type PostCreateManyWithoutAuthorInput = {
readonly create?: Maybe<ReadonlyArray<PostCreateWithoutAuthorInput>>
readonly connect?: Maybe<ReadonlyArray<PostWhereUniqueInput>>
}
Severity: Major
Found in packages/api/src/types.ts and 3 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 401..404
packages/api/src/types.ts on lines 960..963
packages/api/src/types.ts on lines 1796..1799

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export type SphereVerificationCodeWhereUniqueInput = {
readonly id?: Maybe<Scalars['ID']>
readonly value?: Maybe<Scalars['String']>
}
Severity: Major
Found in packages/api/src/types.ts and 7 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 319..322
packages/api/src/types.ts on lines 1076..1079
packages/api/src/types.ts on lines 1081..1084
packages/api/src/types.ts on lines 1086..1089
packages/api/src/types.ts on lines 1167..1170
packages/api/src/types.ts on lines 1529..1532
packages/api/src/types.ts on lines 2608..2611

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export type PostMetadataUpdateManyMutationInput = {
readonly fileHash?: Maybe<Scalars['String']>
readonly filename?: Maybe<Scalars['String']>
}
Severity: Major
Found in packages/api/src/types.ts and 7 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 319..322
packages/api/src/types.ts on lines 1076..1079
packages/api/src/types.ts on lines 1081..1084
packages/api/src/types.ts on lines 1167..1170
packages/api/src/types.ts on lines 1529..1532
packages/api/src/types.ts on lines 2212..2215
packages/api/src/types.ts on lines 2608..2611

Similar blocks of code found in 4 locations. Consider refactoring.
Open

export type PostCreateManyWithoutAssociatedWithInput = {
readonly create?: Maybe<ReadonlyArray<PostCreateWithoutAssociatedWithInput>>
readonly connect?: Maybe<ReadonlyArray<PostWhereUniqueInput>>
}
Severity: Major
Found in packages/api/src/types.ts and 3 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 401..404
packages/api/src/types.ts on lines 965..968
packages/api/src/types.ts on lines 1796..1799

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export type PostMetadataWhereUniqueInput = {
readonly id?: Maybe<Scalars['ID']>
readonly fileHash?: Maybe<Scalars['String']>
}
Severity: Major
Found in packages/api/src/types.ts and 7 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 319..322
packages/api/src/types.ts on lines 1076..1079
packages/api/src/types.ts on lines 1081..1084
packages/api/src/types.ts on lines 1086..1089
packages/api/src/types.ts on lines 1529..1532
packages/api/src/types.ts on lines 2212..2215
packages/api/src/types.ts on lines 2608..2611

Similar blocks of code found in 8 locations. Consider refactoring.
Open

export type AccountWhereUniqueInput = {
readonly id?: Maybe<Scalars['ID']>
readonly emailAddress?: Maybe<Scalars['String']>
}
Severity: Major
Found in packages/api/src/types.ts and 7 other locations - About 50 mins to fix
packages/api/src/types.ts on lines 1076..1079
packages/api/src/types.ts on lines 1081..1084
packages/api/src/types.ts on lines 1086..1089
packages/api/src/types.ts on lines 1167..1170
packages/api/src/types.ts on lines 1529..1532
packages/api/src/types.ts on lines 2212..2215
packages/api/src/types.ts on lines 2608..2611
Severity
Category
Status
Source
Language