nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

Function WeekDay has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const WeekDay = React.forwardRef((props, ref) => {
    const {
        name,
        value,
        locale,
Severity: Minor
Found in src/components/WeekDayPicker/weekDay.js - About 1 hr to fix

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

        render() {
            const {
                style,
                className,
                label,
    Severity: Minor
    Found in src/components/RadioGroup/index.js - About 1 hr to fix

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

      const extractExamples = file => {
          const code = fs.readFileSync(file.path).toString();
          const componentName = file.path.match(/src\/components\/([a-zA-Z]+)\/readme.md$/i)[1];
          const examples = [];
          const myPlugin = () => {
      Severity: Minor
      Found in scripts/search/extractExamples.js - About 1 hr to fix

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

        export function disableBodyScroll(targetElement, options) {
            if (isIosDevice) {
                // targetElement must be provided, and disableBodyScroll must not have been
                // called on this targetElement before.
                if (!targetElement) {
        Severity: Minor
        Found in src/libs/scrollController/index.js - About 1 hr to fix

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

              render() {
                  const { label, className, variant, name, numbersMap, tooltip } = this.props;
                  const { stepState, isTooltipVisible } = this.state;
          
                  const shouldRenderNumber =
          Severity: Minor
          Found in src/components/ProgressStep/index.js - About 1 hr to fix

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

            export default function withReduxForm(WrappedComponent) {
                return class extends Component {
                    constructor(props) {
                        super(props);
                        this.fieldRef = React.createRef();
            Severity: Minor
            Found in src/libs/hocs/withReduxForm/index.js - About 1 hr to fix

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

              export default function SignInExample() {
                  return (
                      <div className="rainbow-align-content_center rainbow-flex_column rainbow-sign-in_view-port">
                          <img
                              className="rainbow-m-bottom_x-large rainbow-sign-in_logo"
              Severity: Minor
              Found in examples/create-react-app/src/pages/SignIn/index.js - About 1 hr to fix

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

                export default function DirectionalFooter(props) {
                    const {
                        onBack,
                        onNext,
                        currentStep,
                Severity: Minor
                Found in src/components/ImportRecordsFlow/footer.js - About 1 hr to fix

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

                  export default function File(props) {
                      const { className, style } = props;
                      return (
                          <svg
                              className={className}
                  Severity: Minor
                  Found in src/components/ImportRecordsFlow/icons/file.js - About 1 hr to fix

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

                    export const StyledLink = attachThemeAttrs(styled.a)`
                        color: ${props => props.palette.text.main};
                        text-decoration: underline;
                    
                        :hover {
                    Severity: Major
                    Found in src/components/MarkdownOutput/renderers/styled.js and 5 other locations - About 1 hr to fix
                    library/styleguideComponents/Wrapper/styled.js on lines 8..14
                    library/styleguideComponents/Wrapper/styled.js on lines 16..29
                    library/styleguideComponents/Wrapper/styled.js on lines 100..110
                    src/components/MarkdownOutput/renderers/styled.js on lines 171..180
                    src/components/Table/body/styled/editableCell.js on lines 20..41

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

                    export const StyledTable = attachThemeAttrs(styled.table)`
                        table-layout: fixed;
                        border-collapse: separate;
                        background-color: ${props => props.palette.background.main};
                        border-spacing: 0;
                    Severity: Major
                    Found in src/components/MarkdownOutput/renderers/styled.js and 5 other locations - About 1 hr to fix
                    library/styleguideComponents/Wrapper/styled.js on lines 8..14
                    library/styleguideComponents/Wrapper/styled.js on lines 16..29
                    library/styleguideComponents/Wrapper/styled.js on lines 100..110
                    src/components/MarkdownOutput/renderers/styled.js on lines 66..77
                    src/components/Table/body/styled/editableCell.js on lines 20..41

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

                    export const SpanContainer = attachThemeAttrs(styled.div)`
                        display: flex;
                        flex-direction: row;
                        justify-content: space-between
                        align-items: center;
                    Severity: Major
                    Found in src/components/Table/body/styled/editableCell.js and 5 other locations - About 1 hr to fix
                    library/styleguideComponents/Wrapper/styled.js on lines 8..14
                    library/styleguideComponents/Wrapper/styled.js on lines 16..29
                    library/styleguideComponents/Wrapper/styled.js on lines 100..110
                    src/components/MarkdownOutput/renderers/styled.js on lines 66..77
                    src/components/MarkdownOutput/renderers/styled.js on lines 171..180

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

                    export const StyledColorCircle = attachThemeAttrs(styled.div)`
                        height: 20px;
                        width: 20px;
                        background-color: ${props => props.palette.brand.main};
                        display: inline-block;
                    Severity: Major
                    Found in library/styleguideComponents/Wrapper/styled.js and 5 other locations - About 1 hr to fix
                    library/styleguideComponents/Wrapper/styled.js on lines 8..14
                    library/styleguideComponents/Wrapper/styled.js on lines 16..29
                    src/components/MarkdownOutput/renderers/styled.js on lines 66..77
                    src/components/MarkdownOutput/renderers/styled.js on lines 171..180
                    src/components/Table/body/styled/editableCell.js on lines 20..41

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

                    export const StyledWrapper = attachThemeAttrs(styled.div)`
                        padding: 0;
                        border-radius: 0.875rem;
                        background-color: ${props => props.palette.background.secondary};
                        background-clip: padding-box;
                    Severity: Major
                    Found in library/styleguideComponents/Wrapper/styled.js and 5 other locations - About 1 hr to fix
                    library/styleguideComponents/Wrapper/styled.js on lines 16..29
                    library/styleguideComponents/Wrapper/styled.js on lines 100..110
                    src/components/MarkdownOutput/renderers/styled.js on lines 66..77
                    src/components/MarkdownOutput/renderers/styled.js on lines 171..180
                    src/components/Table/body/styled/editableCell.js on lines 20..41

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

                    export const StyledTopBar = attachThemeAttrs(styled.header)`
                        background-color: ${props => props.palette.background.main};
                        width: 100%;
                        display: flex;
                        justify-content: space-between;
                    Severity: Major
                    Found in library/styleguideComponents/Wrapper/styled.js and 5 other locations - About 1 hr to fix
                    library/styleguideComponents/Wrapper/styled.js on lines 8..14
                    library/styleguideComponents/Wrapper/styled.js on lines 100..110
                    src/components/MarkdownOutput/renderers/styled.js on lines 66..77
                    src/components/MarkdownOutput/renderers/styled.js on lines 171..180
                    src/components/Table/body/styled/editableCell.js on lines 20..41

                    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

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

                    function getNormalizedFieldValue(value, attributeDef) {
                        if (typeof attributeDef === 'function') {
                            return getTypeValue(value, attributeDef);
                        }
                        if (typeof attributeDef.type === 'function') {
                    Severity: Major
                    Found in src/components/ImportRecordsFlow/helpers/getDataToImport.js and 1 other location - About 1 hr to fix
                    src/components/ImportRecordsFlow/helpers/getFieldAssignedPreviewData.js on lines 27..35

                    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

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

                    function getNormalizedFieldValue(value, attributeDef) {
                        if (typeof attributeDef === 'function') {
                            return getTypeValue(value, attributeDef);
                        }
                        if (typeof attributeDef.type === 'function') {
                    src/components/ImportRecordsFlow/helpers/getDataToImport.js on lines 30..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 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

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

                            expect(onRowSelectionMockFn).toHaveBeenCalledWith([
                                {
                                    name: 'Pepe',
                                    email: 'pepe@gmail.com',
                                    id: '1234qwerty',
                    Severity: Major
                    Found in src/components/Table/__test__/table.spec.js and 1 other location - About 1 hr to fix
                    src/components/Table/__test__/table.spec.js on lines 749..765

                    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

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

                            expect(onRowSelectionMockFn).toHaveBeenCalledWith([
                                {
                                    name: 'Pepe',
                                    email: 'pepe@gmail.com',
                                    id: '1234qwerty',
                    Severity: Major
                    Found in src/components/Table/__test__/table.spec.js and 1 other location - About 1 hr to fix
                    src/components/Table/__test__/table.spec.js on lines 863..879

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

                        it('should render the StarBordered when the prop isFilled is false', () => {
                            const component = mount(<Star isFilled={false} />);
                            expect(component.find('StarBordered').exists()).toBe(true);
                        });
                    Severity: Major
                    Found in src/components/Rating/__test__/star.spec.js and 2 other locations - About 1 hr to fix
                    src/components/ImportRecordsFlow/stepTwo/__test__/stepTwo.spec.js on lines 11..14
                    src/components/Table/body/__test__/body.spec.js on lines 36..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 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