spherehq/sphere

View on GitHub

Showing 214 of 214 total issues

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

export type PostMetadataUpdateOneRequiredInput = {
  readonly create?: Maybe<PostMetadataCreateInput>
  readonly update?: Maybe<PostMetadataUpdateDataInput>
  readonly upsert?: Maybe<PostMetadataUpsertNestedInput>
  readonly connect?: Maybe<PostMetadataWhereUniqueInput>
Severity: Major
Found in packages/api/src/types.ts and 6 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 179..184
packages/api/src/types.ts on lines 186..191
packages/api/src/types.ts on lines 193..198
packages/api/src/types.ts on lines 1995..2000
packages/api/src/types.ts on lines 2145..2150
packages/api/src/types.ts on lines 2304..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export type SphereUpdateOneRequiredWithoutPostsInput = {
  readonly create?: Maybe<SphereCreateWithoutPostsInput>
  readonly update?: Maybe<SphereUpdateWithoutPostsDataInput>
  readonly upsert?: Maybe<SphereUpsertWithoutPostsInput>
  readonly connect?: Maybe<SphereWhereUniqueInput>
Severity: Major
Found in packages/api/src/types.ts and 6 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 179..184
packages/api/src/types.ts on lines 186..191
packages/api/src/types.ts on lines 193..198
packages/api/src/types.ts on lines 1091..1096
packages/api/src/types.ts on lines 2145..2150
packages/api/src/types.ts on lines 2304..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export type AccountUpdateOneRequiredWithoutSpheresInput = {
  readonly create?: Maybe<AccountCreateWithoutSpheresInput>
  readonly update?: Maybe<AccountUpdateWithoutSpheresDataInput>
  readonly upsert?: Maybe<AccountUpsertWithoutSpheresInput>
  readonly connect?: Maybe<AccountWhereUniqueInput>
Severity: Major
Found in packages/api/src/types.ts and 6 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 179..184
packages/api/src/types.ts on lines 186..191
packages/api/src/types.ts on lines 1091..1096
packages/api/src/types.ts on lines 1995..2000
packages/api/src/types.ts on lines 2145..2150
packages/api/src/types.ts on lines 2304..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export type SphereVerificationCodeUpdateOneRequiredInput = {
  readonly create?: Maybe<SphereVerificationCodeCreateInput>
  readonly update?: Maybe<SphereVerificationCodeUpdateDataInput>
  readonly upsert?: Maybe<SphereVerificationCodeUpsertNestedInput>
  readonly connect?: Maybe<SphereVerificationCodeWhereUniqueInput>
Severity: Major
Found in packages/api/src/types.ts and 6 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 179..184
packages/api/src/types.ts on lines 186..191
packages/api/src/types.ts on lines 193..198
packages/api/src/types.ts on lines 1091..1096
packages/api/src/types.ts on lines 1995..2000
packages/api/src/types.ts on lines 2304..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export type SphereVerificationUpdateOneRequiredInput = {
  readonly create?: Maybe<SphereVerificationCreateInput>
  readonly update?: Maybe<SphereVerificationUpdateDataInput>
  readonly upsert?: Maybe<SphereVerificationUpsertNestedInput>
  readonly connect?: Maybe<SphereVerificationWhereUniqueInput>
Severity: Major
Found in packages/api/src/types.ts and 6 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 179..184
packages/api/src/types.ts on lines 186..191
packages/api/src/types.ts on lines 193..198
packages/api/src/types.ts on lines 1091..1096
packages/api/src/types.ts on lines 1995..2000
packages/api/src/types.ts on lines 2145..2150

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export type AccountUpdateOneRequiredWithoutPostsInput = {
  readonly create?: Maybe<AccountCreateWithoutPostsInput>
  readonly update?: Maybe<AccountUpdateWithoutPostsDataInput>
  readonly upsert?: Maybe<AccountUpsertWithoutPostsInput>
  readonly connect?: Maybe<AccountWhereUniqueInput>
Severity: Major
Found in packages/api/src/types.ts and 6 other locations - About 1 hr to fix
packages/api/src/types.ts on lines 179..184
packages/api/src/types.ts on lines 193..198
packages/api/src/types.ts on lines 1091..1096
packages/api/src/types.ts on lines 1995..2000
packages/api/src/types.ts on lines 2145..2150
packages/api/src/types.ts on lines 2304..2309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export enum SphereOrderByInput {
  id_ASC = 'id_ASC',
  id_DESC = 'id_DESC',
  alias_ASC = 'alias_ASC',
  alias_DESC = 'alias_DESC',
Severity: Major
Found in packages/api/client/generated/schema.ts and 1 other location - About 1 hr to fix
packages/api/src/types.ts on lines 1829..1842

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 67.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export enum SphereOrderByInput {
  IdAsc = 'id_ASC',
  IdDesc = 'id_DESC',
  AliasAsc = 'alias_ASC',
  AliasDesc = 'alias_DESC',
Severity: Major
Found in packages/api/src/types.ts and 1 other location - About 1 hr to fix
packages/api/client/generated/schema.ts on lines 116..129

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 67.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const getRowGap = ({ gap, rowGap }) => {
  let v = rowGap || gap || 0
  if (v && typeof v === 'boolean') {
    v = defaultGap
  }
Severity: Major
Found in packages/geometry/Components/Grid/Grid.tsx and 1 other location - About 1 hr to fix
packages/geometry/Components/Grid/Grid.tsx on lines 16..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const wrapPageElement = ({ element, props }) => {
  return (
    <ApolloProvider client={client}>
      <Layout {...props}>{element}</Layout>
    </ApolloProvider>
Severity: Major
Found in packages/platform/gatsby-browser.js and 1 other location - About 1 hr to fix
packages/platform/gatsby-ssr.js on lines 15..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const wrapPageElement = ({ element, props }) => {
  return (
    <ApolloProvider client={client}>
      <Layout {...props}>{element}</Layout>
    </ApolloProvider>
Severity: Major
Found in packages/platform/gatsby-ssr.js and 1 other location - About 1 hr to fix
packages/platform/gatsby-browser.js on lines 28..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const getColGap = ({ gap, colGap }) => {
  let v = colGap || gap || 0
  if (v && typeof v === 'boolean') {
    v = defaultGap
  }
Severity: Major
Found in packages/geometry/Components/Grid/Grid.tsx and 1 other location - About 1 hr to fix
packages/geometry/Components/Grid/Grid.tsx on lines 24..30

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function recursive has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const recursive = (fields, fieldsWithArgs) => {
    Object.keys(fields).forEach(field => {
      if (Object.keys(fields[field]).length > 0) {
        if (
          Object.keys(fieldsWithArgs[field]).filter(
Severity: Minor
Found in packages/api/src/utils/index.ts - About 1 hr to fix

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

    export interface SizingProps {
      width?: SystemProp
      height?: SystemProp
      minWidth?: SystemProp
      minHeight?: SystemProp
    Severity: Major
    Found in packages/geometry/System/index.ts and 1 other location - About 1 hr to fix
    packages/geometry/System/index.ts on lines 66..73

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export interface PositionsProps {
      zIndex?: SystemProp
      position?: SystemProp
      top?: SystemProp
      right?: SystemProp
    Severity: Major
    Found in packages/geometry/System/index.ts and 1 other location - About 1 hr to fix
    packages/geometry/System/index.ts on lines 79..86

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export type SphereVerificationUpdateDataInput = {
      readonly url?: Maybe<Scalars['String']>
      readonly code?: Maybe<SphereVerificationCodeUpdateOneRequiredInput>
      readonly status?: Maybe<SphereVerificationStatus>
    }
    Severity: Major
    Found in packages/api/src/types.ts and 3 other locations - About 1 hr to fix
    packages/api/src/types.ts on lines 2128..2132
    packages/api/src/types.ts on lines 2134..2138
    packages/api/src/types.ts on lines 2293..2297

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 60.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export type SphereVerificationCodeUpdateInput = {
      readonly value?: Maybe<Scalars['String']>
      readonly status?: Maybe<SphereVerificationCodeStatus>
      readonly associatedWith?: Maybe<AccountUpdateOneRequiredInput>
    }
    Severity: Major
    Found in packages/api/src/types.ts and 3 other locations - About 1 hr to fix
    packages/api/src/types.ts on lines 2128..2132
    packages/api/src/types.ts on lines 2287..2291
    packages/api/src/types.ts on lines 2293..2297

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 60.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export type SphereVerificationCodeUpdateDataInput = {
      readonly value?: Maybe<Scalars['String']>
      readonly status?: Maybe<SphereVerificationCodeStatus>
      readonly associatedWith?: Maybe<AccountUpdateOneRequiredInput>
    }
    Severity: Major
    Found in packages/api/src/types.ts and 3 other locations - About 1 hr to fix
    packages/api/src/types.ts on lines 2134..2138
    packages/api/src/types.ts on lines 2287..2291
    packages/api/src/types.ts on lines 2293..2297

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 60.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export type SphereVerificationUpdateInput = {
      readonly url?: Maybe<Scalars['String']>
      readonly code?: Maybe<SphereVerificationCodeUpdateOneRequiredInput>
      readonly status?: Maybe<SphereVerificationStatus>
    }
    Severity: Major
    Found in packages/api/src/types.ts and 3 other locations - About 1 hr to fix
    packages/api/src/types.ts on lines 2128..2132
    packages/api/src/types.ts on lines 2134..2138
    packages/api/src/types.ts on lines 2287..2291

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 60.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function __awaiter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function(thisArg, _arguments, P, generator) {
        function adopt(value) {
          return value instanceof P
            ? value
            : new P(function(resolve) {
    Severity: Minor
    Found in packages/database/hooks/handler.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language