redux-observable/redux-observable

View on GitHub

Showing 4 of 4 total issues

Function createEpicMiddleware has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function createEpicMiddleware<
  Input = unknown,
  Output extends Input = Input,
  State = void,
  Dependencies = any
Severity: Major
Found in src/createEpicMiddleware.ts - About 2 hrs to fix

    Function epicMiddleware has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const epicMiddleware: EpicMiddleware<Input, Output, State, Dependencies> = (
        _store
      ) => {
        if (process.env.NODE_ENV !== 'production' && store) {
          // https://github.com/redux-observable/redux-observable/issues/389
    Severity: Minor
    Found in src/createEpicMiddleware.ts - About 1 hr to fix

      Function createEpicMiddleware has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      export function createEpicMiddleware<
        Input = unknown,
        Output extends Input = Input,
        State = void,
        Dependencies = any
      Severity: Minor
      Found in src/createEpicMiddleware.ts - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function combineEpics has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      export function combineEpics<
        Input = unknown,
        Output extends Input = Input,
        State = void,
        Dependencies = any
      Severity: Minor
      Found in src/combineEpics.ts - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Severity
      Category
      Status
      Source
      Language