eduardomoroni/trading-card-manager

View on GitHub

Showing 244 of 244 total issues

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

export interface TokenUpdateManyMutationInput {
  artist?: String;
  borderColor?: BorderColor;
  colorIdentities?: TokenUpdatecolorIdentitiesInput;
  colors?: TokenUpdatecolorsInput;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 475..489
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1090..1104

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 126.

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 3 locations. Consider refactoring.
Open

export interface TokenUpdateWithoutSetDataInput {
  artist?: String;
  borderColor?: BorderColor;
  colorIdentities?: TokenUpdatecolorIdentitiesInput;
  colors?: TokenUpdatecolorsInput;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 475..489
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1074..1088

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 126.

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 interface SetSubscriptionPayloadSubscription
  extends Promise<AsyncIterator<SetSubscriptionPayload>>,
    Fragmentable {
  mutation: () => Promise<AsyncIterator<MutationType>>;
  node: <T = SetSubscription>() => T;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2937..2944
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3199..3206
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3404..3411
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3553..3560
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3578..3585
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3839..3846

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 126.

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 interface TypeSubscriptionPayloadSubscription
  extends Promise<AsyncIterator<TypeSubscriptionPayload>>,
    Fragmentable {
  mutation: () => Promise<AsyncIterator<MutationType>>;
  node: <T = TypeSubscription>() => T;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2937..2944
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3199..3206
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3404..3411
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3578..3585
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3695..3702
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3839..3846

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 126.

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 interface PrintingSubscriptionPayloadSubscription
  extends Promise<AsyncIterator<PrintingSubscriptionPayload>>,
    Fragmentable {
  mutation: () => Promise<AsyncIterator<MutationType>>;
  node: <T = PrintingSubscription>() => T;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2937..2944
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3199..3206
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3404..3411
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3553..3560
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3695..3702
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3839..3846

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 126.

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 3 locations. Consider refactoring.
Open

export interface TokenUpdateManyDataInput {
  artist?: String;
  borderColor?: BorderColor;
  colorIdentities?: TokenUpdatecolorIdentitiesInput;
  colors?: TokenUpdatecolorsInput;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1074..1088
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 1090..1104

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 126.

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 interface CardSubscriptionPayloadSubscription
  extends Promise<AsyncIterator<CardSubscriptionPayload>>,
    Fragmentable {
  mutation: () => Promise<AsyncIterator<MutationType>>;
  node: <T = CardSubscription>() => T;
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 2937..2944
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3199..3206
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3553..3560
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3578..3585
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3695..3702
packages/backend/db-migration/prisma/generated/prisma-client/index.ts on lines 3839..3846

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 126.

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 addCard has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export async function addCard(card: any, set: any, skipRetry: boolean = false) {
  try {
    console.log(`Adding card ${card.name}`);
    const uuid: string = card.uuid;
    const data: CardCreateInput = {
Severity: Major
Found in packages/backend/db-migration/prisma/seed/card.ts - About 4 hrs to fix

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

      function renderColorsFilter(): React.ReactElement | null {
        if (!colors || !colors.length) {
          return null;
        }
        return (
    packages/frontend/src/presentation/components/ActiveFilters.tsx on lines 39..51

    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 117.

    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

      function renderColorIdentitiesFilter(): React.ReactElement | null {
        if (!colorIdentities || !colorIdentities.length) {
          return null;
        }
        return (
    packages/frontend/src/presentation/components/ActiveFilters.tsx on lines 26..38

    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 117.

    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 en = {
      cardSearch: {
        searchInputPlaceholder: 'Card Name',
        subtypeInputPlaceholder: 'Sub(Type)',
        supertypeInputPlaceholder: 'Super(Type)',
    Severity: Major
    Found in packages/frontend/src/presentation/internalization/en.ts and 1 other location - About 4 hrs to fix
    packages/frontend/src/presentation/internalization/pt.ts on lines 1..26

    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 115.

    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 pt = {
      cardSearch: {
        searchInputPlaceholder: 'Nome da Carta',
        subtypeInputPlaceholder: 'Sub(Tipo)',
        supertypeInputPlaceholder: 'Super(Tipo)',
    Severity: Major
    Found in packages/frontend/src/presentation/internalization/pt.ts and 1 other location - About 4 hrs to fix
    packages/frontend/src/presentation/internalization/en.ts on lines 1..26

    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 115.

    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

    async function addSubTypes(subTypes: Array<string> = []) {
      for (const subType of subTypes) {
        await prisma.createSubType({ name: subType }).catch(e => {
          console.log(`Failed to create sub type ${subType}`);
          console.log(JSON.stringify(e, null, 2));
    Severity: Major
    Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 3 hrs to fix
    packages/backend/db-migration/prisma/seed/card.ts on lines 123..130
    packages/backend/db-migration/prisma/seed/card.ts on lines 141..148
    packages/backend/db-migration/prisma/seed/card.ts on lines 150..157

    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 111.

    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 3 locations. Consider refactoring.
    Open

    export const SupertypeFilter: React.FC<Props> = (props: Props) => {
      if (!props.supertype) {
        return null;
      }
      return (
    packages/frontend/src/presentation/components/activeFilters/CardNameFIlter.tsx on lines 9..19
    packages/frontend/src/presentation/components/activeFilters/SubtypeFilter.tsx on lines 10..20

    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 111.

    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 async function signInWithEmailAndPassword(
      email: Email,
      password: string,
    ): Promise<User> {
      try {
    Severity: Major
    Found in packages/frontend/src/data/firebase/authentication.ts and 1 other location - About 3 hrs to fix
    packages/frontend/src/data/firebase/authentication.ts on lines 39..54

    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 111.

    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

    async function addTypes(types: Array<string> = []) {
      for (const type of types) {
        await prisma.createType({ name: type }).catch(e => {
          console.log(`Failed to create type ${type}`);
          console.log(JSON.stringify(e, null, 2));
    Severity: Major
    Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 3 hrs to fix
    packages/backend/db-migration/prisma/seed/card.ts on lines 123..130
    packages/backend/db-migration/prisma/seed/card.ts on lines 132..139
    packages/backend/db-migration/prisma/seed/card.ts on lines 150..157

    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 111.

    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 3 locations. Consider refactoring.
    Open

    export const SubtypeFilter: React.FC<Props> = (props: Props) => {
      if (!props.subtype) {
        return null;
      }
      return (
    packages/frontend/src/presentation/components/activeFilters/CardNameFIlter.tsx on lines 9..19
    packages/frontend/src/presentation/components/activeFilters/SupertypeFilter.tsx on lines 10..20

    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 111.

    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 3 locations. Consider refactoring.
    Open

    export const CardNameFilter: React.FC<Props> = (props: Props) => {
      if (!props.cardName) {
        return null;
      }
      return (
    packages/frontend/src/presentation/components/activeFilters/SubtypeFilter.tsx on lines 10..20
    packages/frontend/src/presentation/components/activeFilters/SupertypeFilter.tsx on lines 10..20

    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 111.

    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

    async function addPrinting(printings: Array<string> = []) {
      for (const printing of printings) {
        await prisma.createPrinting({ name: printing }).catch(e => {
          console.log(`Failed to create printing ${printing}`);
          console.log(JSON.stringify(e, null, 2));
    Severity: Major
    Found in packages/backend/db-migration/prisma/seed/card.ts and 3 other locations - About 3 hrs to fix
    packages/backend/db-migration/prisma/seed/card.ts on lines 132..139
    packages/backend/db-migration/prisma/seed/card.ts on lines 141..148
    packages/backend/db-migration/prisma/seed/card.ts on lines 150..157

    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 111.

    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 async function createUserWithEmailAndPassword(
      email: Email,
      password: string,
    ): Promise<User> {
      try {
    Severity: Major
    Found in packages/frontend/src/data/firebase/authentication.ts and 1 other location - About 3 hrs to fix
    packages/frontend/src/data/firebase/authentication.ts on lines 22..37

    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 111.

    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

    Severity
    Category
    Status
    Source
    Language