maddumajohnerick/react-st-components

View on GitHub

Showing 17 of 22 total issues

Function Styled has 709 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Styled() {
  return (
    <>
      <STContainer>
        <STRow><h2>STLayout</h2></STRow>
Severity: Major
Found in src/docs.js - About 3 days to fix

    File docs.js has 762 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import ReactDOM from 'react-dom';
    import { GlobalStyle, STContainer, STRow, STColumn, STBadge, STButton, STButtonGroup, STCardList, STCard,
      STCardImage, STCardBody, STCardFooter, STInput, STInputGroup, STInputGroupText, STForm, STLabel,
      STTextarea, STSelect, STItem, STOptionsWrapper, STCheckbox, STRadio, STTable, STDropdown,
    Severity: Major
    Found in src/docs.js - About 1 day to fix

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

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={6}>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={6}>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={6}>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={6}>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STContainer>
        <STRow>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={12}>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={12}>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 171..212
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 713..764

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

      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 10 locations. Consider refactoring.
      Open

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn>
      Severity: Major
      Found in src/docs.js and 9 other locations - About 1 day to fix
      src/docs.js on lines 69..131
      src/docs.js on lines 136..166
      src/docs.js on lines 257..316
      src/docs.js on lines 321..365
      src/docs.js on lines 370..410
      src/docs.js on lines 415..479
      src/docs.js on lines 484..537
      src/docs.js on lines 603..668
      src/docs.js on lines 713..764

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

      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 STInput = styled.input`
        border: 1px solid ${({error, theme}) => error ? setColor('danger', theme.tones) : lightGrey};
        border-radius: ${({theme}) => theme.flat ? 0 : 3}px;
        height: ${({size}) => setSize(size)}px;
        font-size: ${({size}) => setFontSize(size)}rem;
      Severity: Major
      Found in src/input.js and 1 other location - About 6 hrs to fix
      src/select.js on lines 5..25

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

      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 STSelect = styled.select`
        border: 1px solid ${({error, theme}) => error ? setColor('danger', theme.tones) : lightGrey};
        border-radius: ${({theme}) => theme.flat ? 0 : 3}px;
        width: 100%;
        height: ${({size}) => setSize(size)}px;
      Severity: Major
      Found in src/select.js and 1 other location - About 6 hrs to fix
      src/input.js on lines 5..26

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

      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

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STThemeProvider theme={{
          tones: {
      Severity: Major
      Found in src/docs.js and 2 other locations - About 5 hrs to fix
      src/docs.js on lines 217..252
      src/docs.js on lines 542..598

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

      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

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn>
      Severity: Major
      Found in src/docs.js and 2 other locations - About 5 hrs to fix
      src/docs.js on lines 542..598
      src/docs.js on lines 769..798

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

      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

              <STRow>
                <STColumn>
                  <div className="editor-wrapper">
                    <LiveProvider scope={scope} code={`<STRow>
        <STColumn lg={6}>
      Severity: Major
      Found in src/docs.js and 2 other locations - About 5 hrs to fix
      src/docs.js on lines 217..252
      src/docs.js on lines 769..798

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

      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