amzn/style-dictionary

View on GitHub

Showing 182 of 182 total issues

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

    describe('name/cti/camel', () => {
      it('should handle prefix', () => {
        expect(transforms["name/cti/camel"].transformer(
          {
            path: ['one','two','three']
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 42..61
__tests__/common/transforms.test.js on lines 63..82
__tests__/common/transforms.test.js on lines 84..103
__tests__/common/transforms.test.js on lines 105..124
__tests__/common/transforms.test.js on lines 126..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 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('name/cti/constant', () => {
      it('should handle prefix', () => {
        expect(transforms["name/cti/constant"].transformer(
          {
            path: ['one','two','three']
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 21..40
__tests__/common/transforms.test.js on lines 42..61
__tests__/common/transforms.test.js on lines 63..82
__tests__/common/transforms.test.js on lines 84..103
__tests__/common/transforms.test.js on lines 126..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 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('name/cti/snake', () => {
      it('should handle prefix', () => {
        expect(transforms["name/cti/snake"].transformer(
          {
            path: ['one','two','three']
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 21..40
__tests__/common/transforms.test.js on lines 42..61
__tests__/common/transforms.test.js on lines 63..82
__tests__/common/transforms.test.js on lines 105..124
__tests__/common/transforms.test.js on lines 126..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 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('name/cti/kebab', () => {
      it('should handle prefix', () => {
        expect(transforms["name/cti/kebab"].transformer(
          {
            path: ['one','two','three']
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 21..40
__tests__/common/transforms.test.js on lines 42..61
__tests__/common/transforms.test.js on lines 84..103
__tests__/common/transforms.test.js on lines 105..124
__tests__/common/transforms.test.js on lines 126..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 122.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('name/ti/constant', () => {
      it('should handle prefix', () => {
        expect(transforms["name/ti/constant"].transformer(
          {
            path: ['one','two','three']
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 21..40
__tests__/common/transforms.test.js on lines 42..61
__tests__/common/transforms.test.js on lines 63..82
__tests__/common/transforms.test.js on lines 84..103
__tests__/common/transforms.test.js on lines 105..124

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('color/rgb', () => {
      it('should handle normal colors', () => {
        var value = transforms["color/rgb"].transformer({
          value: "#aaaaaa"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 296..310
__tests__/common/transforms.test.js on lines 328..342
__tests__/common/transforms.test.js on lines 344..358
__tests__/common/transforms.test.js on lines 406..420
__tests__/common/transforms.test.js on lines 422..436

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('color/hsl-4', () => {
      it('should handle normal colors', () => {
        var value = transforms["color/hsl-4"].transformer({
          value: "#009688"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 296..310
__tests__/common/transforms.test.js on lines 312..326
__tests__/common/transforms.test.js on lines 344..358
__tests__/common/transforms.test.js on lines 406..420
__tests__/common/transforms.test.js on lines 422..436

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('color/css', () => {
      it('should handle normal colors', () => {
        var value = transforms["color/css"].transformer({
          value: "rgb(170, 170, 170)"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 296..310
__tests__/common/transforms.test.js on lines 312..326
__tests__/common/transforms.test.js on lines 328..342
__tests__/common/transforms.test.js on lines 344..358
__tests__/common/transforms.test.js on lines 406..420

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('color/hsl', () => {
      it('should handle normal colors', () => {
        var value = transforms["color/hsl"].transformer({
          value: "#009688"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 296..310
__tests__/common/transforms.test.js on lines 312..326
__tests__/common/transforms.test.js on lines 328..342
__tests__/common/transforms.test.js on lines 406..420
__tests__/common/transforms.test.js on lines 422..436

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('color/hex8android', () => {
      it('should handle colors without alpha', () => {
        var value = transforms["color/hex8android"].transformer({
          value: "#aaaaaa"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 312..326
__tests__/common/transforms.test.js on lines 328..342
__tests__/common/transforms.test.js on lines 344..358
__tests__/common/transforms.test.js on lines 406..420
__tests__/common/transforms.test.js on lines 422..436

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('color/hex8flutter', () => {
      it('should handle colors without alpha', () => {
        var value = transforms["color/hex8flutter"].transformer({
          value: "#aaaaaa"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 4 hrs to fix
__tests__/common/transforms.test.js on lines 296..310
__tests__/common/transforms.test.js on lines 312..326
__tests__/common/transforms.test.js on lines 328..342
__tests__/common/transforms.test.js on lines 344..358
__tests__/common/transforms.test.js on lines 422..436

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('size/px', () => {
      it('should work', () => {
        var value = transforms["size/px"].transformer({
          value: "10"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 487..497
__tests__/common/transforms.test.js on lines 499..509
__tests__/common/transforms.test.js on lines 523..533
__tests__/common/transforms.test.js on lines 535..545
__tests__/common/transforms.test.js on lines 547..557

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('size/remToDp', () => {
      it('should work', () => {
        var value = transforms["size/remToDp"].transformer({
          value: "1"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 487..497
__tests__/common/transforms.test.js on lines 511..521
__tests__/common/transforms.test.js on lines 523..533
__tests__/common/transforms.test.js on lines 535..545
__tests__/common/transforms.test.js on lines 547..557

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('size/remToPx', () => {
      it('should work', () => {
        var value = transforms["size/remToPx"].transformer({
          value: "1"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 487..497
__tests__/common/transforms.test.js on lines 499..509
__tests__/common/transforms.test.js on lines 511..521
__tests__/common/transforms.test.js on lines 523..533
__tests__/common/transforms.test.js on lines 547..557

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('size/remToSp', () => {
      it('should work', () => {
        var value = transforms["size/remToSp"].transformer({
          value: "1"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 499..509
__tests__/common/transforms.test.js on lines 511..521
__tests__/common/transforms.test.js on lines 523..533
__tests__/common/transforms.test.js on lines 535..545
__tests__/common/transforms.test.js on lines 547..557

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('size/rem', () => {
      it('should work', () => {
        var value = transforms["size/rem"].transformer({
          value: "1"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 487..497
__tests__/common/transforms.test.js on lines 499..509
__tests__/common/transforms.test.js on lines 511..521
__tests__/common/transforms.test.js on lines 523..533
__tests__/common/transforms.test.js on lines 535..545

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe('size/remToPt', () => {
      it('should work', () => {
        var value = transforms["size/remToPt"].transformer({
          value: "1"
        });
Severity: Major
Found in __tests__/common/transforms.test.js and 5 other locations - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 487..497
__tests__/common/transforms.test.js on lines 499..509
__tests__/common/transforms.test.js on lines 511..521
__tests__/common/transforms.test.js on lines 535..545
__tests__/common/transforms.test.js on lines 547..557

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

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

var options = {
  transforms: [
    {
      type: 'attribute',
      transformer: function() {
Severity: Major
Found in __tests__/transform/property.test.js and 1 other location - About 3 hrs to fix
__tests__/transform/object.test.js on lines 16..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

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

const options = {
  transforms: [
    {
      type: 'attribute',
      transformer: function() {
Severity: Major
Found in __tests__/transform/object.test.js and 1 other location - About 3 hrs to fix
__tests__/transform/property.test.js on lines 16..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 112.

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 handle hsl colors', () => {
        var value = transforms["color/hex"].transformer({
          value: {
            h: '0',
            s: '0',
Severity: Major
Found in __tests__/common/transforms.test.js and 1 other location - About 3 hrs to fix
__tests__/common/transforms.test.js on lines 237..250

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

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