fbredius/storybook

View on GitHub
lib/client-api/src/ClientApi.ts

Summary

Maintainability
D
1 day
Test Coverage

File ClientApi.ts has 333 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import deprecate from 'util-deprecate';
import dedent from 'ts-dedent';
import global from 'global';
import { logger } from '@storybook/client-logger';
import {
Severity: Minor
Found in lib/client-api/src/ClientApi.ts - About 4 hrs to fix

    Function add has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        api.add = (storyName: string, storyFn: StoryFn<TFramework>, parameters: Parameters = {}) => {
          hasAdded = true;
    
          if (typeof storyName !== 'string') {
            throw new Error(`Invalid or missing storyName provided for a "${kind}" story.`);
    Severity: Minor
    Found in lib/client-api/src/ClientApi.ts - About 1 hr to fix

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

          api.addLoader = (loader: LoaderFunction<TFramework>) => {
            if (hasAdded) throw new Error(`You cannot add a loader after the first story for a kind.`);
      
            meta.loaders.push(loader);
            return api;
      Severity: Major
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 1 hr to fix
      lib/client-api/src/ClientApi.ts on lines 374..381

      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

          api.addDecorator = (decorator: DecoratorFunction<TFramework>) => {
            if (hasAdded)
              throw new Error(`You cannot add a decorator after the first story for a kind.
      Read more here: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#can-no-longer-add-decoratorsparameters-after-stories`);
      
      
      Severity: Major
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 1 hr to fix
      lib/client-api/src/ClientApi.ts on lines 383..388

      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

      export const addLoader = (loader: LoaderFunction<AnyFramework>, deprecationWarning = true) => {
        checkMethod('addLoader', deprecationWarning);
        singleton.addLoader(loader);
      };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 50 mins to fix
      lib/client-api/src/ClientApi.ts on lines 90..96

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

      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 addDecorator = (
        decorator: DecoratorFunction<AnyFramework>,
        deprecationWarning = true
      ) => {
        checkMethod('addDecorator', deprecationWarning);
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 50 mins to fix
      lib/client-api/src/ClientApi.ts on lines 103..106

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

      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 addArgsEnhancer = (enhancer: ArgsEnhancer<AnyFramework>) => {
        checkMethod('addArgsEnhancer', false);
        singleton.addArgsEnhancer(enhancer);
      };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 35 mins to fix
      lib/client-api/src/ClientApi.ts on lines 123..126

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

      export const addArgTypesEnhancer = (enhancer: ArgTypesEnhancer<AnyFramework>) => {
        checkMethod('addArgTypesEnhancer', false);
        singleton.addArgTypesEnhancer(enhancer);
      };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 35 mins to fix
      lib/client-api/src/ClientApi.ts on lines 118..121

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

        addDecorator = (decorator: DecoratorFunction<TFramework>) => {
          this.facade.projectAnnotations.decorators.push(decorator);
        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 2 other locations - About 35 mins to fix
      lib/client-api/src/ClientApi.ts on lines 222..224
      lib/client-api/src/ClientApi.ts on lines 240..242

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

      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

        addLoader = (loader: LoaderFunction<TFramework>) => {
          this.facade.projectAnnotations.loaders.push(loader);
        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 2 other locations - About 35 mins to fix
      lib/client-api/src/ClientApi.ts on lines 184..186
      lib/client-api/src/ClientApi.ts on lines 240..242

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

      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 interface GetStorybookKind<TFramework extends AnyFramework> {
        kind: string;
        fileName: string;
        stories: GetStorybookStory<TFramework>[];
      }
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 35 mins to fix
      lib/client-api/src/StoryStoreFacade.ts on lines 32..36

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

      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

        addArgsEnhancer = (enhancer: ArgsEnhancer<TFramework>) => {
          this.facade.projectAnnotations.argsEnhancers.push(enhancer);
        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 2 other locations - About 35 mins to fix
      lib/client-api/src/ClientApi.ts on lines 184..186
      lib/client-api/src/ClientApi.ts on lines 222..224

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

      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

          if (globalTypes) {
            this.facade.projectAnnotations.globalTypes = {
              ...this.facade.projectAnnotations.globalTypes,
              ...normalizeInputTypes(globalTypes),
            };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 30 mins to fix
      lib/client-api/src/ClientApi.ts on lines 233..238

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

      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

        addArgTypes = (argTypes: ArgTypes) => {
          this.facade.projectAnnotations.argTypes = {
            ...this.facade.projectAnnotations.argTypes,
            ...normalizeInputTypes(argTypes),
          };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts and 1 other location - About 30 mins to fix
      lib/client-api/src/ClientApi.ts on lines 214..219

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

      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

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      block is empty
      Open

          () => {},
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: no-empty

      Disallows empty blocks.

      Blocks with a comment inside are not considered empty.

      Rationale

      Empty blocks are often indicators of missing code.

      Config

      If allow-empty-catch is specified, then catch blocks are allowed to be empty. If allow-empty-functions is specified, then function definitions are allowed to be empty.

      Examples
      "no-empty": true
      "no-empty": true,allow-empty-catch
      "no-empty": true,allow-empty-functions
      "no-empty": true,allow-empty-catch,allow-empty-functions
      Schema
      {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "allow-empty-catch"
              ]
            },
            {
              "type": "string",
              "enum": [
                "allow-empty-functions"
              ]
            }
          ]
        }
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      Unnecessary semicolon
      Open

        };
      Severity: Minor
      Found in lib/client-api/src/ClientApi.ts by tslint

      Rule: semicolon

      Enforces consistent semicolon usage at the end of every statement.

      Notes
      • Has Fix

      Config

      One of the following arguments must be provided:

      • "always" enforces semicolons at the end of every statement.
      • "never" disallows semicolons at the end of every statement except for when they are necessary.

      The following arguments may be optionally provided:

      • "ignore-interfaces" skips checking semicolons at the end of interface members.
      • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
      • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
      Examples
      "semicolon": true,always
      "semicolon": true,never
      "semicolon": true,always,ignore-interfaces
      "semicolon": true,always,ignore-bound-class-methods
      Schema
      {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "always",
              "never"
            ]
          },
          {
            "type": "string",
            "enum": [
              "ignore-interfaces"
            ]
          }
        ],
        "additionalItems": false
      }

      For more information see this page.

      There are no issues that match your filters.

      Category
      Status