KennethanCeyer/pg-calendar

View on GitHub

Showing 72 of 72 total issues

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

                        if (local.current[0] !== null) {
                          dateValues.push(local.current[0].format(context.settings.format));
                        }
Severity: Major
Found in src/js/methods/init.js and 3 other locations - About 55 mins to fix
src/js/methods/init.js on lines 347..349
src/js/methods/init.js on lines 351..353
src/js/methods/init.js on lines 631..633

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

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

    it('the prev month of `2017-01-02` must be `12`', () => {
      const date = '2017-01-02';
      const dateManager = new DateManager(date);
      expect(dateManager.prevMonth).to.equal(12);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 102..106
src/js/manager/index.spec.js on lines 108..112
src/js/manager/index.spec.js on lines 114..118
src/js/manager/index.spec.js on lines 120..124
src/js/manager/index.spec.js on lines 126..130
src/js/manager/index.spec.js on lines 132..136
src/js/manager/index.spec.js on lines 144..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 54.

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

                        if (local.current[1] !== null) {
                          dateValues.push(local.current[1].format(context.settings.format));
                        }
Severity: Major
Found in src/js/methods/init.js and 3 other locations - About 55 mins to fix
src/js/methods/init.js on lines 347..349
src/js/methods/init.js on lines 351..353
src/js/methods/init.js on lines 627..629

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

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

    it('the year of `2017-01-02` must be `2017`', () => {
      const date = '2017-01-02';
      const dateManager = new DateManager(date);
      expect(dateManager.year).to.equal(2017);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 108..112
src/js/manager/index.spec.js on lines 114..118
src/js/manager/index.spec.js on lines 120..124
src/js/manager/index.spec.js on lines 126..130
src/js/manager/index.spec.js on lines 132..136
src/js/manager/index.spec.js on lines 138..142
src/js/manager/index.spec.js on lines 144..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 54.

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

    it('the last day of `2017-01-02` must be `31`', () => {
      const date = '2017-01-02';
      const dateManager = new DateManager(date);
      expect(dateManager.lastDay).to.equal(31);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 102..106
src/js/manager/index.spec.js on lines 108..112
src/js/manager/index.spec.js on lines 114..118
src/js/manager/index.spec.js on lines 120..124
src/js/manager/index.spec.js on lines 132..136
src/js/manager/index.spec.js on lines 138..142
src/js/manager/index.spec.js on lines 144..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 54.

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

    it('the first day of `1483315200000` must be `1`', () => {
      const date = 1483315200000;
      const dateManager = new DateManager(date);
      expect(dateManager.firstDay).to.equal(1);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 170..174
src/js/manager/index.spec.js on lines 176..180
src/js/manager/index.spec.js on lines 182..186
src/js/manager/index.spec.js on lines 194..198
src/js/manager/index.spec.js on lines 200..204
src/js/manager/index.spec.js on lines 206..210
src/js/manager/index.spec.js on lines 212..216

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

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

    it('the month of `2017-01-02` must be `1`', () => {
      const date = '2017-01-02';
      const dateManager = new DateManager(date);
      expect(dateManager.month).to.equal(1);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 102..106
src/js/manager/index.spec.js on lines 114..118
src/js/manager/index.spec.js on lines 120..124
src/js/manager/index.spec.js on lines 126..130
src/js/manager/index.spec.js on lines 132..136
src/js/manager/index.spec.js on lines 138..142
src/js/manager/index.spec.js on lines 144..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 54.

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

    it('the last day of `1483315200000` must be `31`', () => {
      const date = 1483315200000;
      const dateManager = new DateManager(date);
      expect(dateManager.lastDay).to.equal(31);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 170..174
src/js/manager/index.spec.js on lines 176..180
src/js/manager/index.spec.js on lines 182..186
src/js/manager/index.spec.js on lines 188..192
src/js/manager/index.spec.js on lines 200..204
src/js/manager/index.spec.js on lines 206..210
src/js/manager/index.spec.js on lines 212..216

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

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

    it('the day of `2017-01-02` must be `2`', () => {
      const date = '2017-01-02';
      const dateManager = new DateManager(date);
      expect(dateManager.day).to.equal(2);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 102..106
src/js/manager/index.spec.js on lines 108..112
src/js/manager/index.spec.js on lines 120..124
src/js/manager/index.spec.js on lines 126..130
src/js/manager/index.spec.js on lines 132..136
src/js/manager/index.spec.js on lines 138..142
src/js/manager/index.spec.js on lines 144..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 54.

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

    it('the next month of `1483315200000` must be `2`', () => {
      const date = 1483315200000;
      const dateManager = new DateManager(date);
      expect(dateManager.nextMonth).to.equal(2);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 170..174
src/js/manager/index.spec.js on lines 176..180
src/js/manager/index.spec.js on lines 182..186
src/js/manager/index.spec.js on lines 188..192
src/js/manager/index.spec.js on lines 194..198
src/js/manager/index.spec.js on lines 200..204
src/js/manager/index.spec.js on lines 206..210

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

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

    it('the day of `1483315200000` must be `2`', () => {
      const date = 1483315200000;
      const dateManager = new DateManager(date);
      expect(dateManager.day).to.equal(2);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 170..174
src/js/manager/index.spec.js on lines 176..180
src/js/manager/index.spec.js on lines 188..192
src/js/manager/index.spec.js on lines 194..198
src/js/manager/index.spec.js on lines 200..204
src/js/manager/index.spec.js on lines 206..210
src/js/manager/index.spec.js on lines 212..216

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

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

    it('the next month of `2017-01-02` must be `2`', () => {
      const date = '2017-01-02';
      const dateManager = new DateManager(date);
      expect(dateManager.nextMonth).to.equal(2);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 102..106
src/js/manager/index.spec.js on lines 108..112
src/js/manager/index.spec.js on lines 114..118
src/js/manager/index.spec.js on lines 120..124
src/js/manager/index.spec.js on lines 126..130
src/js/manager/index.spec.js on lines 132..136
src/js/manager/index.spec.js on lines 138..142

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

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

    it('the month of `1483315200000` must be `1`', () => {
      const date = 1483315200000;
      const dateManager = new DateManager(date);
      expect(dateManager.month).to.equal(1);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 170..174
src/js/manager/index.spec.js on lines 182..186
src/js/manager/index.spec.js on lines 188..192
src/js/manager/index.spec.js on lines 194..198
src/js/manager/index.spec.js on lines 200..204
src/js/manager/index.spec.js on lines 206..210
src/js/manager/index.spec.js on lines 212..216

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

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

    it('the week day of `1483315200000` must be `1`', () => {
      const date = 1483315200000;
      const dateManager = new DateManager(date);
      expect(dateManager.weekDay).to.equal(1);
    });
Severity: Major
Found in src/js/manager/index.spec.js and 7 other locations - About 55 mins to fix
src/js/manager/index.spec.js on lines 170..174
src/js/manager/index.spec.js on lines 176..180
src/js/manager/index.spec.js on lines 182..186
src/js/manager/index.spec.js on lines 188..192
src/js/manager/index.spec.js on lines 194..198
src/js/manager/index.spec.js on lines 206..210
src/js/manager/index.spec.js on lines 212..216

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

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

                if (local.current[0] !== null) {
                  dateValues.push(local.current[0].format(context.settings.format));
                }
Severity: Major
Found in src/js/methods/init.js and 3 other locations - About 55 mins to fix
src/js/methods/init.js on lines 351..353
src/js/methods/init.js on lines 627..629
src/js/methods/init.js on lines 631..633

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

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

                      local.calendar.find('.' + activeClass + '.' + activePositionClasses[position]).removeClass(activeClass).removeClass(activePositionClasses[position]);
Severity: Major
Found in src/js/methods/init.js and 2 other locations - About 50 mins to fix
src/js/methods/init.js on lines 560..560
src/js/methods/init.js on lines 571..571

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

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

                          local.calendar.find('.' + activeClass + '.' + activePositionClasses[j]).removeClass(activeClass).removeClass(activePositionClasses[j]);
Severity: Major
Found in src/js/methods/init.js and 2 other locations - About 50 mins to fix
src/js/methods/init.js on lines 571..571
src/js/methods/init.js on lines 591..591

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

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

                          local.calendar.find('.' + activeClass + '.' + activePositionClasses[j]).removeClass(activeClass).removeClass(activePositionClasses[j]);
Severity: Major
Found in src/js/methods/init.js and 2 other locations - About 50 mins to fix
src/js/methods/init.js on lines 560..560
src/js/methods/init.js on lines 591..591

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

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

Avoid deeply nested control flow statements.
Open

              if ((currentFormat[0] && iDateFormat === currentFormat[0])) {
                $unit.addClass(activeClass).addClass(activePositionClasses[0]);
              }
Severity: Major
Found in src/js/methods/init.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if ((currentFormat[1] && iDateFormat === currentFormat[1])) {
                    $unit.addClass(activeClass).addClass(activePositionClasses[1]);
                  }
    Severity: Major
    Found in src/js/methods/init.js - About 45 mins to fix
      Severity
      Category
      Status
      Source
      Language