fbredius/storybook

View on GitHub

Showing 5,758 of 5,758 total issues

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

    describe('npm7', () => {
      it('with devDep it should run `npm install -D @storybook/addons`', () => {
        const executeCommandSpy = jest.spyOn(npmProxy, 'executeCommand').mockReturnValue('7.0.0');

        npmProxy.addDependencies({ installAsDevDependencies: true }, ['@storybook/addons']);
Severity: Major
Found in lib/cli/src/js-package-manager/NPMProxy.test.ts and 1 other location - About 3 hrs to fix
lib/cli/src/js-package-manager/Yarn1Proxy.test.ts on lines 34..46

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

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

    it(`should support untyped ${x}`, () => {
      const docgenInfo = createDocgenInfo({
        flowType: { name: x },
      });

Severity: Major
Found in addons/docs/src/lib/docgen/flow/createPropDef.test.ts and 1 other location - About 3 hrs to fix
addons/docs/src/lib/docgen/flow/createPropDef.test.ts on lines 17..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 100.

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

  describe('addDependencies', () => {
    it('with devDep it should run `yarn install -D --ignore-workspace-root-check @storybook/addons`', () => {
      const executeCommandSpy = jest.spyOn(yarn1Proxy, 'executeCommand').mockReturnValue('');

      yarn1Proxy.addDependencies({ installAsDevDependencies: true }, ['@storybook/addons']);
Severity: Major
Found in lib/cli/src/js-package-manager/Yarn1Proxy.test.ts and 1 other location - About 3 hrs to fix
lib/cli/src/js-package-manager/NPMProxy.test.ts on lines 63..75

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

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

File outlineCSS.ts has 300 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import dedent from 'ts-dedent';

/*
  From pesticide v1.3.0 . @mrmrs . MIT
*/
Severity: Minor
Found in addons/outline/src/outlineCSS.ts - About 3 hrs to fix

    Function createDefaultWebpackConfig has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export async function createDefaultWebpackConfig(
      storybookBaseConfig: Configuration,
      options: Options
    ): Promise<Configuration> {
      if (
    Severity: Major
    Found in lib/builder-webpack5/src/preview/base-webpack.config.ts - About 3 hrs to fix

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

          describe('non-recursive specifier', () => {
            it('extracts stories from the right files', async () => {
              const specifier: NormalizedStoriesSpecifier = normalizeStoriesEntry(
                './src/*/*.stories.(ts|js|jsx)',
                options
      Severity: Major
      Found in lib/core-server/src/utils/StoryIndexGenerator.test.ts and 2 other locations - About 3 hrs to fix
      lib/core-server/src/utils/StoryIndexGenerator.test.ts on lines 27..51
      lib/core-server/src/utils/StoryIndexGenerator.test.ts on lines 84..138

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

      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

          describe('recursive specifier', () => {
            it('extracts stories from the right files', async () => {
              const specifier: NormalizedStoriesSpecifier = normalizeStoriesEntry(
                './src/**/*.stories.(ts|js|jsx)',
                options
      Severity: Major
      Found in lib/core-server/src/utils/StoryIndexGenerator.test.ts and 2 other locations - About 3 hrs to fix
      lib/core-server/src/utils/StoryIndexGenerator.test.ts on lines 27..51
      lib/core-server/src/utils/StoryIndexGenerator.test.ts on lines 52..82

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

      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

          describe('single file specifier', () => {
            it('extracts stories from the right files', async () => {
              const specifier: NormalizedStoriesSpecifier = normalizeStoriesEntry(
                './src/A.stories.js',
                options
      Severity: Major
      Found in lib/core-server/src/utils/StoryIndexGenerator.test.ts and 2 other locations - About 3 hrs to fix
      lib/core-server/src/utils/StoryIndexGenerator.test.ts on lines 52..82
      lib/core-server/src/utils/StoryIndexGenerator.test.ts on lines 84..138

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

      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

      interface ClientApi extends ClientStoryApi<ServerFramework['storyResult']> {
        setAddon(addon: any): void;
        configure(loader: Loadable, module: NodeModule): void;
        getStorybook(): IStorybookSection[];
        clearDecorators(): void;
      Severity: Major
      Found in app/server/src/client/preview/index.ts and 3 other locations - About 3 hrs to fix
      app/html/src/client/preview/index.ts on lines 12..19
      app/react/src/client/preview/index.tsx on lines 10..17
      app/web-components/src/client/preview/index.ts on lines 12..19

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

      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

      interface ClientApi extends ClientStoryApi<ReactFramework['storyResult']> {
        setAddon(addon: any): void;
        configure(loader: Loadable, module: NodeModule): void;
        getStorybook(): IStorybookSection[];
        clearDecorators(): void;
      Severity: Major
      Found in app/react/src/client/preview/index.tsx and 3 other locations - About 3 hrs to fix
      app/html/src/client/preview/index.ts on lines 12..19
      app/server/src/client/preview/index.ts on lines 10..17
      app/web-components/src/client/preview/index.ts on lines 12..19

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

      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

      interface ClientApi extends ClientStoryApi<WebComponentsFramework['storyResult']> {
        setAddon(addon: any): void;
        configure(loader: Loadable, module: NodeModule): void;
        getStorybook(): IStorybookSection[];
        clearDecorators(): void;
      Severity: Major
      Found in app/web-components/src/client/preview/index.ts and 3 other locations - About 3 hrs to fix
      app/html/src/client/preview/index.ts on lines 12..19
      app/react/src/client/preview/index.tsx on lines 10..17
      app/server/src/client/preview/index.ts on lines 10..17

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

      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

      interface ClientApi extends ClientStoryApi<HtmlFramework['storyResult']> {
        setAddon(addon: any): void;
        configure(loader: Loadable, module: NodeModule): void;
        getStorybook(): IStorybookSection[];
        clearDecorators(): void;
      Severity: Major
      Found in app/html/src/client/preview/index.ts and 3 other locations - About 3 hrs to fix
      app/react/src/client/preview/index.tsx on lines 10..17
      app/server/src/client/preview/index.ts on lines 10..17
      app/web-components/src/client/preview/index.ts on lines 12..19

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

      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 WithCenteredMulti = () => (
        <Preview withToolbar>
          <Story inline storyFn={buttonFn} title="story1" parameters={{ layout: 'centered' }} />
          <Story inline storyFn={buttonFn} title="story2" parameters={{ layout: 'centered' }} />
        </Preview>
      Severity: Major
      Found in lib/components/src/blocks/Preview.stories.tsx and 1 other location - About 3 hrs to fix
      lib/components/src/blocks/Preview.stories.tsx on lines 125..130

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

      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 WithFullscreenMulti = () => (
        <Preview withToolbar>
          <Story inline storyFn={buttonFn} title="story1" parameters={{ layout: 'fullscreen' }} />
          <Story inline storyFn={buttonFn} title="story2" parameters={{ layout: 'fullscreen' }} />
        </Preview>
      Severity: Major
      Found in lib/components/src/blocks/Preview.stories.tsx and 1 other location - About 3 hrs to fix
      lib/components/src/blocks/Preview.stories.tsx on lines 138..143

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

      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

          describe('npm6', () => {
            it('with devDep it should run `npm install -D @storybook/addons`', () => {
              const executeCommandSpy = jest.spyOn(npmProxy, 'executeCommand').mockReturnValue('6.0.0');
      
              npmProxy.addDependencies({ installAsDevDependencies: true }, ['@storybook/addons']);
      Severity: Major
      Found in lib/cli/src/js-package-manager/NPMProxy.test.ts and 1 other location - About 3 hrs to fix
      lib/cli/src/js-package-manager/Yarn2Proxy.test.ts on lines 34..46

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

      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

        describe('addDependencies', () => {
          it('with devDep it should run `yarn install -D @storybook/addons`', () => {
            const executeCommandSpy = jest.spyOn(yarn2Proxy, 'executeCommand').mockReturnValue('');
      
            yarn2Proxy.addDependencies({ installAsDevDependencies: true }, ['@storybook/addons']);
      Severity: Major
      Found in lib/cli/src/js-package-manager/Yarn2Proxy.test.ts and 1 other location - About 3 hrs to fix
      lib/cli/src/js-package-manager/NPMProxy.test.ts on lines 50..62

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

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

      export const createStorybookWrapperComponent = (
        selector: string,
        template: string,
        storyComponent: Type<unknown> | undefined,
        styles: string[],

        File RendererFactory.test.ts has 298 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { Component, getPlatform, ɵresetJitOptions } from '@angular/core';
        import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
        import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
        import { Parameters } from '../types-6-0';
        
        
        Severity: Minor
        Found in app/angular/src/client/preview/angular-beta/RendererFactory.test.ts - About 3 hrs to fix

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

          export const CustomBrandImageUnsizedSVG: Story = () => {
            const theme = useTheme() as Theme;
            return (
              <ThemeProvider
                theme={{
          Severity: Major
          Found in lib/ui/src/components/sidebar/Heading.stories.tsx and 2 other locations - About 3 hrs to fix
          lib/ui/src/components/sidebar/Heading.stories.tsx on lines 141..157
          lib/ui/src/components/sidebar/Heading.stories.tsx on lines 159..175

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

          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 CustomBrandImageTall: Story = () => {
            const theme = useTheme() as Theme;
            return (
              <ThemeProvider
                theme={{
          Severity: Major
          Found in lib/ui/src/components/sidebar/Heading.stories.tsx and 2 other locations - About 3 hrs to fix
          lib/ui/src/components/sidebar/Heading.stories.tsx on lines 141..157
          lib/ui/src/components/sidebar/Heading.stories.tsx on lines 177..193

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

          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