EmaSuriano/gatsby-starter-mate

View on GitHub

Showing 12 of 12 total issues

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

const LandingPage = () => {
  const { name, roles, socialLinks, deterministic } = useSiteQuery();

  return (
    <Section.Container id={SECTION.home} Background={Background}>
Severity: Minor
Found in src/sections/Landing.tsx - About 1 hr to fix

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

    const BORDER_PATH_MAP = {
      'top-left': `polygon(0 0%, 100% 0%, calc(100% - ${BORDER_SPACING}) 100%, 0% 100%);`,
      'top-right': `polygon(0 0%, 100% 0%, 100% 100%, ${BORDER_SPACING} 100%);`,
      'bottom-right': `polygon(${BORDER_SPACING} 0%, 100% 0%, 100% 100%, 0% 100%);`,
      'bottom-left': `polygon(0 0%, calc(100% - ${BORDER_SPACING}) 0%, 100% 100%, 0% 100%);`,
    Severity: Major
    Found in src/components/ImageLabel.tsx and 1 other location - About 1 hr to fix
    src/components/ImageLabel.tsx on lines 41..46

    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 64.

    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

    const BORDER_RADIUS_MAP = {
      'top-left': `${BORDER_RADIUS} 0 0 0`,
      'top-right': `0 ${BORDER_RADIUS} 0 0`,
      'bottom-right': `0 0 ${BORDER_RADIUS} 0`,
      'bottom-left': `0 0 0 ${BORDER_RADIUS}`,
    Severity: Major
    Found in src/components/ImageLabel.tsx and 1 other location - About 1 hr to fix
    src/components/ImageLabel.tsx on lines 34..39

    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 64.

    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 useMediumQuery has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const useMediumQuery = (): Response => {
      const { mediumUser } = useStaticQuery<QueryResponse>(graphql`
        query MediumPostQuery {
          mediumUser {
            id
    Severity: Minor
    Found in src/queries/useMediumQuery.ts - About 1 hr to fix

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

      const Header = () => {
        const { profile } = useHelmetQuery();
      
        return (
          <StyledHeadroom>
      Severity: Minor
      Found in src/components/Header.tsx - About 1 hr to fix

        Function Footer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const Footer = () => {
          const { name, socialLinks } = useSiteQuery();
        
          return (
            <Box p={[2, 3]} backgroundColor="primary" id="footer" as="footer">
        Severity: Minor
        Found in src/components/Footer.tsx - About 1 hr to fix

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

          export const useProjectsQuery = (): Project[] => {
            const { contentfulAbout } = useStaticQuery<QueryResponse>(graphql`
              query ProjectsQuery {
                contentfulAbout {
                  projects {
          Severity: Minor
          Found in src/queries/useProjectsQuery.ts - About 1 hr to fix

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

            export const useAboutMeQuery = (): AboutMe => {
              const {
                contentfulAbout: { aboutMe, profile },
              } = useStaticQuery<QueryResponse>(graphql`
                query AboutMeQuery {
            Severity: Minor
            Found in src/queries/useAboutMeQuery.ts - About 1 hr to fix

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

                          <Box mx={1} fontSize={4}>
                            <SocialLink name="Homepage" icon="globe" url={homepage} />
                          </Box>
              Severity: Minor
              Found in src/components/Project.tsx and 1 other location - About 50 mins to fix
              src/components/Project.tsx on lines 43..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 51.

              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

                          <Box mx={1} fontSize={4}>
                            <SocialLink name="Repository" icon="github" url={repository} />
                          </Box>
              Severity: Minor
              Found in src/components/Project.tsx and 1 other location - About 50 mins to fix
              src/components/Project.tsx on lines 46..48

              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 51.

              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

                    <link
                      rel="icon"
                      type="image/png"
                      sizes="32x32"
                      href={`https:${profile.favicon32.src}`}
              Severity: Minor
              Found in src/components/Helmet.tsx and 1 other location - About 35 mins to fix
              src/components/Helmet.tsx on lines 48..53

              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 46.

              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

                    <link
                      rel="icon"
                      type="image/png"
                      sizes="16x16"
                      href={`https:${profile.favicon16.src}`}
              Severity: Minor
              Found in src/components/Helmet.tsx and 1 other location - About 35 mins to fix
              src/components/Helmet.tsx on lines 42..47

              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 46.

              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