ethanneff/example

View on GitHub

Showing 120 of 120 total issues

Function Header has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const Header = () => {
  const dispatch = useAppDispatch();
  const delay = useAppSelector((state) => state.gameOfLife.delay);
  const count = useAppSelector((state) => state.gameOfLife.count);
  const onCountSlide = useCallback(
Severity: Minor
Found in src/apps/Playground/Games/GameOfLife/Header.tsx - About 1 hr to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

          <View style={{ paddingVertical: spacing(4) }}>
            <SkeletonLoader
              borderRadius={0}
              height={spacing(6)}
              width={spacing(19) * 4}
    src/apps/Playground/Features/SkeletonLoader/LoadingProfile.tsx on lines 37..43
    src/apps/Playground/Features/SkeletonLoader/LoadingSection.tsx on lines 39..45

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

          <View style={{ paddingBottom: spacing(4) }}>
            <SkeletonLoader
              borderRadius={0}
              height={spacing(6)}
              width={spacing(20) * 4}
    src/apps/Playground/Features/SkeletonLoader/LoadingProfile.tsx on lines 37..43
    src/apps/Playground/Features/SkeletonLoader/LoadingSection.tsx on lines 32..38

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            <View style={{ paddingVertical: spacing(4) }}>
              <SkeletonLoader
                borderRadius={0}
                height={spacing(6)}
                width={spacing(16) * 4}
    src/apps/Playground/Features/SkeletonLoader/LoadingSection.tsx on lines 32..38
    src/apps/Playground/Features/SkeletonLoader/LoadingSection.tsx on lines 39..45

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export const Home = () => {
      const [showModal, setShowModal] = useState(initialState);
      const { onLeftPress } = useAdminNavBack();
    
      const handleModalBackgroundPress = useCallback(() => {
    Severity: Minor
    Found in src/apps/CantHurtMe/Home.tsx - About 1 hr to fix

      Function getMatches has 40 lines of code (exceeds 25 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 1 hr to fix

        Similar blocks of code found in 12 locations. Consider refactoring.
        Open

          it('a minute ago', () => {
            expect.hasAssertions();
            const date = toDate(sub(new Date(), { minutes: 1 }));
            expect(formatRelativeDate(date)).toBe('1m');
          });
        Severity: Major
        Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 67.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 12 locations. Consider refactoring.
        Open

          it('a day ago', () => {
            expect.hasAssertions();
            const date = toDate(sub(new Date(), { days: 1 }));
            expect(formatRelativeDate(date)).toBe('1d');
          });
        Severity: Major
        Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
        src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 67.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function Template has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const Template = () => {
          const colors = useColors();
          const { goBack } = useNavigation();
          const [value, setValue] = useState(0);
          const dispatch = useAppDispatch();
        Severity: Minor
        Found in src/apps/Playground/Template/index.tsx - About 1 hr to fix

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('2 days ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { days: 3 }));
              expect(formatRelativeDate(date)).toBe('3d');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('20 minutes ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { minutes: 20 }));
              expect(formatRelativeDate(date)).toBe('20m');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('3 years ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { years: 3 }));
              expect(formatRelativeDate(date)).toBe('3y');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('a month ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { months: 1 }));
              expect(formatRelativeDate(date)).toBe('4w');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('30 seconds ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { seconds: 30 }));
              expect(formatRelativeDate(date)).toBe('');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('3 hours ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { hours: 3 }));
              expect(formatRelativeDate(date)).toBe('3h');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('a year ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { years: 1 }));
              expect(formatRelativeDate(date)).toBe('1y');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('an hour ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { hours: 1 }));
              expect(formatRelativeDate(date)).toBe('1h');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 7..11
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          export const checklistItemTriggerSchema = z.object({
            id: z.string(),
            itemId: z.string(),
            triggerId: z.string(),
            userId: z.string(),
          Severity: Major
          Found in src/apps/Checklists/data/types.ts and 1 other location - About 1 hr to fix
          src/apps/Checklists/data/types.ts on lines 40..45

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          export const checklistActivitySchema = z.object({
            checklistId: z.string(),
            date: z.number(),
            id: z.string(),
            userId: z.string(),
          Severity: Major
          Found in src/apps/Checklists/data/types.ts and 1 other location - About 1 hr to fix
          src/apps/Checklists/data/types.ts on lines 31..36

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 12 locations. Consider refactoring.
          Open

            it('a few seconds ago', () => {
              expect.hasAssertions();
              const date = toDate(sub(new Date(), { seconds: 10 }));
              expect(formatRelativeDate(date)).toBe('');
            });
          Severity: Major
          Found in src/apps/Playground/Features/SwipeFeed/__tests__/index.ts and 11 other locations - About 1 hr to fix
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 12..16
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 17..21
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 22..26
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 27..31
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 32..36
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 37..41
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 42..46
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 47..51
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 52..56
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 57..61
          src/apps/Playground/Features/SwipeFeed/__tests__/index.ts on lines 62..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language