SupremeTechnopriest/react-idle-timer

View on GitHub

Showing 19 of 19 total issues

File useIdleTimer.tsx has 611 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { useEffect, useRef, useCallback, useMemo } from 'react'

import { TabManager } from './TabManager'

import { DEFAULT_ELEMENT, DEFAULT_EVENTS } from './utils/defaults'
Severity: Major
Found in src/useIdleTimer.tsx - About 1 day to fix

    File demo.tsx has 497 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { useRouter } from 'next/router'
    import { useEffect, useState, useRef, useCallback } from 'react'
    import { useIdleTimer, MessageType, workerTimers } from 'react-idle-timer'
    import { motion, useMotionValue } from 'framer-motion'
    import {
    Severity: Minor
    Found in docs/pages/demo.tsx - About 7 hrs to fix

      File Demo.tsx has 328 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { useState, useRef, MutableRefObject, BaseSyntheticEvent } from 'react'
      import { useTranslation } from 'next-i18next'
      import {
        chakra,
        Box,
      Severity: Minor
      Found in docs/src/components/Demo.tsx - About 3 hrs to fix

        File ControlDrawer.tsx has 276 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { useRef, useState, BaseSyntheticEvent } from 'react'
        import { IIdleTimer, IIdleTimerProps } from 'react-idle-timer'
        import {
          Drawer,
          DrawerHeader,
        Severity: Minor
        Found in docs/src/components/ControlDrawer.tsx - About 2 hrs to fix

          Avoid too many return statements within this function.
          Open

                  return result
          Severity: Major
          Found in docs/pages/demo.tsx - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return result
            Severity: Major
            Found in docs/pages/demo.tsx - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return result
              Severity: Major
              Found in docs/pages/demo.tsx - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return result
                Severity: Major
                Found in docs/pages/demo.tsx - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return result
                  Severity: Major
                  Found in docs/pages/demo.tsx - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return result
                    Severity: Major
                    Found in docs/pages/demo.tsx - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

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

                        Avoid too many return statements within this function.
                        Open

                                  return err.message
                        Severity: Major
                        Found in docs/pages/demo.tsx - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return result
                          Severity: Major
                          Found in docs/pages/demo.tsx - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

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

                              Avoid too many return statements within this function.
                              Open

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

                                Avoid too many return statements within this function.
                                Open

                                          return result
                                Severity: Major
                                Found in docs/pages/demo.tsx - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return result
                                  Severity: Major
                                  Found in docs/pages/demo.tsx - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                            return result
                                    Severity: Major
                                    Found in docs/pages/demo.tsx - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return result
                                      Severity: Major
                                      Found in docs/pages/demo.tsx - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language