react-scheduler/react-big-schedule

View on GitHub

Showing 504 of 504 total issues

Function _getSpan has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _getSpan(startTime, endTime, headers) {
    if (this.showAgenda) return 1;

    // function startOfWeek(date) {
    //   const day = date.getDay();
Severity: Major
Found in src/components/SchedulerData.js - About 2 hrs to fix

    Scheduler has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Scheduler extends Component {
      constructor(props) {
        super(props);
    
        const { schedulerData, dndSources, parentRef } = props;
    Severity: Minor
    Found in src/components/index.jsx - About 2 hrs to fix

      Function _createHeaders has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        _createHeaders() {
          const headers = [];
          let start = this.localeDayjs(new Date(this.startDate));
          let end = this.localeDayjs(new Date(this.endDate));
          let header = start;
      Severity: Major
      Found in src/components/SchedulerData.js - About 2 hrs to fix

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

          addResource(resource) {
            const existedResources = this.resources.filter(x => x.id === resource.id);
            if (existedResources.length === 0) {
              this.resources.push(resource);
              this._createRenderData();
        Severity: Major
        Found in src/components/SchedulerData.js and 1 other location - About 2 hrs to fix
        src/components/SchedulerData.js on lines 99..105

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

        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

          addEventGroup(eventGroup) {
            const existedEventGroups = this.eventGroups.filter(x => x.id === eventGroup.id);
            if (existedEventGroups.length === 0) {
              this.eventGroups.push(eventGroup);
              this._createRenderData();
        Severity: Major
        Found in src/components/SchedulerData.js and 1 other location - About 2 hrs to fix
        src/components/SchedulerData.js on lines 91..97

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

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

          _handleRecurringEvents() {
            const recurringEvents = this.events.filter(x => !!x.rrule);
            recurringEvents.forEach(item => {
              this._detachEvent(item);
            });
        Severity: Major
        Found in src/components/SchedulerData.js - About 2 hrs to fix

          Function setViewType has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            setViewType(viewType = ViewType.Week, showAgenda = false, isEventPerspective = false) {
              this.showAgenda = showAgenda;
              this.isEventPerspective = isEventPerspective;
              this.cellUnit = CellUnit.Day;
          
          
          Severity: Major
          Found in src/components/SchedulerData.js - About 2 hrs to fix

            Function endDrag has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                endDrag: (props, monitor) => {
                  if (!monitor.didDrop()) return;
            
                  const { moveEvent, newEvent, schedulerData } = props;
                  const { events, config, viewType, localeDayjs } = schedulerData;
            Severity: Major
            Found in src/components/DnDSource.js - About 2 hrs to fix

              Function render has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                render() {
                  const { schedulerData, leftCustomHeader, rightCustomHeader } = this.props;
                  const { viewType, renderData, showAgenda, config } = schedulerData;
                  const width = schedulerData.getSchedulerWidth();
              
              
              Severity: Minor
              Found in src/components/index.jsx - About 2 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

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

                  } else if (this.cellUnit === CellUnit.Year) {
                    while (header >= start && header <= end) {
                      const time = header.format(DATE_FORMAT);
                      headers.push({ time });
                      header = header.add(1, 'years').startOf('year');
              Severity: Major
              Found in src/components/SchedulerData.js and 2 other locations - About 2 hrs to fix
              src/components/SchedulerData.js on lines 709..727
              src/components/SchedulerData.js on lines 715..727

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

              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

                  } else if (this.cellUnit === CellUnit.Week) {
                    while (header >= start && header <= end) {
                      const time = header.format(DATE_FORMAT);
                      headers.push({ time });
                      header = header.add(1, 'weeks').startOf('week');
              Severity: Major
              Found in src/components/SchedulerData.js and 2 other locations - About 2 hrs to fix
              src/components/SchedulerData.js on lines 715..727
              src/components/SchedulerData.js on lines 721..727

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

              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

                  } else if (this.cellUnit === CellUnit.Month) {
                    while (header >= start && header <= end) {
                      const time = header.format(DATE_FORMAT);
                      headers.push({ time });
                      header = header.add(1, 'months').startOf('month');
              Severity: Major
              Found in src/components/SchedulerData.js and 2 other locations - About 2 hrs to fix
              src/components/SchedulerData.js on lines 709..727
              src/components/SchedulerData.js on lines 721..727

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

              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

                onSchedulerHeadScroll = (proxy, event) => {
                  if ((this.currentArea === 2 || this.currentArea === -1) && this.schedulerContent.scrollLeft !== this.schedulerHead.scrollLeft) {
                    this.schedulerContent.scrollLeft = this.schedulerHead.scrollLeft;
                  }
                };
              Severity: Major
              Found in src/components/index.jsx and 1 other location - About 2 hrs to fix
              src/components/index.jsx on lines 372..376

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

              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

                  if (this.schedulerResource) {
                    if ((this.currentArea === 1 || this.currentArea === -1) && this.schedulerContent.scrollTop !== this.schedulerResource.scrollTop) {
                      this.schedulerContent.scrollTop = this.schedulerResource.scrollTop;
                    }
                  }
              Severity: Major
              Found in src/components/index.jsx and 1 other location - About 2 hrs to fix
              src/components/index.jsx on lines 353..357

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

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

                updateEventStart = (schedulerData, event, newStart) => {
                  if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
                    schedulerData.updateEventStart(event, newStart);
                  }
                  this.setState({
              Severity: Major
              Found in src/examples/Basic.jsx and 13 other locations - About 2 hrs to fix
              src/examples/AddMore.jsx on lines 141..148
              src/examples/AddMore.jsx on lines 150..157
              src/examples/AddResource.jsx on lines 123..128
              src/examples/AddResource.jsx on lines 130..135
              src/examples/Basic.jsx on lines 134..141
              src/examples/CustomEventStyle.jsx on lines 119..126
              src/examples/CustomEventStyle.jsx on lines 128..135
              src/examples/CustomHeader.jsx on lines 125..132
              src/examples/CustomHeader.jsx on lines 134..141
              src/examples/CustomPopoverStyle.jsx on lines 113..120
              src/examples/CustomPopoverStyle.jsx on lines 122..129
              src/examples/OverlapCheck.jsx on lines 101..108
              src/examples/OverlapCheck.jsx on lines 110..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 78.

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

                updateEventStart = (schedulerData, event, newStart) => {
                  if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
                    schedulerData.updateEventStart(event, newStart);
                  }
                  this.setState({ viewModel: schedulerData });
              Severity: Major
              Found in src/examples/AddResource.jsx and 13 other locations - About 2 hrs to fix
              src/examples/AddMore.jsx on lines 141..148
              src/examples/AddMore.jsx on lines 150..157
              src/examples/AddResource.jsx on lines 130..135
              src/examples/Basic.jsx on lines 125..132
              src/examples/Basic.jsx on lines 134..141
              src/examples/CustomEventStyle.jsx on lines 119..126
              src/examples/CustomEventStyle.jsx on lines 128..135
              src/examples/CustomHeader.jsx on lines 125..132
              src/examples/CustomHeader.jsx on lines 134..141
              src/examples/CustomPopoverStyle.jsx on lines 113..120
              src/examples/CustomPopoverStyle.jsx on lines 122..129
              src/examples/OverlapCheck.jsx on lines 101..108
              src/examples/OverlapCheck.jsx on lines 110..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 78.

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

                updateEventEnd = (schedulerData, event, newEnd) => {
                  if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
                    schedulerData.updateEventEnd(event, newEnd);
                  }
                  this.setState({ viewModel: schedulerData });
              Severity: Major
              Found in src/examples/AddResource.jsx and 13 other locations - About 2 hrs to fix
              src/examples/AddMore.jsx on lines 141..148
              src/examples/AddMore.jsx on lines 150..157
              src/examples/AddResource.jsx on lines 123..128
              src/examples/Basic.jsx on lines 125..132
              src/examples/Basic.jsx on lines 134..141
              src/examples/CustomEventStyle.jsx on lines 119..126
              src/examples/CustomEventStyle.jsx on lines 128..135
              src/examples/CustomHeader.jsx on lines 125..132
              src/examples/CustomHeader.jsx on lines 134..141
              src/examples/CustomPopoverStyle.jsx on lines 113..120
              src/examples/CustomPopoverStyle.jsx on lines 122..129
              src/examples/OverlapCheck.jsx on lines 101..108
              src/examples/OverlapCheck.jsx on lines 110..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 78.

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

                updateEventStart = (schedulerData, event, newStart) => {
                  if (confirm(`Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`)) {
                    schedulerData.updateEventStart(event, newStart);
                  }
                  this.setState({
              Severity: Major
              Found in src/examples/CustomPopoverStyle.jsx and 13 other locations - About 2 hrs to fix
              src/examples/AddMore.jsx on lines 141..148
              src/examples/AddMore.jsx on lines 150..157
              src/examples/AddResource.jsx on lines 123..128
              src/examples/AddResource.jsx on lines 130..135
              src/examples/Basic.jsx on lines 125..132
              src/examples/Basic.jsx on lines 134..141
              src/examples/CustomEventStyle.jsx on lines 119..126
              src/examples/CustomEventStyle.jsx on lines 128..135
              src/examples/CustomHeader.jsx on lines 125..132
              src/examples/CustomHeader.jsx on lines 134..141
              src/examples/CustomPopoverStyle.jsx on lines 122..129
              src/examples/OverlapCheck.jsx on lines 101..108
              src/examples/OverlapCheck.jsx on lines 110..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 78.

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

                updateEventEnd = (schedulerData, event, newEnd) => {
                  if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
                    schedulerData.updateEventEnd(event, newEnd);
                  }
                  this.setState({
              Severity: Major
              Found in src/examples/CustomPopoverStyle.jsx and 13 other locations - About 2 hrs to fix
              src/examples/AddMore.jsx on lines 141..148
              src/examples/AddMore.jsx on lines 150..157
              src/examples/AddResource.jsx on lines 123..128
              src/examples/AddResource.jsx on lines 130..135
              src/examples/Basic.jsx on lines 125..132
              src/examples/Basic.jsx on lines 134..141
              src/examples/CustomEventStyle.jsx on lines 119..126
              src/examples/CustomEventStyle.jsx on lines 128..135
              src/examples/CustomHeader.jsx on lines 125..132
              src/examples/CustomHeader.jsx on lines 134..141
              src/examples/CustomPopoverStyle.jsx on lines 113..120
              src/examples/OverlapCheck.jsx on lines 101..108
              src/examples/OverlapCheck.jsx on lines 110..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 78.

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

                updateEventEnd = (schedulerData, event, newEnd) => {
                  if (confirm(`Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`)) {
                    schedulerData.updateEventEnd(event, newEnd);
                  }
                  this.setState({
              Severity: Major
              Found in src/examples/OverlapCheck.jsx and 13 other locations - About 2 hrs to fix
              src/examples/AddMore.jsx on lines 141..148
              src/examples/AddMore.jsx on lines 150..157
              src/examples/AddResource.jsx on lines 123..128
              src/examples/AddResource.jsx on lines 130..135
              src/examples/Basic.jsx on lines 125..132
              src/examples/Basic.jsx on lines 134..141
              src/examples/CustomEventStyle.jsx on lines 119..126
              src/examples/CustomEventStyle.jsx on lines 128..135
              src/examples/CustomHeader.jsx on lines 125..132
              src/examples/CustomHeader.jsx on lines 134..141
              src/examples/CustomPopoverStyle.jsx on lines 113..120
              src/examples/CustomPopoverStyle.jsx on lines 122..129
              src/examples/OverlapCheck.jsx on lines 101..108

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

              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