crystal-ball/componentry

View on GitHub

Showing 85 of 85 total issues

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

export type GridProps<As extends React.ElementType = 'div'> = Resolve<
  MergeTypes<GridPropsDefaults, GridPropsOverrides> & { as?: As } & UtilityProps
> &
  ElementTypeProps<As>
Severity: Major
Found in src/components/Grid/Grid.ts and 6 other locations - About 1 hr to fix
src/components/Block/Block.ts on lines 12..15
src/components/Flex/Flex.ts on lines 21..24
src/components/Icon/Icon.tsx on lines 50..53
src/components/Link/Link.ts on lines 19..22
src/components/Paper/Paper.ts on lines 15..18
src/components/Text/Text.ts on lines 36..39

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

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 LinkProps<As extends React.ElementType = 'a'> = Resolve<
  MergeTypes<LinkPropsDefaults, LinkPropsOverrides> & { as?: As } & UtilityProps
> &
  ElementTypeProps<As>
Severity: Major
Found in src/components/Link/Link.ts and 6 other locations - About 1 hr to fix
src/components/Block/Block.ts on lines 12..15
src/components/Flex/Flex.ts on lines 21..24
src/components/Grid/Grid.ts on lines 17..20
src/components/Icon/Icon.tsx on lines 50..53
src/components/Paper/Paper.ts on lines 15..18
src/components/Text/Text.ts on lines 36..39

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

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 IconProps<As extends React.ElementType = 'svg'> = Resolve<
  MergeTypes<IconPropsDefaults, IconPropsOverrides> & { as?: As } & UtilityProps
> &
  ElementTypeProps<As>
Severity: Major
Found in src/components/Icon/Icon.tsx and 6 other locations - About 1 hr to fix
src/components/Block/Block.ts on lines 12..15
src/components/Flex/Flex.ts on lines 21..24
src/components/Grid/Grid.ts on lines 17..20
src/components/Link/Link.ts on lines 19..22
src/components/Paper/Paper.ts on lines 15..18
src/components/Text/Text.ts on lines 36..39

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

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 createActiveAction has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

export function createActiveAction<
  Name extends ComponentName,
  Props extends ActiveActionBaseProps,
>(
  displayName: Name,
Severity: Minor
Found in src/utils/create-active-action-component.tsx - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

      <FormGroup>
        <Input>
          <Input.Label>Name</Input.Label>
          <Input.Field placeholder='' />
        </Input>
Severity: Major
Found in src/components/FormGroup/FormGroup.stories.tsx and 1 other location - About 1 hr to fix
src/components/FormGroup/FormGroup.stories.tsx on lines 24..29

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

      <FormGroup>
        <Input>
          <Input.Label>Email</Input.Label>
          <Input.Field placeholder='' />
        </Input>
Severity: Major
Found in src/components/FormGroup/FormGroup.stories.tsx and 1 other location - About 1 hr to fix
src/components/FormGroup/FormGroup.stories.tsx on lines 17..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 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

    render(
      <TestComponent defaultActive>
        <TestComponent.Action>Action</TestComponent.Action>
        <TestComponent.Content>Content</TestComponent.Content>
      </TestComponent>,
Severity: Major
Found in src/test/activation-tests.js and 1 other location - About 1 hr to fix
src/test/activation-tests.js on lines 46..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 62.

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

        <Card.Body>
          <Card.Title>Card title</Card.Title>
          <Card.Subtitle>Card subtitle</Card.Subtitle>
        </Card.Body>
Severity: Major
Found in src/components/Card/Card.stories.tsx and 2 other locations - About 1 hr to fix
src/components/Dropdown/Dropdown.stories.tsx on lines 44..47
src/components/Popover/Popover.stories.tsx on lines 16..23

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

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

        <Dropdown.Content>
          <Dropdown.Item>Interactive Item 1</Dropdown.Item>
          <Dropdown.Item>Interactive Item 2</Dropdown.Item>
        </Dropdown.Content>
Severity: Major
Found in src/components/Dropdown/Dropdown.stories.tsx and 2 other locations - About 1 hr to fix
src/components/Card/Card.stories.tsx on lines 65..68
src/components/Popover/Popover.stories.tsx on lines 16..23

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

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

      <Popover.Content>
        <Popover.Heading>Fun Fact!</Popover.Heading>
        <Popover.Body>
          The new Texas Instrument calculators have ABC keyboards because if they had
          QWERTY keyboards, they would be considered computers and wouldn’t be allowed for
Severity: Major
Found in src/components/Popover/Popover.stories.tsx and 2 other locations - About 1 hr to fix
src/components/Card/Card.stories.tsx on lines 65..68
src/components/Dropdown/Dropdown.stories.tsx on lines 44..47

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

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

    render(
      <TestComponent active>
        <TestComponent.Action>Action</TestComponent.Action>
        <TestComponent.Content>Content</TestComponent.Content>
      </TestComponent>,
Severity: Major
Found in src/test/activation-tests.js and 1 other location - About 1 hr to fix
src/test/activation-tests.js on lines 129..134

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

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 componentryPlugin has 83 lines of code (exceeds 75 allowed). Consider refactoring.
Open

export default function componentryPlugin(): ComponentryPlugin {
  // Set up user defined default props and theme values for pre-compilation
  __initializePreCompileMode(config)

  const pluginObj: ComponentryPlugin = {
Severity: Major
Found in src/plugin-babel/plugin.ts - About 1 hr to fix

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

    export interface Button {
      <As extends React.ElementType = 'button'>(props: ButtonProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Button/Button.tsx and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Grid/Grid.ts on lines 32..35
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33
    src/components/Text/Text.ts on lines 51..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 59.

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

    export interface Text {
      <As extends React.ElementType = 'div'>(props: TextProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Text/Text.ts and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Button/Button.tsx on lines 49..52
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Grid/Grid.ts on lines 32..35
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33

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

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

    export interface Block {
      <As extends React.ElementType = 'div'>(props: BlockProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Block/Block.ts and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Button/Button.tsx on lines 49..52
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Grid/Grid.ts on lines 32..35
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33
    src/components/Text/Text.ts on lines 51..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 59.

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

    export interface Grid {
      <As extends React.ElementType = 'div'>(props: GridProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Grid/Grid.ts and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Button/Button.tsx on lines 49..52
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33
    src/components/Text/Text.ts on lines 51..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 59.

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

    export interface IconButton {
      <As extends React.ElementType = 'button'>(
        props: IconButtonProps<As>,
      ): React.ReactElement
      displayName?: string
    Severity: Major
    Found in src/components/IconButton/IconButton.tsx and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Button/Button.tsx on lines 49..52
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Grid/Grid.ts on lines 32..35
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33
    src/components/Text/Text.ts on lines 51..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 59.

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

    export interface Paper {
      <As extends React.ElementType = 'div'>(props: PaperProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Paper/Paper.ts and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Button/Button.tsx on lines 49..52
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Grid/Grid.ts on lines 32..35
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Text/Text.ts on lines 51..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 59.

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

    export interface Icon {
      <As extends React.ElementType = 'svg'>(props: IconProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Icon/Icon.tsx and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Button/Button.tsx on lines 49..52
    src/components/Flex/Flex.ts on lines 36..39
    src/components/Grid/Grid.ts on lines 32..35
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33
    src/components/Text/Text.ts on lines 51..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 59.

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

    export interface Flex {
      <As extends React.ElementType = 'div'>(props: FlexProps<As>): React.ReactElement
      displayName?: string
    }
    Severity: Major
    Found in src/components/Flex/Flex.ts and 9 other locations - About 1 hr to fix
    src/components/Badge/Badge.ts on lines 37..40
    src/components/Block/Block.ts on lines 27..30
    src/components/Button/Button.tsx on lines 49..52
    src/components/Grid/Grid.ts on lines 32..35
    src/components/Icon/Icon.tsx on lines 63..66
    src/components/IconButton/IconButton.tsx on lines 44..49
    src/components/Link/Link.ts on lines 34..37
    src/components/Paper/Paper.ts on lines 30..33
    src/components/Text/Text.ts on lines 51..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 59.

    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