spherehq/sphere

View on GitHub

Showing 214 of 214 total issues

File types.ts has 2348 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export type Maybe<T> = T | null
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string
String: string
Severity: Major
Found in packages/api/src/types.ts - About 6 days to fix

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

    export interface PostObservableChain {
    id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
    title: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
    featuredImage: MediaObservableChain & {
    execute: (request: MediaRequest, defaultValue?: Media | null) => Observable<Media | null>
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 5 days to fix
    packages/api/client/generated/schema.ts on lines 811..840

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

    export interface PostPromiseChain {
    id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
    title: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
    featuredImage: MediaPromiseChain & {
    execute: (request: MediaRequest, defaultValue?: Media | null) => Promise<Media | null>
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 5 days to fix
    packages/api/client/generated/schema.ts on lines 842..871

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

    export type MediaScalarWhereInput = {
    readonly id?: Maybe<Scalars['ID']>
    readonly id_not?: Maybe<Scalars['ID']>
    readonly id_in?: Maybe<ReadonlyArray<Scalars['ID']>>
    readonly id_not_in?: Maybe<ReadonlyArray<Scalars['ID']>>
    Severity: Major
    Found in packages/api/src/types.ts and 1 other location - About 4 days to fix
    packages/api/src/types.ts on lines 553..589

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

    export type MediaWhereInput = {
    readonly id?: Maybe<Scalars['ID']>
    readonly id_not?: Maybe<Scalars['ID']>
    readonly id_in?: Maybe<ReadonlyArray<Scalars['ID']>>
    readonly id_not_in?: Maybe<ReadonlyArray<Scalars['ID']>>
    Severity: Major
    Found in packages/api/src/types.ts and 1 other location - About 4 days to fix
    packages/api/src/types.ts on lines 431..467

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

    export interface AccountObservableChain {
    id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
    status: { execute: (request?: boolean | number, defaultValue?: AccountStatus) => Observable<AccountStatus> }
    firstName: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
    lastName: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 4 days to fix
    packages/api/client/generated/schema.ts on lines 885..913

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

    export interface AccountPromiseChain {
    id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
    status: { execute: (request?: boolean | number, defaultValue?: AccountStatus) => Promise<AccountStatus> }
    firstName: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
    lastName: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 4 days to fix
    packages/api/client/generated/schema.ts on lines 915..943

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

    export interface QueryObservableChain {
    posts: ((args?: {
    where?: PostWhereInput | null
    orderBy?: PostOrderByInput | null
    skip?: Int | null
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 3 days to fix
    packages/api/client/generated/schema.ts on lines 741..773

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

    export interface QueryPromiseChain {
    posts: ((args?: {
    where?: PostWhereInput | null
    orderBy?: PostOrderByInput | null
    skip?: Int | null
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 3 days to fix
    packages/api/client/generated/schema.ts on lines 775..809

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

    export interface SpherePromiseChain {
    id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
    alias: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
    aliasSlug: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
    slugPrefix: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 2 days to fix
    packages/api/client/generated/schema.ts on lines 965..985

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

    export interface SphereObservableChain {
    id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
    alias: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
    aliasSlug: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
    slugPrefix: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
    Severity: Major
    Found in packages/api/client/generated/schema.ts and 1 other location - About 2 days to fix
    packages/api/client/generated/schema.ts on lines 945..963

    File schema.ts has 953 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { Observable } from 'graphql-typed-client'
     
    export interface Query {
    posts: (Post | null)[]
    post: Post | null
    Severity: Major
    Found in packages/api/client/generated/schema.ts - About 2 days to fix

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

      <MiniArticleList as="ul" flexDirection={`column`}>
      <ArticleListItem
      title={`Scientists Create Airplane That Can Land Itself on Any Runway`}
      link={''}
      linkAs={Link}
      Severity: Major
      Found in packages/platform/src/pages/index.tsx and 1 other location - About 1 day to fix
      packages/platform/src/pages/index.tsx on lines 550..578

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

      <MiniArticleList as="ul" flexDirection={`column`}>
      <ArticleListItem
      title={`Scientists Create Airplane That Can Land Itself on Any Runway`}
      link={''}
      linkAs={Link}
      Severity: Major
      Found in packages/platform/src/pages/index.tsx and 1 other location - About 1 day to fix
      packages/platform/src/pages/index.tsx on lines 307..335

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

      export interface PostMetadataPromiseChain {
      id: { execute: (request?: boolean | number, defaultValue?: ID) => Promise<ID> }
      fileHash: { execute: (request?: boolean | number, defaultValue?: String) => Promise<String> }
      filename: { execute: (request?: boolean | number, defaultValue?: String | null) => Promise<String | null> }
      createdAt: { execute: (request?: boolean | number, defaultValue?: DateTime) => Promise<DateTime> }
      Severity: Major
      Found in packages/api/client/generated/schema.ts and 1 other location - About 1 day to fix
      packages/api/client/generated/schema.ts on lines 995..1001

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

      export interface PostMetadataObservableChain {
      id: { execute: (request?: boolean | number, defaultValue?: ID) => Observable<ID> }
      fileHash: { execute: (request?: boolean | number, defaultValue?: String) => Observable<String> }
      filename: { execute: (request?: boolean | number, defaultValue?: String | null) => Observable<String | null> }
      createdAt: { execute: (request?: boolean | number, defaultValue?: DateTime) => Observable<DateTime> }
      Severity: Major
      Found in packages/api/client/generated/schema.ts and 1 other location - About 1 day to fix
      packages/api/client/generated/schema.ts on lines 987..993

      Function __generator has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
      Open

      function(thisArg, body) {
      var _ = {
      label: 0,
      sent: function() {
      if (t[0] & 1) throw t[1]
      Severity: Minor
      Found in packages/database/hooks/handler.js - About 1 day to fix

      File index.tsx has 540 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import * as React from 'react'
       
      import { styled } from '@spherehq/geometry/Theme'
      import { Container } from '@spherehq/geometry/Components/Container'
      import { Box } from '@spherehq/geometry/Components/Box'
      Severity: Major
      Found in packages/platform/src/pages/index.tsx - About 1 day to fix

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

        export type PostUpdateWithoutAssociatedWithDataInput = {
        readonly title?: Maybe<Scalars['String']>
        readonly featuredImage?: Maybe<MediaUpdateOneInput>
        readonly content?: Maybe<Scalars['Json']>
        readonly images?: Maybe<MediaUpdateManyInput>
        Severity: Major
        Found in packages/api/src/types.ts and 1 other location - About 1 day to fix
        packages/api/src/types.ts on lines 1400..1412

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

        export type PostUpdateWithoutAuthorDataInput = {
        readonly title?: Maybe<Scalars['String']>
        readonly featuredImage?: Maybe<MediaUpdateOneInput>
        readonly content?: Maybe<Scalars['Json']>
        readonly images?: Maybe<MediaUpdateManyInput>
        Severity: Major
        Found in packages/api/src/types.ts and 1 other location - About 1 day to fix
        packages/api/src/types.ts on lines 1386..1398
        Severity
        Category
        Status
        Source
        Language