GregBrimble/cf-workers-dashboard

View on GitHub

Showing 91 of 91 total issues

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

                        <svg
                          className={classNames(
                            "h-6 w-6",
                            mobileMenuOpen ? "block" : "hidden"
                          )}
Severity: Major
Found in packages/client/src/pages/Container.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Container.tsx on lines 154..169

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

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

          <h1 className="text-2xl font-bold flex leading-7 text-white sm:text-3xl sm:leading-9 sm:truncate">
            <LazyRender
              loading={loading}
              error={error}
              name="account"
Severity: Major
Found in packages/client/src/components/headings/AccountHeading.tsx and 1 other location - About 1 hr to fix
packages/client/src/pages/Container.tsx on lines 216..224

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

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

                        <div className="mt-1 rounded-md shadow-sm">
                          <input
                            id="key"
                            type="text"
                            className="form-input block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5 font-mono"
Severity: Major
Found in packages/client/src/components/Settings.tsx and 1 other location - About 1 hr to fix
packages/client/src/components/Settings.tsx on lines 185..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 70.

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

                        <div className="mt-1 rounded-md shadow-sm">
                          <input
                            id="email_address"
                            type="email"
                            className="form-input block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5 font-mono"
Severity: Major
Found in packages/client/src/components/Settings.tsx and 1 other location - About 1 hr to fix
packages/client/src/components/Settings.tsx on lines 202..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 70.

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

                      <div className="mt-1 text-sm font-medium leading-none text-gray-400">
                        <LazyRender
                          loading={loading}
                          error={error}
                          name="user"
Severity: Major
Found in packages/client/src/pages/Container.tsx and 1 other location - About 1 hr to fix
packages/client/src/components/headings/AccountHeading.tsx on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

Function handleRequest has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const handleRequest = async (request: Request) => {
  const data = await request.formData();
  const socketID = data.get("socket_id").toString();
  const channelName = data.get("channel_name").toString();

Severity: Minor
Found in packages/server/src/pusher/auth.ts - About 1 hr to fix

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

                          <div className="ml-5 flex-shrink-0">
                            <svg
                              className="h-5 w-5 text-gray-400"
                              fill="currentColor"
                              viewBox="0 0 20 20"
    Severity: Major
    Found in packages/client/src/pages/Accounts.tsx and 1 other location - About 1 hr to fix
    packages/client/src/pages/Workers.tsx on lines 94..106

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

    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

                            <div className="ml-5 flex-shrink-0">
                              <svg
                                className="h-5 w-5 text-gray-400"
                                fill="currentColor"
                                viewBox="0 0 20 20"
    Severity: Major
    Found in packages/client/src/pages/Workers.tsx and 1 other location - About 1 hr to fix
    packages/client/src/pages/Accounts.tsx on lines 60..72

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

    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

      const p25 = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "p25",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 61..68
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const p50 = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "p50",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 61..68
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const max = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "max",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 61..68

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

    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

      const p99 = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "p99",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 61..68
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const p75 = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "p75",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 61..68
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const p999 = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "p999",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const p90 = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "p90",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 13..20
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 61..68
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const min = {
        x: [] as Date[],
        y: [] as number[],
        type: "scatter",
        name: "min",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 7 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 21..28
    packages/client/src/components/workers/Analytics.tsx on lines 29..36
    packages/client/src/components/workers/Analytics.tsx on lines 37..44
    packages/client/src/components/workers/Analytics.tsx on lines 45..52
    packages/client/src/components/workers/Analytics.tsx on lines 53..60
    packages/client/src/components/workers/Analytics.tsx on lines 61..68
    packages/client/src/components/workers/Analytics.tsx on lines 69..76

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

    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

      const subrequests = {
        x: [] as Date[],
        y: [] as number[],
        type: "bar",
        yaxis: "y2",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 2 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 77..86
    packages/client/src/components/workers/Analytics.tsx on lines 87..96

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

    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

      const requests = {
        x: [] as Date[],
        y: [] as number[],
        type: "bar",
        yaxis: "y2",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 2 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 77..86
    packages/client/src/components/workers/Analytics.tsx on lines 97..106

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

    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

      const errors = {
        x: [] as Date[],
        y: [] as number[],
        type: "bar",
        yaxis: "y2",
    Severity: Major
    Found in packages/client/src/components/workers/Analytics.tsx and 2 other locations - About 1 hr to fix
    packages/client/src/components/workers/Analytics.tsx on lines 87..96
    packages/client/src/components/workers/Analytics.tsx on lines 97..106

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

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

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

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

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

    Refactorings

    Further Reading

    Function handleRequest has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const handleRequest = async (request: Request): Promise<Response> => {
      let graphQLRequest: GraphQLRequest;
    
      try {
        switch (request.method.toLowerCase()) {
    Severity: Minor
    Found in packages/server/src/graphql/index.ts - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language