AndrewWalsh/at-your-service

View on GitHub

Showing 28 of 89 total issues

Function createTree has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const createTree = useCallback(() => {
    function recurseTree(ssorsr: StoreStructure | StoreRoute, path = "") {
      return Object.entries(ssorsr).map(([key, structOrRoute]) => {
        if (isStoreRoute(structOrRoute)) {
          // TODO: get rid of this 's200' etc business
Severity: Minor
Found in src/ui/Drawer.tsx - About 1 hr to fix

    Function startAtYourService has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default async function startAtYourService(
      config: Partial<Config> = defaultConfig
    ) {
      try {
        if (config.registerWorker) {
    Severity: Minor
    Found in src/interface/start-at-your-service.ts - About 1 hr to fix

      Function slowestRoute has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const slowestRoute = (storeStruct: StoreStructure): StoreRoute => {
        let curMax = -Infinity;
        let slowest: StoreRoute = {
          meta: [],
          pathname: "",
      Severity: Minor
      Found in src/ui/Metrics.tsx - About 1 hr to fix

        Avoid too many return statements within this function.
        Open

              return passthrough()
        Severity: Major
        Found in demo/public/mockServiceWorker.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            return passthrough()
          Severity: Major
          Found in docs/mockServiceWorker.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return passthrough()
            Severity: Major
            Found in docs/mockServiceWorker.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                if (!(event.request.url.indexOf("http") === 0)) return;
              Severity: Major
              Found in src/_not_exported/at-your-service-sw.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                  return passthrough()
                Severity: Major
                Found in demo/public/mockServiceWorker.js - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language