nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

        terms: [
            { offset: 0, value: 'Cubbon Park' },
            { offset: 13, value: 'Sampangi Rama Nagara' },
            { offset: 35, value: 'Bengaluru' },
            { offset: 46, value: 'Karnataka' },
src/components/GoogleAddressLookup/helpers/__test__/getFormattedValue.spec.js on lines 17..23

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

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

    ${props =>
        props.status === 'success' &&
        `
            border: 1px solid ${props.palette.success.main};
            transition-property: border;
Severity: Major
Found in src/components/StrongPasswordInput/styled/input.js and 1 other location - About 1 hr to fix
src/components/StrongPasswordInput/styled/input.js on lines 68..80

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

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

            <ButtonGroup>
                <Button label="Add" variant="neutral" />
                <Button label="Edit" variant="neutral" />
                <Button label="Paste" variant="neutral" />
            </ButtonGroup>
Severity: Major
Found in examples/create-react-app/src/pages/ButtonGroup/index.js and 1 other location - About 1 hr to fix
examples/create-react-app/src/pages/ButtonGroup/index.js on lines 8..12

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

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

    it('should return true when the element has zero size and content, but overflow style is other than visible', () => {
        const element = {
            offsetWidth: 0,
            offsetHeight: 0,
            innerHTML: 'some content',
Severity: Major
Found in src/libs/manageTab/__test__/isContentHidden.spec.js and 1 other location - About 1 hr to fix
src/libs/manageTab/__test__/isContentHidden.spec.js on lines 27..37

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

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

    handleFocusMinutes() {
        const { minutes } = this.state;
        this.prevMinutes = minutes || this.prevMinutes;
        this.setState({
            inputFocusedIndex: 1,
Severity: Major
Found in src/components/TimePicker/timeSelect.js and 1 other location - About 1 hr to fix
src/components/TimePicker/timeSelect.js on lines 141..148

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

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

    ${props =>
        props.isVisible &&
        props.isFirstInRange &&
        props.isLastDayOfWeek &&
        `
Severity: Major
Found in src/components/Calendar/styled/rangeHighlight.js and 1 other location - About 1 hr to fix
src/components/Calendar/styled/rangeHighlight.js on lines 105..117

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

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

            <g fill="none" fillRule="nonzero">
                <circle cx="9.981" cy="9.981" r="9.981" fill="#01B6F5" />
                <path
                    fill="#02AEEA"
                    d="M19.961 9.98c0 5.49-4.491 9.981-9.98 9.981-3.182 0-5.989-1.435-7.798-3.743 1.684 1.373 3.868 2.184 6.238 2.184 5.49 0 9.98-4.492 9.98-9.98 0-2.371-.81-4.555-2.183-6.239 2.308 1.81 3.743 4.616 3.743 7.798z"
Severity: Major
Found in library/exampleComponents/Icons/addFilled.js and 1 other location - About 1 hr to fix
src/components/ProgressStep/errorIcon.js on lines 15..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 66.

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

    it('should return right', () => {
        const values = ['right', null, undefined, {}, '', 0, 31];
        values.forEach(value => {
            expect(getSlideFrom(value, 'right')).toBe('right');
        });
Severity: Major
Found in src/components/Drawer/helpers/__test__/getSlideFrom.spec.js and 1 other location - About 1 hr to fix
src/components/Drawer/helpers/__test__/getSlideFrom.spec.js on lines 4..9

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

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

    handleFocusHour() {
        const { hour } = this.state;
        this.prevHour = hour || this.prevHour;
        this.setState({
            inputFocusedIndex: 0,
Severity: Major
Found in src/components/TimePicker/timeSelect.js and 1 other location - About 1 hr to fix
src/components/TimePicker/timeSelect.js on lines 199..206

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

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

    it('should set the prop arrowAscendent to true when direction is asc', () => {
        const component = mount(<SortArrowIcon direction="asc" />);
        expect(component.find(StyledSortArrowIcon).prop('arrowAscendent')).toBe(true);
    });
Severity: Major
Found in src/components/Table/head/__test__/sortArrowIcon.spec.js and 1 other location - About 1 hr to fix
src/components/Table/head/__test__/sortArrowIcon.spec.js on lines 11..14

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

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

export default function ButtonMenu(props) {
    const {
        label,
        icon,
        iconPosition,
Severity: Minor
Found in src/components/ButtonMenu/index.js - About 1 hr to fix

    Function Label has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function Label(props) {
        const {
            className,
            label,
            required,
    Severity: Minor
    Found in src/components/Input/label/index.js - About 1 hr to fix

      Function handleSelectRow has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          handleSelectRow(event, isMultiple, rowKeyValue) {
              const { onRowSelection } = this.props;
              const { indexes } = this;
              const { rows } = this.state;
              const maxRowSelection = this.getMaxRowSelection();
      Severity: Minor
      Found in src/components/Table/index.js - About 1 hr to fix

        Function getRowsWithInitalSelectedRows has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function getRowsWithInitalSelectedRows(params = {}) {
            const { rows = [], selectedRows, maxRowSelection, indexes, selectedRowsKeys = {} } = params;
        
            if (Array.isArray(selectedRows) && maxRowSelection > 0) {
                const previousSelectionLength = getCurrentSelectionLength(selectedRowsKeys);

          Function cells has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              const cells = columns.map((column, index) => {
                  const {
                      header,
                      component,
                      field,
          Severity: Minor
          Found in src/components/Table/body/row.js - About 1 hr to fix

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

                render() {
                    const {
                        id,
                        options,
                        required,
            Severity: Minor
            Found in src/components/CheckboxGroup/index.js - About 1 hr to fix

              Function Avatar has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const Avatar = props => {
                  const { className } = props;
                  return (
                      <svg className={className} width="20px" height="20px" viewBox="0 0 20 20" version="1.1">
                          <g id="pages" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
              Severity: Minor
              Found in library/exampleComponents/Icons/avatar.js - About 1 hr to fix

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

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

                  Function FolderClose has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const FolderClose = props => {
                      const { className, style } = props;
                      return (
                          <svg className={className} style={style} width="20px" height="16px" viewBox="0 0 20 16">
                              <g id="components" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
                  Severity: Minor
                  Found in library/exampleComponents/Icons/folderClose.js - About 1 hr to fix

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

                        render() {
                            const { liveUrl, previewUrl } = this.props;
                            const { isVisible } = this.state;
                    
                            return (
                    Severity: Minor
                    Found in library/pages/components/DesignDetails/innerImg.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language