zacanger/koa-simple-static

View on GitHub

Showing 7 of 7 total issues

Function simpleStatic has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const simpleStatic = (options: Opts): Middleware => {
  const dir = normalize(options.dir)
  const files = {}

  readDir(dir).forEach((name: string): void => {
Severity: Major
Found in src/index.ts - About 5 hrs to fix

    Avoid too many return statements within this function.
    Open

            return
    Severity: Major
    Found in src/index.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return
      Severity: Major
      Found in src/index.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return
        Severity: Major
        Found in src/index.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return
          Severity: Major
          Found in src/index.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return
            Severity: Major
            Found in src/index.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return
              Severity: Major
              Found in src/index.ts - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language