snowplow/snowplow-javascript-tracker

View on GitHub

Showing 352 of 352 total issues

Function Tracker has a Cognitive Complexity of 287 (exceeds 5 allowed). Consider refactoring.
Open

export function Tracker(
  trackerId: string,
  namespace: string,
  version: string,
  endpoint: string,
Severity: Minor
Found in libraries/browser-tracker-core/src/tracker/index.ts - About 5 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function Tracker has 827 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function Tracker(
  trackerId: string,
  namespace: string,
  version: string,
  endpoint: string,
Severity: Major
Found in libraries/browser-tracker-core/src/tracker/index.ts - About 4 days to fix

    Function newTracker has 805 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const newTracker = (
        trackerId: string,
        namespace: string,
        version: string,
        endpoint: string,
    Severity: Major
    Found in libraries/browser-tracker-core/src/tracker/index.ts - About 4 days to fix

      Function OutQueueManager has a Cognitive Complexity of 193 (exceeds 5 allowed). Consider refactoring.
      Open

      export function OutQueueManager(
        id: string,
        sharedSate: SharedState,
        useLocalStorage: boolean,
        eventMethod: string | boolean,
      Severity: Minor
      Found in libraries/browser-tracker-core/src/tracker/out_queue.ts - About 3 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File index.ts has 928 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
        trackerCore,
        buildPagePing,
        buildPageView,
        CommonEventProperties,
      Severity: Major
      Found in libraries/browser-tracker-core/src/tracker/index.ts - About 2 days to fix

        Function OutQueueManager has 408 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function OutQueueManager(
          id: string,
          sharedSate: SharedState,
          useLocalStorage: boolean,
          eventMethod: string | boolean,
        Severity: Major
        Found in libraries/browser-tracker-core/src/tracker/out_queue.ts - About 2 days to fix

          Function OptimizelyPlugin has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
          Open

          export function OptimizelyPlugin(
            summary: boolean = true,
            experiments: boolean = true,
            states: boolean = true,
            variations: boolean = true,
          Severity: Minor
          Found in plugins/browser-plugin-optimizely/src/index.ts - About 1 day to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          File core.ts has 652 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang
           * All rights reserved.
           *
           * Redistribution and use in source and binary forms, with or without
          Severity: Major
          Found in libraries/tracker-core/src/core.ts - About 1 day to fix

            Function InQueueManager has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
            Open

            export function InQueueManager(functionName: string, asyncQueue: Array<unknown>): Queue {
              const windowAlias = window,
                documentAlias = document,
                sharedState: SharedState = createSharedState(),
                availableTrackerIds: Array<string> = [],
            Severity: Minor
            Found in trackers/javascript-tracker/src/in_queue.ts - About 1 day to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner(true)],
            Severity: Major
            Found in plugins/browser-plugin-youtube-tracking/rollup.config.js and 1 other location - About 1 day to fix
            plugins/browser-plugin-media-tracking/rollup.config.js on lines 44..64

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

            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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner(true)],
            Severity: Major
            Found in plugins/browser-plugin-media-tracking/rollup.config.js and 1 other location - About 1 day to fix
            plugins/browser-plugin-youtube-tracking/rollup.config.js on lines 44..64

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-ecommerce/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-client-hints/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-privacy-sandbox/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-debugger/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-performance-timing/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-focalmeter/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-media/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-browser-features/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-ga-cookies/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

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

            export default [
              // CommonJS (for Node) and ES module (for bundlers) build.
              {
                input: './src/index.ts',
                plugins: [...umdPlugins, banner()],
            Severity: Major
            Found in plugins/browser-plugin-ga-cookies/rollup.config.js and 25 other locations - About 1 day to fix
            plugins/browser-plugin-debugger/rollup.config.js on lines 44..67
            plugins/browser-plugin-form-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-geolocation/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely-x/rollup.config.js on lines 44..67
            plugins/browser-plugin-optimizely/rollup.config.js on lines 44..67
            plugins/browser-plugin-ad-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-browser-features/rollup.config.js on lines 44..67
            plugins/browser-plugin-button-click-tracking/rollup.config.js on lines 14..37
            plugins/browser-plugin-client-hints/rollup.config.js on lines 44..67
            plugins/browser-plugin-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-consent/rollup.config.js on lines 44..67
            plugins/browser-plugin-enhanced-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-error-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-event-specifications/rollup.config.js on lines 14..37
            plugins/browser-plugin-focalmeter/rollup.config.js on lines 44..67
            plugins/browser-plugin-link-click-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-media/rollup.config.js on lines 44..67
            plugins/browser-plugin-performance-navigation-timing/rollup.config.js on lines 14..37
            plugins/browser-plugin-performance-timing/rollup.config.js on lines 44..67
            plugins/browser-plugin-privacy-sandbox/rollup.config.js on lines 14..37
            plugins/browser-plugin-site-tracking/rollup.config.js on lines 44..67
            plugins/browser-plugin-snowplow-ecommerce/rollup.config.js on lines 44..67
            plugins/browser-plugin-timezone/rollup.config.js on lines 44..67
            plugins/browser-plugin-web-vitals/rollup.config.js on lines 14..37

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

            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