fbredius/storybook

View on GitHub

Showing 5,758 of 5,758 total issues

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

  describe('with component with void element, attribute and value only selector', () => {
    @Component({
      selector: 'input[foo="bar"]',
      template: '<button></button>',
    })
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 32..46
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 48..62
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 64..78
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 80..94
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 96..110
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 128..142
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 144..158
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 160..174
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 176..190
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 192..206
app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts on lines 208..222

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

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

            value: {
              name: 'shape',
              value: {
                foo: {
                  name: 'string',
addons/docs/src/frameworks/react/propTypes/handleProp.test.tsx on lines 291..319

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

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

        type: {
          name: 'shape',
          value: {
            foo: {
              name: 'string',
addons/docs/src/frameworks/react/propTypes/handleProp.test.tsx on lines 876..904

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

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 render my-story for story template', async () => {
      const render = await rendererFactory.getRendererInstance('my-story', rootTargetDOMNode);
      await render.render({
        storyFnAngular: {
          template: '🦊',
app/angular/src/client/preview/angular-beta/RendererFactory.test.ts on lines 244..260

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

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('when angular.json have the target without required configuration', () => {
      beforeEach(() => {
        options = {
          angularBrowserTarget: 'no-target-conf-project:target-build:target-conf',
        } as PresetOptions;
Severity: Major
Found in app/angular/src/server/framework-preset-angular-cli.test.ts and 1 other location - About 3 hrs to fix
app/angular/src/server/framework-preset-angular-cli.test.ts on lines 663..675

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

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 render my-story for story template', async () => {
        const render = await rendererFactory.getRendererInstance(
          'my-ストーリー',
          rootTargetDOMNode
        );
app/angular/src/client/preview/angular-beta/RendererFactory.test.ts on lines 41..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 113.

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

  const initModule = async () => {
    // On initial load, the local iframe will select the first story (or other "selection specifier")
    // and emit STORY_SPECIFIED with the id. We need to ensure we respond to this change.
    fullAPI.on(
      STORY_SPECIFIED,
Severity: Major
Found in lib/api/src/modules/stories.ts - About 3 hrs to fix

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

        it('should log', async () => {
          const baseWebpackConfig = newWebpackConfiguration();
          await webpackFinal(baseWebpackConfig, options);
    
          expect(logger.info).toHaveBeenCalledTimes(3);
    Severity: Major
    Found in app/angular/src/server/framework-preset-angular-cli.test.ts and 4 other locations - About 3 hrs to fix
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 166..180
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 642..656
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 695..709
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 742..756

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

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

        it('should log', async () => {
          const baseWebpackConfig = newWebpackConfiguration();
          await webpackFinal(baseWebpackConfig, options);
    
          expect(logger.info).toHaveBeenCalledTimes(3);
    Severity: Major
    Found in app/angular/src/server/framework-preset-angular-cli.test.ts and 4 other locations - About 3 hrs to fix
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 166..180
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 620..634
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 695..709
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 742..756

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

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

        it('should log', async () => {
          const baseWebpackConfig = newWebpackConfiguration();
          await webpackFinal(baseWebpackConfig, options);
    
          expect(logger.info).toHaveBeenCalledTimes(3);
    Severity: Major
    Found in app/angular/src/server/framework-preset-angular-cli.test.ts and 4 other locations - About 3 hrs to fix
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 166..180
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 620..634
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 642..656
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 695..709

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

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

        it('should log', async () => {
          const baseWebpackConfig = newWebpackConfiguration();
          await webpackFinal(baseWebpackConfig, options);
    
          expect(logger.info).toHaveBeenCalledTimes(3);
    Severity: Major
    Found in app/angular/src/server/framework-preset-angular-cli.test.ts and 4 other locations - About 3 hrs to fix
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 620..634
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 642..656
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 695..709
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 742..756

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

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

          it('should log', async () => {
            const baseWebpackConfig = newWebpackConfiguration();
            await webpackFinal(baseWebpackConfig, options);
    
            expect(logger.info).toHaveBeenCalledTimes(3);
    Severity: Major
    Found in app/angular/src/server/framework-preset-angular-cli.test.ts and 4 other locations - About 3 hrs to fix
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 166..180
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 620..634
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 642..656
    app/angular/src/server/framework-preset-angular-cli.test.ts on lines 742..756

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

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

    async function build(options: Options) {
      const { input, externals, cwd, optimized } = options;
      const setting: RollupOptions = {
        input,
        external: externals,
    Severity: Major
    Found in scripts/bundle-package.ts - About 3 hrs to fix

      Function buildStaticStandalone has 95 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export async function buildStaticStandalone(options: CLIOptions & LoadOptions & BuilderOptions) {
        /* eslint-disable no-param-reassign */
        options.configType = 'PRODUCTION';
      
        if (options.outputDir === '') {
      Severity: Major
      Found in lib/core-server/src/build-static.ts - About 3 hrs to fix

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

        function load(options: StoryshotsOptions) {
          global.STORYBOOK_ENV = 'vue3';
        
          const storybook = jest.requireActual('@storybook/vue3');
        
        
        addons/storyshots/storyshots-core/src/frameworks/html/loader.ts on lines 10..25
        addons/storyshots/storyshots-core/src/frameworks/preact/loader.ts on lines 16..31
        addons/storyshots/storyshots-core/src/frameworks/rax/loader.ts on lines 11..26
        addons/storyshots/storyshots-core/src/frameworks/svelte/loader.ts on lines 13..28
        addons/storyshots/storyshots-core/src/frameworks/web-components/loader.ts on lines 10..25

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

        function load(options: StoryshotsOptions) {
          global.STORYBOOK_ENV = 'rax';
        
          const storybook = jest.requireActual('@storybook/rax');
        
        
        addons/storyshots/storyshots-core/src/frameworks/html/loader.ts on lines 10..25
        addons/storyshots/storyshots-core/src/frameworks/preact/loader.ts on lines 16..31
        addons/storyshots/storyshots-core/src/frameworks/svelte/loader.ts on lines 13..28
        addons/storyshots/storyshots-core/src/frameworks/vue3/loader.ts on lines 11..26
        addons/storyshots/storyshots-core/src/frameworks/web-components/loader.ts on lines 10..25

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

        function load(options: StoryshotsOptions) {
          global.STORYBOOK_ENV = 'preact';
        
          const storybook = jest.requireActual('@storybook/preact');
        
        
        addons/storyshots/storyshots-core/src/frameworks/html/loader.ts on lines 10..25
        addons/storyshots/storyshots-core/src/frameworks/rax/loader.ts on lines 11..26
        addons/storyshots/storyshots-core/src/frameworks/svelte/loader.ts on lines 13..28
        addons/storyshots/storyshots-core/src/frameworks/vue3/loader.ts on lines 11..26
        addons/storyshots/storyshots-core/src/frameworks/web-components/loader.ts on lines 10..25

        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

          beforeEach(() => {
            buildStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve());
            cpSpawnMock.spawn.mockImplementation(() => ({
              stdout: { on: () => {} },
              stderr: { on: () => {} },
        Severity: Major
        Found in app/angular/src/builders/build-storybook/index.spec.ts and 1 other location - About 3 hrs to fix
        app/angular/src/builders/start-storybook/index.spec.ts on lines 51..58

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

        function load(options: StoryshotsOptions) {
          global.STORYBOOK_ENV = 'svelte';
        
          const storybook = jest.requireActual('@storybook/svelte');
        
        
        addons/storyshots/storyshots-core/src/frameworks/html/loader.ts on lines 10..25
        addons/storyshots/storyshots-core/src/frameworks/preact/loader.ts on lines 16..31
        addons/storyshots/storyshots-core/src/frameworks/rax/loader.ts on lines 11..26
        addons/storyshots/storyshots-core/src/frameworks/vue3/loader.ts on lines 11..26
        addons/storyshots/storyshots-core/src/frameworks/web-components/loader.ts on lines 10..25

        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

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

        export const entries = async (_: unknown, options: any) => {
          let result: string[] = [];
        
          result = result.concat(await options.presets.apply('previewEntries', [], options));
        
        
        Severity: Major
        Found in lib/builder-webpack5/src/presets/preview-preset.ts and 1 other location - About 3 hrs to fix
        lib/builder-webpack4/src/presets/preview-preset.ts on lines 5..21

        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