ethanneff/example

View on GitHub

Showing 49 of 120 total issues

File config.ts has 7116 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import * as I from '@mdi/js';

// https://textedit.tools/kebabcase
export const icon = {
  'ab-testing': I.mdiAbTesting,
Severity: Major
Found in src/components/Icon/config.ts - About 2 wks to fix

    Function WeekendPlanner has 227 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const WeekendPlanner = () => {
      const colors = useColors();
      const { goBack } = useNavigation();
      const dropShadow = useDropShadow();
      const height = useAppSelector(getLargestDimension);
    Severity: Major
    Found in src/apps/Playground/Creations/WeekendPlanner/index.tsx - About 1 day to fix

      File palette.ts has 486 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      type Color =
        | 'blue'
        | 'celery'
        | 'chartreuse'
        | 'cyan'
      Severity: Minor
      Found in src/features/Config/palette.ts - About 7 hrs to fix

        Function Crash has 160 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const Crash = () => {
          const colors = useColors();
          const { goBack } = useNavigation();
        
          const [playerGame, setPlayerGame] = useState<PlayerGame>({
        Severity: Major
        Found in src/apps/Playground/Games/Crash/index.tsx - About 6 hrs to fix

          Function Home has 156 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const Home = () => {
            const colors = useColors();
            const { onLeftPress } = useAdminNavBack();
            const styles = StyleSheet.create({
              bottom: {
          Severity: Major
          Found in src/apps/Journal/Home.tsx - About 6 hrs to fix

            Function Inputs has 146 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const Inputs = () => {
              const { goBack } = useNavigation();
              const colors = useColors();
            
              const [form, setForm] = useState({
            Severity: Major
            Found in src/apps/Playground/Components/Inputs/index.tsx - About 5 hrs to fix

              Function Startup has 140 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const Startup = () => {
                const colors = useColors();
                const { goBack } = useNavigation();
                const [form, setForm] = useState<Form>(initialState);
                const launchWeeks = Number.parseInt(form.launchWeeks, 10);
              Severity: Major
              Found in src/apps/Playground/Creations/Startup/index.tsx - About 5 hrs to fix

                Function ItemDetail has 137 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const ItemDetail = () => {
                  const dispatch = useAppDispatch();
                  const { goBack } = useNavigation();
                  const colors = useColors();
                  const { itemId, parentItemId } = useAppSelector((s) => s.complete.item.nav);
                Severity: Major
                Found in src/apps/Complete/screens/ItemDetail/index.tsx - About 5 hrs to fix

                  Function AppleStopwatch has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const AppleStopwatch = () => {
                    const { goBack } = useNavigation();
                    const [state, setState] = useState<State>({
                      laps: [],
                      now: 0,
                  Severity: Major
                  Found in src/apps/Playground/Creations/AppleStopwatch/index.tsx - About 5 hrs to fix

                    Function OKRs has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const OKRs = () => {
                      const { goBack } = useNavigation();
                      const colors = useColors();
                    
                      return (
                    Severity: Major
                    Found in src/apps/Playground/Creations/OKRs/index.tsx - About 5 hrs to fix

                      Function Modals has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const Modals = () => {
                        const { goBack } = useNavigation();
                        const colors = useColors();
                        const [modal, setModal] = useState<Modal>(null);
                        const handleModalChange = useCallback(
                      Severity: Major
                      Found in src/apps/Playground/Components/Modals/index.tsx - About 4 hrs to fix

                        Function getMatches has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        const getMatches = (board: Board): Matches => {
                          const matches: Matches = {};
                          for (let rowIndex = 0; rowIndex < board.length; rowIndex++)
                            for (let colIndex = 0; colIndex < board[rowIndex].length; colIndex++) {
                              const mid = board[rowIndex][colIndex];
                        Severity: Minor
                        Found in src/apps/Playground/Games/Bejeweled/index.tsx - About 3 hrs 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 Bejeweled has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const Bejeweled = () => {
                          const { goBack } = useNavigation();
                          const dimension = useAppSelector(getSmallestDimension);
                        
                          const colors = useColors();
                        Severity: Major
                        Found in src/apps/Playground/Games/Bejeweled/index.tsx - About 3 hrs to fix

                          Function Fonts has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const Fonts = () => {
                            const { goBack } = useNavigation();
                            const colors = useColors();
                          
                            return (
                          Severity: Major
                          Found in src/apps/Playground/Components/Fonts/index.tsx - About 2 hrs to fix

                            Function Ball has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const Ball = () => {
                              const { layout, onLayout } = useLayout();
                              const { goBack } = useNavigation();
                              const ballPosition = useRef(new Animated.ValueXY({ x: 0, y: 0 }));
                              const useNativeDriver = useDriver();
                            Severity: Major
                            Found in src/apps/Playground/Creations/Ball/index.tsx - About 2 hrs to fix

                              Function EditItem has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const EditItem = () => {
                                const dispatch = useAppDispatch();
                                const activeMessage = useAppSelector(getActiveChatMessage);
                                const messageReference = useRef(activeMessage?.message ?? '');
                              
                              
                              Severity: Major
                              Found in src/apps/Playground/Features/Chat/EditItem.tsx - About 2 hrs to fix

                                File index.tsx has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import React, { useCallback, useState } from 'react';
                                import { v4 } from 'uuid';
                                import {
                                  Button,
                                  Card,
                                Severity: Minor
                                Found in src/apps/Playground/Creations/WeekendPlanner/index.tsx - About 2 hrs to fix

                                  Function PinchSpread has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const PinchSpread = () => {
                                    const [state, setState] = useState({ pinchCount: 0, spreadCount: 0 });
                                    const colors = useColors();
                                    const { goBack } = useNavigation();
                                    const styles = StyleSheet.create({
                                  Severity: Major
                                  Found in src/apps/Playground/Features/PinchSpread/index.tsx - About 2 hrs to fix

                                    Function SkeletonLoading has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const SkeletonLoading = () => {
                                      const { goBack } = useNavigation();
                                      const colors = useColors();
                                      const mounted = useRef(true);
                                      const [loading, setLoading] = useState(true);
                                    Severity: Major
                                    Found in src/apps/Playground/Features/SkeletonLoader/index.tsx - About 2 hrs to fix

                                      Function Reflect has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const Reflect = () => {
                                        const colors = useColors();
                                        const { tabBarEdges } = useLayout();
                                      
                                        return (
                                      Severity: Major
                                      Found in src/apps/Complete/screens/Reflect/index.tsx - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language