heyjul3s/artifak

View on GitHub

Showing 15 of 46 total issues

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

  it('returns value of "0rem" when provided with false-like args', () => {
    expect(pxToRem(void 0 as any)).toEqual('0rem');
    expect(pxToRem(null as any)).toEqual('0rem');
    expect(pxToRem(false as any)).toEqual('0rem');
    expect(pxToRem(NaN as any)).toEqual('0rem');
Severity: Major
Found in packages/pxtorem/__tests__/pxtorem.test.ts and 1 other location - About 3 hrs to fix
packages/pxtoem/__tests__/pxtoem.test.ts on lines 8..13

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

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('returns value of "0em" when provided with false-like args', () => {
    expect(pxToEm(void 0 as any)).toEqual('0em');
    expect(pxToEm(null as any)).toEqual('0em');
    expect(pxToEm(false as any)).toEqual('0em');
    expect(pxToEm(NaN as any)).toEqual('0em');
Severity: Major
Found in packages/pxtoem/__tests__/pxtoem.test.ts and 1 other location - About 3 hrs to fix
packages/pxtorem/__tests__/pxtorem.test.ts on lines 4..9

Duplicated Code

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

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

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

Tuning

This issue has a mass of 107.

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

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

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

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

Refactorings

Further Reading

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

export function pxToRem(size: number | string, baseSize = 16): string {
  const pxValue = getPxNumericValue(size);
  return `${pxValue / baseSize}rem`;
}
Severity: Major
Found in packages/pxtorem/src/pxtorem.ts and 1 other location - About 1 hr to fix
packages/pxtoem/src/pxtoem.ts on lines 3..6

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

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

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

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

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

Refactorings

Further Reading

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

export function pxToEm(size: number | string, baseSize = 16): string {
  const pxValue = getPxNumericValue(size);
  return `${pxValue / baseSize}em`;
}
Severity: Major
Found in packages/pxtoem/src/pxtoem.ts and 1 other location - About 1 hr to fix
packages/pxtorem/src/pxtorem.ts on lines 3..6

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

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

    it('returns a string RGB value with valid hex and alpha values', () => {
      expect(hexToRGB('#DF3EA1')).toEqual('rgb(223, 62, 161)');
      expect(hexToRGB('#df3ea1')).toEqual('rgb(223, 62, 161)');
    });
Severity: Major
Found in packages/hextorgb/__tests__/hextorgb.test.ts and 3 other locations - About 50 mins to fix
packages/hextorgb/__tests__/hextorgb.test.ts on lines 37..40
packages/hextorgb/__tests__/hextorgb.test.ts on lines 91..94
packages/hextorgba/__tests__/hextorgba.test.ts on lines 9..12

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 2 locations. Consider refactoring.
Open

    it('returns TRUE with full length hexadecimal color string value', () => {
      expect(isValidHex('#FAFDFC')).toEqual(true);
      expect(isValidHex('#fdfdfd')).toEqual(true);
    });
Severity: Minor
Found in packages/hextorgb/__tests__/hextorgb.test.ts and 1 other location - About 50 mins to fix
packages/hextorgb/__tests__/hextorgb.test.ts on lines 17..20

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

    it('returns TRUE with shorthand hexadecimal color string value', () => {
      expect(isValidHex('#FAF')).toEqual(true);
      expect(isValidHex('#ddd')).toEqual(true);
    });
Severity: Minor
Found in packages/hextorgb/__tests__/hextorgb.test.ts and 1 other location - About 50 mins to fix
packages/hextorgb/__tests__/hextorgb.test.ts on lines 12..15

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 4 locations. Consider refactoring.
Open

  it('returns a string RGBA value with valid hex and default alpha values', () => {
    expect(hexToRGBA('#DF3EA1')).toEqual('rgba(223, 62, 161, 1)');
    expect(hexToRGBA('#df3ea1')).toEqual('rgba(223, 62, 161, 1)');
  });
Severity: Major
Found in packages/hextorgba/__tests__/hextorgba.test.ts and 3 other locations - About 50 mins to fix
packages/hextorgb/__tests__/hextorgb.test.ts on lines 37..40
packages/hextorgb/__tests__/hextorgb.test.ts on lines 86..89
packages/hextorgb/__tests__/hextorgb.test.ts on lines 91..94

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

    it('expands shorthand hexadecimal colour value to full', () => {
      expect(expandShorthandHex('#FFF')).toBe('FFFFFF');
      expect(expandShorthandHex('#fff')).toBe('ffffff');
    });
Severity: Major
Found in packages/hextorgb/__tests__/hextorgb.test.ts and 3 other locations - About 50 mins to fix
packages/hextorgb/__tests__/hextorgb.test.ts on lines 86..89
packages/hextorgb/__tests__/hextorgb.test.ts on lines 91..94
packages/hextorgba/__tests__/hextorgba.test.ts on lines 9..12

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 4 locations. Consider refactoring.
Open

    it('returns a string RGBA value with valid hex and default alpha values', () => {
      expect(hexToRGB('#DF3EA1')).toEqual('rgb(223, 62, 161)');
      expect(hexToRGB('#df3ea1')).toEqual('rgb(223, 62, 161)');
    });
Severity: Major
Found in packages/hextorgb/__tests__/hextorgb.test.ts and 3 other locations - About 50 mins to fix
packages/hextorgb/__tests__/hextorgb.test.ts on lines 37..40
packages/hextorgb/__tests__/hextorgb.test.ts on lines 86..89
packages/hextorgba/__tests__/hextorgba.test.ts on lines 9..12

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

Parsing error: parser.parse is not a function
Open

#!/usr/bin/env node
Severity: Minor
Found in packages/bundler/index.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: parser.parse is not a function
Open

module.exports = {
Severity: Minor
Found in prettier.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: parser.parse is not a function
Open

module.exports = {
Severity: Minor
Found in jest.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: parser.parse is not a function
Open

module.exports = {
Severity: Minor
Found in babel.config.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Parsing error: parser.parse is not a function
Open

import '@testing-library/jest-dom/extend-expect';
Severity: Minor
Found in jest.setup.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Severity
Category
Status
Source
Language