Sorry, data for that comparison is no longer available.

xylabs/sdk-react

View on GitHub
packages/invertible-theme/src/InvertibleMuiThemeProvider/InvertibleMuiThemeProvider.stories.tsx

Summary

Maintainability
C
7 hrs
Test Coverage

Function ThemeEnabledComponent has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ThemeEnabledComponent = () => {
  const theme = useTheme()
  const {
    darkMode, lightMode, mode, setMode,
  } = useColorSchemeEx()

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

        dark: {
          palette: {
            background: {
              default: '#303030',
              paper: '#424242',
    packages/invertible-theme/src/InvertibleMuiThemeProvider/InvertibleMuiThemeProvider.stories.tsx on lines 84..94

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

    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

        light: {
          palette: {
            background: {
              default: '#fff',
              paper: '#fff',
    packages/invertible-theme/src/InvertibleMuiThemeProvider/InvertibleMuiThemeProvider.stories.tsx on lines 73..83

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

    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

                <Typography variant="h4" color={theme.palette.secondary.main}>
                  Color:
                  {' '}
                  {theme.palette.secondary.main}
                </Typography>
    packages/invertible-theme/src/InvertibleMuiThemeProvider/InvertibleMuiThemeProvider.stories.tsx on lines 54..58
    packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx on lines 29..33
    packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx on lines 34..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 56.

    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

                <Typography variant="h4" color={theme.palette.primary.main}>
                  Color:
                  {' '}
                  {theme.palette.primary.main}
                </Typography>
    packages/invertible-theme/src/InvertibleMuiThemeProvider/InvertibleMuiThemeProvider.stories.tsx on lines 59..63
    packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx on lines 29..33
    packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx on lines 34..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 56.

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

    const StorybookEntry = {
      argTypes: {},
      component: InvertibleMuiThemeProvider,
      parameters: { docs: { page: null } },
      title: 'invertible-theme/InvertibleMuiThemeProvider',
    packages/appbar/src/AppBar/Application.stories.tsx on lines 10..15
    packages/appbar/src/AppBarEx.stories.tsx on lines 9..14
    packages/appbar/src/SiteMenu/MenuListItem/MenuListItemContainer.stories.tsx on lines 10..15
    packages/appbar/src/Toolbar/Context/ContextToolbar.stories.tsx on lines 7..12
    packages/base-page/src/components/BasePage/BasePage.stories.tsx on lines 7..12
    packages/button/src/components/ButtonEx.stories.tsx on lines 8..13
    packages/common/src/components/Breadcrumbs/BreadcrumbsEx.stories.tsx on lines 7..12
    packages/cookie-consent/src/components/CookieConsent.stories.tsx on lines 49..54
    packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 10..15
    packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 8..13
    packages/crypto/src/components/TokenAmount/TokenAmount.stories.tsx on lines 19..24
    packages/crypto/src/wallets/third-party/Coinbase/Coinbase.stories.tsx on lines 12..17
    packages/crypto/src/wallets/third-party/MetaMask/MetaMask.stories.tsx on lines 12..17
    packages/crypto/src/wallets/third-party/Phantom/Phantom.stories.tsx on lines 12..17
    packages/crypto/src/wallets/third-party/Trust/Trust.stories.tsx on lines 12..17
    packages/dialogs/src/ErrorDialog.stories.tsx on lines 7..12
    packages/dialogs/src/MessageDialog.stories.tsx on lines 6..11
    packages/error/src/components/Errors/ErrorViewer.stories.tsx on lines 6..11
    packages/error/src/components/Errors/ErrorsViewer.stories.tsx on lines 7..12
    packages/error/src/contexts/ErrorReporter/Provider.stories.tsx on lines 9..14
    packages/experiments/src/components/Experiments.stories.tsx on lines 7..12
    packages/experiments/src/components/ExperimentsDebugger.stories.tsx on lines 6..11
    packages/experiments/src/hooks/useExperiments.stories.tsx on lines 42..47
    packages/flexbox/src/components/BusyBox/BusyBox.stories.tsx on lines 7..12
    packages/flexbox/src/components/FlexCol.stories.tsx on lines 7..12
    packages/flexbox/src/components/FlexRow.stories.tsx on lines 7..12
    packages/hooks/src/useResetState.stories.tsx on lines 66..71
    packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx on lines 9..14
    packages/link/src/LinkEx.stories.tsx on lines 8..13
    packages/number-status/src/NumberStatus.stories.tsx on lines 7..12
    packages/pixel-debugger/src/components/PixelDebugger.stories.tsx on lines 10..15
    packages/quick-tip-button/src/QuickTipButton.stories.tsx on lines 9..14
    packages/shared/src/hooks/useLocalStorage.stories.tsx on lines 43..48
    packages/webapp/src/components/Chrome.stories.tsx on lines 13..18
    packages/webapp/src/components/NotFoundPage/Page.stories.tsx on lines 5..10

    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

    There are no issues that match your filters.

    Category
    Status