bufferapp/ui

View on GitHub

Showing 270 of 333 total issues

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

const SparklesIcon = createIconComponent({
  content: (
    <g>
      <g clipPath="url(#clip0_2722_1828)">
        <path d="M6.589 6.993l-1.13 3.896-1.13-3.896L.514 5.84 4.33 4.685 5.459.79l1.13 3.895 3.814 1.154L6.59 6.993zm5.682 2.597l2.826-1.587-1.554 2.886 1.554 2.885-2.826-1.587-2.825 1.587L11 10.889 9.446 8.003l2.825 1.587zm-5.033 1.582l-1.2 2.164 1.2 2.164-2.119-1.226L3 15.5l1.2-2.164L3 11.172l2.119 1.226 2.119-1.226z" />
Severity: Major
Found in src/components/Icon/Icons/Sparkles.tsx and 4 other locations - About 3 hrs to fix
src/components/Icon/Icons/Hide.tsx on lines 8..21
src/components/Icon/Icons/Shopify.tsx on lines 8..21
src/components/Icon/Icons/Short.tsx on lines 8..21
src/components/Icon/Icons/Story.tsx on lines 8..21

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

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

const StoryIcon = createIconComponent({
  content: (
    <g>
      <g clipPath="url(#clip0_3870_2374)">
        <path d="M13.568 4.056c.302.736.667 1.555.85 2.285.166.648.234 1.317.202 1.985a6.614 6.614 0 01-.392 1.953 6.493 6.493 0 01-.944 1.723c-.4.517-.875.97-1.412 1.343a7.14 7.14 0 01-1.27.715 6.788 6.788 0 01-1.485.464 6.467 6.467 0 01-1.523.107l-.158-.01-.36 1.338.247.02c.65.049 1.304.018 1.946-.093a8.23 8.23 0 002.654-.957 9.48 9.48 0 00.733-.463 7.761 7.761 0 002.87-3.726c.55-1.52.626-3.172.22-4.737-.26-.751-.544-1.744-1.083-2.503-.356-.502-1.4-.204-1.09.556h-.005zm-6.262 1.77a.694.694 0 01.696-.726.698.698 0 01.696.726v1.479h1.478a.698.698 0 01.697.695.695.695 0 01-.697.696h-1.48v1.479a.694.694 0 01-.695.725.697.697 0 01-.696-.725v-1.48H5.82A.697.697 0 015.125 8a.695.695 0 01.696-.695h1.485v-1.48zM3.164 14.37c.462.359.964.665 1.495.912l.22.102.36-1.334-.15-.072a6.436 6.436 0 01-2.04-1.59l-.11-.13-1.197.689.154.186c.375.457.8.871 1.268 1.235v.002zM.074 9.054c.084.585.234 1.16.448 1.71l.085.225 1.196-.69-.057-.16a6.412 6.412 0 01-.362-2.568l.01-.168-1.34-.352-.023.24a7.644 7.644 0 00.043 1.763zm1.02-5.017c-.12.202-.229.405-.328.612L.66 4.87l1.337.358.076-.15a6.108 6.108 0 01.513-.841 8.02 8.02 0 011.067-1.213l.121-.11-.692-1.2-.188.163c-.265.23-.515.475-.75.735a9.45 9.45 0 00-.671.835c-.137.193-.261.39-.381.586l.001.004zM6.58.102a7.091 7.091 0 00-1.327.357l-.227.084.691 1.196.16-.056a5.802 5.802 0 014.022.083.685.685 0 00.937-.65.68.68 0 00-.443-.622A7.093 7.093 0 006.581.102z" />
Severity: Major
Found in src/components/Icon/Icons/Story.tsx and 4 other locations - About 3 hrs to fix
src/components/Icon/Icons/Hide.tsx on lines 8..21
src/components/Icon/Icons/Shopify.tsx on lines 8..21
src/components/Icon/Icons/Short.tsx on lines 8..21
src/components/Icon/Icons/Sparkles.tsx on lines 8..21

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

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 AnalyzeLogo = () => (
  <svg
    width="19"
    height="20"
    viewBox="0 0 17 18"
Severity: Major
Found in src/components/NavBar/NavBarProducts/NavBarProducts.tsx and 1 other location - About 3 hrs to fix
src/components/NavBar/NavBarProducts/NavBarProducts.tsx on lines 69..90

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

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 PublishLogo = () => (
  <svg
    width="17"
    height="16"
    viewBox="0 0 17 16"
Severity: Major
Found in src/components/NavBar/NavBarProducts/NavBarProducts.tsx and 1 other location - About 3 hrs to fix
src/components/NavBar/NavBarProducts/NavBarProducts.tsx on lines 92..113

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

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

          {
            test: /\.(js|mjs)$/,
            exclude: /@babel(?:\/|\\{1,2})runtime/,
            loader: require.resolve('babel-loader'),
            options: {
Severity: Major
Found in scripts/config/webpack.config.prod.js and 1 other location - About 3 hrs to fix
scripts/config/webpack.config.dev.js on lines 245..269

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

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

          {
            test: /\.(js|mjs)$/,
            exclude: /@babel(?:\/|\\{1,2})runtime/,
            loader: require.resolve('babel-loader'),
            options: {
Severity: Major
Found in scripts/config/webpack.config.dev.js and 1 other location - About 3 hrs to fix
scripts/config/webpack.config.prod.js on lines 320..344

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

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 (
          item[searchField].toLowerCase().startsWith(searchValue.toLowerCase())
        ) {
          return {
            ...filtered,
Severity: Major
Found in src/components/Select/Select.tsx and 1 other location - About 2 hrs to fix
src/components/Select/Select.tsx on lines 449..464

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

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 (
          item[searchField].toLowerCase().includes(searchValue.toLowerCase())
        ) {
          return {
            ...filtered,
Severity: Major
Found in src/components/Select/Select.tsx and 1 other location - About 2 hrs to fix
src/components/Select/Select.tsx on lines 433..448

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

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 wrapper = shallow(
      <Select
        // @ts-expect-error TS(2769) FIXME: No overload matches this call.
        onSelectClick={() => true}
        items={[
Severity: Major
Found in src/components/Select/Select.test.tsx and 1 other location - About 2 hrs to fix
src/components/Select/Select.test.tsx on lines 308..329

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

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 wrapper = shallow(
      <Select
        // @ts-expect-error TS(2769) FIXME: No overload matches this call.
        onSelectClick={() => true}
        items={[
Severity: Major
Found in src/components/Select/Select.test.tsx and 1 other location - About 2 hrs to fix
src/components/Select/Select.test.tsx on lines 275..296

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

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

const options = [
  {
    label: 'Facebook',
    icon: <Facebook />,
    value: 'facebook',
src/documentation/examples/SegmentedControl/Interactive/IconPosition.tsx on lines 9..25
src/documentation/examples/SegmentedControl/Size/SizeLarge.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeSmall.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextAndIcon.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextOnly.tsx on lines 7..23

Duplicated Code

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

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

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

Tuning

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

const options = [
  {
    label: 'Facebook',
    icon: <Facebook />,
    value: 'facebook',
src/documentation/examples/SegmentedControl/Interactive/IconPosition.tsx on lines 9..25
src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeSmall.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextAndIcon.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextOnly.tsx on lines 7..23

Duplicated Code

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

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

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

Tuning

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

const options = [
  {
    label: 'Facebook',
    icon: <Facebook />,
    value: 'facebook',
src/documentation/examples/SegmentedControl/Size/SizeLarge.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeSmall.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextAndIcon.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextOnly.tsx on lines 7..23

Duplicated Code

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

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

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

Tuning

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

const options = [
  {
    label: 'Facebook',
    icon: <Facebook />,
    value: 'facebook',
src/documentation/examples/SegmentedControl/Interactive/IconPosition.tsx on lines 9..25
src/documentation/examples/SegmentedControl/Size/SizeLarge.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeSmall.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextOnly.tsx on lines 7..23

Duplicated Code

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

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

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

Tuning

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

const options = [
  {
    label: 'Facebook',
    icon: <Facebook />,
    value: 'facebook',
src/documentation/examples/SegmentedControl/Interactive/IconPosition.tsx on lines 9..25
src/documentation/examples/SegmentedControl/Size/SizeLarge.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeSmall.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextAndIcon.tsx on lines 7..23

Duplicated Code

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

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

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

Tuning

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

const options = [
  {
    label: 'Facebook',
    icon: <Facebook />,
    value: 'facebook',
src/documentation/examples/SegmentedControl/Interactive/IconPosition.tsx on lines 9..25
src/documentation/examples/SegmentedControl/Size/SizeLarge.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextAndIcon.tsx on lines 7..23
src/documentation/examples/SegmentedControl/Type/TypeTextOnly.tsx on lines 7..23

Duplicated Code

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

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

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

Tuning

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

  items: PropTypes.arrayOf(
    PropTypes.shape({
      id: PropTypes.string,
      title: PropTypes.string,
      colors: PropTypes.shape({
Severity: Major
Found in src/components/DropdownMenu/DropdownMenu.tsx and 1 other location - About 2 hrs to fix
src/components/DropdownMenu/PopupMenu/PopupMenu.tsx on lines 284..293

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

  items: PropTypes.arrayOf(
    PropTypes.shape({
      id: PropTypes.string,
      title: PropTypes.string,
      colors: PropTypes.shape({
Severity: Major
Found in src/components/DropdownMenu/PopupMenu/PopupMenu.tsx and 1 other location - About 2 hrs to fix
src/components/DropdownMenu/DropdownMenu.tsx on lines 186..195

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

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

      {
        test: /\.(js|mjs|jsx)$/,
        enforce: 'pre',
        use: [
          {
Severity: Major
Found in scripts/config/webpack.config.prod.js and 1 other location - About 2 hrs to fix
scripts/config/webpack.config.dev.js on lines 180..193

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

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

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

      {
        test: /\.(js|mjs|jsx)$/,
        enforce: 'pre',
        use: [
          {
Severity: Major
Found in scripts/config/webpack.config.dev.js and 1 other location - About 2 hrs to fix
scripts/config/webpack.config.prod.js on lines 254..267

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

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