bylapidist/components

View on GitHub
src/components/Link/Link.stories.tsx

Summary

Maintainability
A
0 mins
Test Coverage

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

export default {
    title: 'Typography/Link',
    component: Link,
    decorators: [(getStory) => <ThemeProvider>{getStory()}</ThemeProvider>]
} as Meta<typeof Link>;
Severity: Major
Found in src/components/Link/Link.stories.tsx and 9 other locations - About 55 mins to fix
src/components/Box/Box.stories.tsx on lines 8..12
src/components/Button/Button.stories.tsx on lines 8..12
src/components/Heading/Heading.stories.tsx on lines 7..11
src/components/Logo/Logo.stories.tsx on lines 7..11
src/components/Tabs/Tabs.stories.tsx on lines 7..11
src/components/Tag/Tag.stories.tsx on lines 7..11
src/components/Text/Text.stories.tsx on lines 7..11
src/components/Timeline/Timeline.stories.tsx on lines 7..11
src/components/Toggle/Toggle.stories.tsx on lines 7..11

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

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 27 locations. Consider refactoring.
Wontfix

export const Large: StoryObj<BaseProps & LinkProps> = {
    render: DefaultTemplate,

    args: {
        ...defaultArgs,
Severity: Major
Found in src/components/Link/Link.stories.tsx and 26 other locations - About 35 mins to fix
src/components/Box/Box.stories.tsx on lines 34..41
src/components/Heading/Heading.stories.tsx on lines 33..40
src/components/Heading/Heading.stories.tsx on lines 42..49
src/components/Heading/Heading.stories.tsx on lines 51..58
src/components/Heading/Heading.stories.tsx on lines 60..67
src/components/Heading/Heading.stories.tsx on lines 69..76
src/components/Heading/Heading.stories.tsx on lines 78..85
src/components/Heading/Heading.stories.tsx on lines 87..94
src/components/Heading/Heading.stories.tsx on lines 96..103
src/components/Heading/Heading.stories.tsx on lines 105..112
src/components/Link/Link.stories.tsx on lines 23..30
src/components/Link/Link.stories.tsx on lines 32..39
src/components/Tag/Tag.stories.tsx on lines 31..38
src/components/Tag/Tag.stories.tsx on lines 40..47
src/components/Tag/Tag.stories.tsx on lines 49..56
src/components/Text/Text.stories.tsx on lines 29..36
src/components/Text/Text.stories.tsx on lines 38..45
src/components/Text/Text.stories.tsx on lines 47..54
src/components/Text/Text.stories.tsx on lines 56..63
src/components/Text/Text.stories.tsx on lines 65..72
src/components/Text/Text.stories.tsx on lines 74..81
src/components/Text/Text.stories.tsx on lines 83..90
src/components/Text/Text.stories.tsx on lines 92..99
src/components/Text/Text.stories.tsx on lines 101..108
src/components/Text/Text.stories.tsx on lines 110..117
src/components/ThemeProvider/ThemeProvider.stories.tsx on lines 59..66

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

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 27 locations. Consider refactoring.
Wontfix

export const Small: StoryObj<BaseProps & LinkProps> = {
    render: DefaultTemplate,

    args: {
        ...defaultArgs,
Severity: Major
Found in src/components/Link/Link.stories.tsx and 26 other locations - About 35 mins to fix
src/components/Box/Box.stories.tsx on lines 34..41
src/components/Heading/Heading.stories.tsx on lines 33..40
src/components/Heading/Heading.stories.tsx on lines 42..49
src/components/Heading/Heading.stories.tsx on lines 51..58
src/components/Heading/Heading.stories.tsx on lines 60..67
src/components/Heading/Heading.stories.tsx on lines 69..76
src/components/Heading/Heading.stories.tsx on lines 78..85
src/components/Heading/Heading.stories.tsx on lines 87..94
src/components/Heading/Heading.stories.tsx on lines 96..103
src/components/Heading/Heading.stories.tsx on lines 105..112
src/components/Link/Link.stories.tsx on lines 32..39
src/components/Link/Link.stories.tsx on lines 41..48
src/components/Tag/Tag.stories.tsx on lines 31..38
src/components/Tag/Tag.stories.tsx on lines 40..47
src/components/Tag/Tag.stories.tsx on lines 49..56
src/components/Text/Text.stories.tsx on lines 29..36
src/components/Text/Text.stories.tsx on lines 38..45
src/components/Text/Text.stories.tsx on lines 47..54
src/components/Text/Text.stories.tsx on lines 56..63
src/components/Text/Text.stories.tsx on lines 65..72
src/components/Text/Text.stories.tsx on lines 74..81
src/components/Text/Text.stories.tsx on lines 83..90
src/components/Text/Text.stories.tsx on lines 92..99
src/components/Text/Text.stories.tsx on lines 101..108
src/components/Text/Text.stories.tsx on lines 110..117
src/components/ThemeProvider/ThemeProvider.stories.tsx on lines 59..66

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

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 27 locations. Consider refactoring.
Wontfix

export const Medium: StoryObj<BaseProps & LinkProps> = {
    render: DefaultTemplate,

    args: {
        ...defaultArgs,
Severity: Major
Found in src/components/Link/Link.stories.tsx and 26 other locations - About 35 mins to fix
src/components/Box/Box.stories.tsx on lines 34..41
src/components/Heading/Heading.stories.tsx on lines 33..40
src/components/Heading/Heading.stories.tsx on lines 42..49
src/components/Heading/Heading.stories.tsx on lines 51..58
src/components/Heading/Heading.stories.tsx on lines 60..67
src/components/Heading/Heading.stories.tsx on lines 69..76
src/components/Heading/Heading.stories.tsx on lines 78..85
src/components/Heading/Heading.stories.tsx on lines 87..94
src/components/Heading/Heading.stories.tsx on lines 96..103
src/components/Heading/Heading.stories.tsx on lines 105..112
src/components/Link/Link.stories.tsx on lines 23..30
src/components/Link/Link.stories.tsx on lines 41..48
src/components/Tag/Tag.stories.tsx on lines 31..38
src/components/Tag/Tag.stories.tsx on lines 40..47
src/components/Tag/Tag.stories.tsx on lines 49..56
src/components/Text/Text.stories.tsx on lines 29..36
src/components/Text/Text.stories.tsx on lines 38..45
src/components/Text/Text.stories.tsx on lines 47..54
src/components/Text/Text.stories.tsx on lines 56..63
src/components/Text/Text.stories.tsx on lines 65..72
src/components/Text/Text.stories.tsx on lines 74..81
src/components/Text/Text.stories.tsx on lines 83..90
src/components/Text/Text.stories.tsx on lines 92..99
src/components/Text/Text.stories.tsx on lines 101..108
src/components/Text/Text.stories.tsx on lines 110..117
src/components/ThemeProvider/ThemeProvider.stories.tsx on lines 59..66

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

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

There are no issues that match your filters.

Category
Status