nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    render() {
        const { isFocused, tabIndex, onFocus, value, onClick } = this.props;

        if (isFocused) {
            return (
Severity: Minor
Found in src/components/TimePicker/ampmSelect.js - About 1 hr to fix

    Function StatsCard has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function StatsCard(props) {
        const { validRecords, invalidRecords, borderRadius } = props;
        const invalidCount = invalidRecords.length;
        const validCount = validRecords.length;
        const totalRecords = invalidCount + validCount;
    Severity: Minor
    Found in src/components/ImportRecordsFlow/stepFour/statsCard.js - About 1 hr to fix

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

          render() {
              const {
                  data,
                  columns,
                  rows,
      Severity: Minor
      Found in src/components/Table/body/index.js - About 1 hr to fix

        Function PhoneSolid has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const PhoneSolid = props => {
            const { className, style } = props;
            return (
                <svg
                    className={className}
        Severity: Minor
        Found in library/exampleComponents/Icons/phoneSolid.js - About 1 hr to fix

          Function Internationalization has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const Internationalization = props => {
              const { className } = props;
              return (
                  <svg
                      className={className}
          Severity: Minor
          Found in library/pages/components/FeatureList/images/internationalization.js - About 1 hr to fix

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

                it('should open the DateTimePicker when click on the label element', async () => {
                    const picker = new PageDateTimePicker(DATETIMEPICKER);
                    await picker.clickLabel();
                    await picker.waitUntilOpen();
                    await expect(await picker.isOpen()).toBe(true);
            Severity: Major
            Found in integration/specs/DateTimePicker/datetimepicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
            integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
            integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
            integration/specs/TimePicker/timePicker-1.spec.js on lines 31..36
            integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

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

                it('should focus the hour input by default when the time selector is open', async () => {
                    const timePicker = new PageTimePicker(TIME_PICKER);
                    await timePicker.clickTimeInput();
                    await timePicker.waitUntilOpen();
                    await expect(await timePicker.hasFocusHourInput()).toBe(true);
            Severity: Major
            Found in integration/specs/TimePicker/timePicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
            integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
            integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
            integration/specs/TimePicker/timePicker-1.spec.js 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 74.

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

                it('should open the time selector when click on TimePicker component', async () => {
                    const timePicker = new PageTimePicker(TIME_PICKER);
                    await timePicker.clickTimeInput();
                    await timePicker.waitUntilOpen();
                    await expect(await timePicker.isOpen()).toBe(true);
            Severity: Major
            Found in integration/specs/TimePicker/timePicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
            integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
            integration/specs/TimePicker/timePicker-1.spec.js on lines 31..36
            integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

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

                it('should open the DateTimePicker when click on input element', async () => {
                    const picker = new PageDateTimePicker(DATETIMEPICKER);
                    await picker.click();
                    await picker.waitUntilOpen();
                    await expect(await picker.isOpen()).toBe(true);
            Severity: Major
            Found in integration/specs/DateTimePicker/datetimepicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
            integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
            integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
            integration/specs/TimePicker/timePicker-1.spec.js on lines 31..36
            integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

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

                it('should open the DatePicker when click on the input element', async () => {
                    const datePicker = new PageDatePicker(DATEPICKER);
                    await datePicker.click();
                    await datePicker.waitUntilOpen();
                    await expect(await datePicker.isOpen()).toBe(true);
            Severity: Major
            Found in integration/specs/DatePicker/datepicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
            integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
            integration/specs/TimePicker/timePicker-1.spec.js on lines 31..36
            integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

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

                it('should open the time selector when click on the label of the TimePicker component', async () => {
                    const timePicker = new PageTimePicker(TIME_PICKER);
                    await timePicker.clickLabel();
                    await timePicker.waitUntilOpen();
                    await expect(await timePicker.isOpen()).toBe(true);
            Severity: Major
            Found in integration/specs/TimePicker/timePicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
            integration/specs/DatePicker/datepicker-1.spec.js on lines 28..33
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
            integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
            integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

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

                it('should open the DatePicker when click on the label element', async () => {
                    const datePicker = new PageDatePicker(DATEPICKER);
                    await datePicker.clickLabel();
                    await datePicker.waitUntilOpen();
                    await expect(await datePicker.isOpen()).toBe(true);
            Severity: Major
            Found in integration/specs/DatePicker/datepicker-1.spec.js and 6 other locations - About 1 hr to fix
            integration/specs/DatePicker/datepicker-1.spec.js on lines 22..27
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 14..19
            integration/specs/DateTimePicker/datetimepicker-1.spec.js on lines 20..25
            integration/specs/TimePicker/timePicker-1.spec.js on lines 25..30
            integration/specs/TimePicker/timePicker-1.spec.js on lines 31..36
            integration/specs/TimePicker/timePicker-1.spec.js on lines 91..96

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

            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

                        <VerticalNavigation onSelect={onSelectMockFn}>
                            <VerticalSection label="header section">
                                <VerticalItem name="item 1" label="item 1" />
                                <VerticalItem name="item 2" label="item 2" />
                                <VerticalItem name="item 3" label="item 3" />
            library/exampleComponents/Icons/coin.js on lines 7..29

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

            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

                            <Label
                                label={label}
                                labelAlignment={labelAlignment}
                                hideLabel={hideLabel}
                                required={required}
            Severity: Major
            Found in src/components/Input/inputBase/index.js and 1 other location - About 1 hr to fix
            src/components/Input/pickerInput/index.js on lines 119..128

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

            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

            function Header({ code }) {
                return (
                    <div className="react-rainbow-editor-header">
                        <img
                            src={windowsActionsSvg}
            Severity: Major
            Found in library/styleguideComponents/Editor/header.js and 1 other location - About 1 hr to fix
            library/pages/components/CodeEditor/header.js on lines 8..15

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

            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 default function Header({ code }) {
                return (
                    <div className="react-rainbow-code-editor-header">
                        <img src={windowsActionsSvg} alt="widnows actions img" className="rainbow-m-left_x-small" />
                        <CopyToClipboard text={code} />
            Severity: Major
            Found in library/pages/components/CodeEditor/header.js and 1 other location - About 1 hr to fix
            library/styleguideComponents/Editor/header.js on lines 8..19

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

            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

                            <Label
                                label={label}
                                labelAlignment={labelAlignment}
                                hideLabel={hideLabel}
                                required={required}
            Severity: Major
            Found in src/components/Input/pickerInput/index.js and 1 other location - About 1 hr to fix
            src/components/Input/inputBase/index.js on lines 136..145

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

            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

                    <svg
                        className={className}
                        style={style}
                        width="16"
                        height="16"
            Severity: Major
            Found in library/exampleComponents/Icons/coin.js and 1 other location - About 1 hr to fix
            src/components/VerticalNavigation/__test__/verticalNavigation.spec.js on lines 24..30

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

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

                render() {
                    const { selectedItem } = this.state;
                    return (
                        <Application theme={theme}>
                            <ReactTypeformEmbed
            Severity: Minor
            Found in library/styleguideComponents/ComponentsList/index.js - About 1 hr to fix

              Function UserFirstPost has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function UserFirstPost(props) {
                  const { className, style } = props;
                  return (
                      <svg
                          className={className}
              Severity: Minor
              Found in library/exampleComponents/Icons/userFirstPost.js - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language