JamieMason/self-help

View on GitHub

Showing 3 of 11 total issues

File rxjs-operator-decision-tree.ts has 655 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Branch, Node } from '..';

const withRandomDelay = (children: Node[]) => (): Promise<Node[]> =>
  new Promise((resolve) =>
    setTimeout(() => resolve(children), (Math.floor(Math.random() * 5) + 1) * 1000),
Severity: Major
Found in src/fixtures/rxjs-operator-decision-tree.ts - About 1 day to fix

    Function createTreeMachine has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const createTreeMachine = (rootNode: Node, id: string = 'tree-machine'): TreeMachine => {
      const RENDER_BRANCH = `#${id}.renderBranch`;
      const RENDER_LEAF = `#${id}.renderLeaf`;
      const RENDER_VALUE = `#${id}.renderValue`;
      const RESOLVE_BRANCH = `#${id}.resolveBranch`;
    Severity: Major
    Found in src/machine/tree/index.ts - About 3 hrs to fix

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

      export const start = async (interpreter: TreeInterpreter): Promise<void> => {
        const renderChoice = (currentNode: Node) => {
          console.log(chalk.green('?'), chalk.bold(currentNode.label));
        };
      
      
      Severity: Minor
      Found in src/interactive.ts - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language