rofrischmann/fela

View on GitHub

Showing 412 of 412 total issues

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

describe('Creating Snapshots with Fela', () => {
  it('should return formatted html and css', () => {
    const style = {
      display: 'flex',
      flex: '1 0 auto',
Severity: Major
Found in packages/jest-react-fela/src/__tests__/createSnapshot-test.js and 1 other location - About 2 days to fix
packages/jest-react-fela/src/__tests__/createSnapshot-node-test.js on lines 12..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 363.

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

describe('Creating Snapshots with Fela', () => {
  it('should return formatted html and css', () => {
    const style = {
      display: 'flex',
      flex: '1 0 auto',
packages/jest-react-fela/src/__tests__/createSnapshot-test.js on lines 9..65

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

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 createComponentFactory has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
Open

export default function createComponentFactory(
  createElement,
  RendererContext,
  FelaTheme,
  withProxy = false,
Severity: Minor
Found in packages/fela-bindings/src/createComponentFactory.js - 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

Function createRenderer has 294 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function createRenderer(config = {}) {
  let renderer = {
    listeners: [],
    keyframePrefixes: config.keyframePrefixes || ['-webkit-', '-moz-'],
    plugins: config.plugins || [],
Severity: Major
Found in packages/fela/src/createRenderer.js - About 1 day to fix

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

    export default class Input extends Component {
      constructor(props, context) {
        super(props, context)
        this.state = { size: 50 }
        this.setSize = this.setSize.bind(this)
    Severity: Major
    Found in examples/example-preact/containers/Input.js and 1 other location - About 1 day to fix
    examples/example-react/containers/Input.js on lines 6..29

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

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

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

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

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

    Refactorings

    Further Reading

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

    export default class Input extends Component {
      constructor(props, context) {
        super(props, context)
        this.state = { size: 50 }
        this.setSize = this.setSize.bind(this)
    Severity: Major
    Found in examples/example-react/containers/Input.js and 1 other location - About 1 day to fix
    examples/example-preact/containers/Input.js on lines 6..29

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

    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

    File DocLayout.js has 540 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React, { useState, useEffect, useLayoutEffect, useRef } from 'react'
    import Head from 'next/head'
    import NextLink from 'next/link'
    import { useRouter } from 'next/router'
    import { useFela } from 'react-fela'
    Severity: Major
    Found in website/components/DocLayout.js - About 1 day to fix

      Function Page has 198 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function Page() {
        const { theme } = useFela()
      
        return (
          <main id="main" role="main" aria-label="Main content">
      Severity: Major
      Found in website/pages/index.js - About 7 hrs to fix

        Function createRenderer has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

        export default function createRenderer(config = {}) {
          let renderer = {
            listeners: [],
            keyframePrefixes: config.keyframePrefixes || ['-webkit-', '-moz-'],
            plugins: config.plugins || [],
        Severity: Minor
        Found in packages/fela/src/createRenderer.js - About 7 hrs 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

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

          it('should return the correct format', () => {
            expect(getFontFormat('foo.ttf')).toEqual('truetype')
            expect(getFontFormat('foo.eot')).toEqual('embedded-opentype')
            expect(getFontFormat('foo.woff')).toEqual('woff')
            expect(getFontFormat('foo.woff2')).toEqual('woff2')
        Severity: Major
        Found in packages/fela/src/__tests__/getFontFormat-test.js and 1 other location - About 6 hrs to fix
        packages/fela/src/__tests__/getFontFormat-test.js on lines 26..35

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

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

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

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

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

        Refactorings

        Further Reading

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

          it('should return the correct format for fonts with queries', () => {
            expect(getFontFormat('foo.woff2?somequery')).toEqual('woff2')
            expect(getFontFormat('foo.woff2?someq?uery')).toEqual('woff2')
            expect(getFontFormat('foo.woff?someq?uery')).toEqual('woff')
            expect(getFontFormat('foo.ttf?somequery')).toEqual('truetype')
        Severity: Major
        Found in packages/fela/src/__tests__/getFontFormat-test.js and 1 other location - About 6 hrs to fix
        packages/fela/src/__tests__/getFontFormat-test.js on lines 4..17

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

        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 Dot = ({ size, x, y, children, color }) => (
          <div
            className={css(styles.root, {
              borderBottomColor: color,
              borderRightWidth: `${size / 2}px`,
        Severity: Major
        Found in benchmarks/src/implementations/glamor/Dot.js and 1 other location - About 6 hrs to fix
        benchmarks/src/implementations/emotion/Dot.js on lines 5..17

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

        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 Dot = ({ size, x, y, children, color }) => (
          <div
            className={css(styles.root, {
              borderBottomColor: color,
              borderRightWidth: `${size / 2}px`,
        Severity: Major
        Found in benchmarks/src/implementations/emotion/Dot.js and 1 other location - About 6 hrs to fix
        benchmarks/src/implementations/glamor/Dot.js on lines 5..18

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

        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

        app.get('/', (req, res) => {
          const renderer = createRenderer()
        
          const indexHTML = fs.readFileSync(`${__dirname}/index.html`).toString()
          const appHtml = renderToString(
        Severity: Major
        Found in examples/example-react/server.js and 1 other location - About 5 hrs to fix
        examples/example-preact/server.js on lines 18..35

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

        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

        app.get('/', (req, res) => {
          const renderer = createRenderer()
        
          const indexHTML = fs.readFileSync(`${__dirname}/index.html`).toString()
          const appHtml = render(
        Severity: Major
        Found in examples/example-preact/server.js and 1 other location - About 5 hrs to fix
        examples/example-react/server.js on lines 18..35

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

        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 render has 138 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            const { tests } = this.props
            const {
              currentBenchmarkName,
              status,
        Severity: Major
        Found in benchmarks/src/app/App.js - About 5 hrs to fix

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

          module.exports = {
            mode: 'production',
            entry: './index',
            context: path.resolve(__dirname, './src'),
            output: {
          Severity: Major
          Found in packages/fela-plugin-important/webpack.config.js and 40 other locations - About 5 hrs to fix
          packages/fela-beautifier/webpack.config.js on lines 14..43
          packages/fela-enforce-longhands/webpack.config.js on lines 14..43
          packages/fela-layout-debugger/webpack.config.js on lines 14..43
          packages/fela-logger/webpack.config.js on lines 14..43
          packages/fela-monolithic/webpack.config.js on lines 14..43
          packages/fela-perf/webpack.config.js on lines 14..43
          packages/fela-plugin-bidi/webpack.config.js on lines 14..43
          packages/fela-plugin-custom-property/webpack.config.js on lines 14..43
          packages/fela-plugin-embedded/webpack.config.js on lines 14..43
          packages/fela-plugin-expand-shorthand/webpack.config.js on lines 14..43
          packages/fela-plugin-extend/webpack.config.js on lines 14..43
          packages/fela-plugin-friendly-pseudo-class/webpack.config.js on lines 14..43
          packages/fela-plugin-fullscreen-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-hover-media/webpack.config.js on lines 14..43
          packages/fela-plugin-isolation/webpack.config.js on lines 14..43
          packages/fela-plugin-kebab-case/webpack.config.js on lines 14..43
          packages/fela-plugin-logger/webpack.config.js on lines 14..43
          packages/fela-plugin-multiple-selectors/webpack.config.js on lines 14..43
          packages/fela-plugin-named-keys/webpack.config.js on lines 14..43
          packages/fela-plugin-native-media-query/webpack.config.js on lines 14..43
          packages/fela-plugin-placeholder-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-pseudo-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-responsive-value/webpack.config.js on lines 14..43
          packages/fela-plugin-rtl/webpack.config.js on lines 14..43
          packages/fela-plugin-simulate/webpack.config.js on lines 14..43
          packages/fela-plugin-theme-value/webpack.config.js on lines 14..43
          packages/fela-plugin-unit/webpack.config.js on lines 14..43
          packages/fela-plugin-validator/webpack.config.js on lines 14..43
          packages/fela-preset-dev/webpack.config.js on lines 14..43
          packages/fela-preset-web/webpack.config.js on lines 14..43
          packages/fela-sort-classnames/webpack.config.js on lines 14..43
          packages/fela-sort-media-query-mobile-first/webpack.config.js on lines 14..43
          packages/fela-statistics/webpack.config.js on lines 14..43
          packages/fela-utils/webpack.config.js on lines 14..43
          packages/fela-dom/webpack.config.js on lines 14..43
          packages/fela-identifier/webpack.config.js on lines 14..43
          packages/fela-plugin-fallback-value/webpack.config.js on lines 14..43
          packages/fela-tools/webpack.config.js on lines 14..43
          packages/fela/webpack.config.js on lines 14..43

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

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

          module.exports = {
            mode: 'production',
            entry: './index',
            context: path.resolve(__dirname, './src'),
            output: {
          Severity: Major
          Found in packages/fela-statistics/webpack.config.js and 40 other locations - About 5 hrs to fix
          packages/fela-beautifier/webpack.config.js on lines 14..43
          packages/fela-enforce-longhands/webpack.config.js on lines 14..43
          packages/fela-layout-debugger/webpack.config.js on lines 14..43
          packages/fela-logger/webpack.config.js on lines 14..43
          packages/fela-monolithic/webpack.config.js on lines 14..43
          packages/fela-perf/webpack.config.js on lines 14..43
          packages/fela-plugin-bidi/webpack.config.js on lines 14..43
          packages/fela-plugin-custom-property/webpack.config.js on lines 14..43
          packages/fela-plugin-embedded/webpack.config.js on lines 14..43
          packages/fela-plugin-expand-shorthand/webpack.config.js on lines 14..43
          packages/fela-plugin-extend/webpack.config.js on lines 14..43
          packages/fela-plugin-friendly-pseudo-class/webpack.config.js on lines 14..43
          packages/fela-plugin-fullscreen-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-hover-media/webpack.config.js on lines 14..43
          packages/fela-plugin-important/webpack.config.js on lines 14..43
          packages/fela-plugin-isolation/webpack.config.js on lines 14..43
          packages/fela-plugin-kebab-case/webpack.config.js on lines 14..43
          packages/fela-plugin-logger/webpack.config.js on lines 14..43
          packages/fela-plugin-multiple-selectors/webpack.config.js on lines 14..43
          packages/fela-plugin-named-keys/webpack.config.js on lines 14..43
          packages/fela-plugin-native-media-query/webpack.config.js on lines 14..43
          packages/fela-plugin-placeholder-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-pseudo-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-responsive-value/webpack.config.js on lines 14..43
          packages/fela-plugin-rtl/webpack.config.js on lines 14..43
          packages/fela-plugin-simulate/webpack.config.js on lines 14..43
          packages/fela-plugin-theme-value/webpack.config.js on lines 14..43
          packages/fela-plugin-unit/webpack.config.js on lines 14..43
          packages/fela-plugin-validator/webpack.config.js on lines 14..43
          packages/fela-preset-dev/webpack.config.js on lines 14..43
          packages/fela-preset-web/webpack.config.js on lines 14..43
          packages/fela-sort-classnames/webpack.config.js on lines 14..43
          packages/fela-sort-media-query-mobile-first/webpack.config.js on lines 14..43
          packages/fela-utils/webpack.config.js on lines 14..43
          packages/fela-dom/webpack.config.js on lines 14..43
          packages/fela-identifier/webpack.config.js on lines 14..43
          packages/fela-plugin-fallback-value/webpack.config.js on lines 14..43
          packages/fela-tools/webpack.config.js on lines 14..43
          packages/fela/webpack.config.js on lines 14..43

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

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

          module.exports = {
            mode: 'production',
            entry: './index',
            context: path.resolve(__dirname, './src'),
            output: {
          Severity: Major
          Found in packages/fela-preset-dev/webpack.config.js and 40 other locations - About 5 hrs to fix
          packages/fela-beautifier/webpack.config.js on lines 14..43
          packages/fela-enforce-longhands/webpack.config.js on lines 14..43
          packages/fela-layout-debugger/webpack.config.js on lines 14..43
          packages/fela-logger/webpack.config.js on lines 14..43
          packages/fela-monolithic/webpack.config.js on lines 14..43
          packages/fela-perf/webpack.config.js on lines 14..43
          packages/fela-plugin-bidi/webpack.config.js on lines 14..43
          packages/fela-plugin-custom-property/webpack.config.js on lines 14..43
          packages/fela-plugin-embedded/webpack.config.js on lines 14..43
          packages/fela-plugin-expand-shorthand/webpack.config.js on lines 14..43
          packages/fela-plugin-extend/webpack.config.js on lines 14..43
          packages/fela-plugin-friendly-pseudo-class/webpack.config.js on lines 14..43
          packages/fela-plugin-fullscreen-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-hover-media/webpack.config.js on lines 14..43
          packages/fela-plugin-important/webpack.config.js on lines 14..43
          packages/fela-plugin-isolation/webpack.config.js on lines 14..43
          packages/fela-plugin-kebab-case/webpack.config.js on lines 14..43
          packages/fela-plugin-logger/webpack.config.js on lines 14..43
          packages/fela-plugin-multiple-selectors/webpack.config.js on lines 14..43
          packages/fela-plugin-named-keys/webpack.config.js on lines 14..43
          packages/fela-plugin-native-media-query/webpack.config.js on lines 14..43
          packages/fela-plugin-placeholder-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-pseudo-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-responsive-value/webpack.config.js on lines 14..43
          packages/fela-plugin-rtl/webpack.config.js on lines 14..43
          packages/fela-plugin-simulate/webpack.config.js on lines 14..43
          packages/fela-plugin-theme-value/webpack.config.js on lines 14..43
          packages/fela-plugin-unit/webpack.config.js on lines 14..43
          packages/fela-plugin-validator/webpack.config.js on lines 14..43
          packages/fela-preset-web/webpack.config.js on lines 14..43
          packages/fela-sort-classnames/webpack.config.js on lines 14..43
          packages/fela-sort-media-query-mobile-first/webpack.config.js on lines 14..43
          packages/fela-statistics/webpack.config.js on lines 14..43
          packages/fela-utils/webpack.config.js on lines 14..43
          packages/fela-dom/webpack.config.js on lines 14..43
          packages/fela-identifier/webpack.config.js on lines 14..43
          packages/fela-plugin-fallback-value/webpack.config.js on lines 14..43
          packages/fela-tools/webpack.config.js on lines 14..43
          packages/fela/webpack.config.js on lines 14..43

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

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

          module.exports = {
            mode: 'production',
            entry: './index',
            context: path.resolve(__dirname, './src'),
            output: {
          Severity: Major
          Found in packages/fela-plugin-logger/webpack.config.js and 40 other locations - About 5 hrs to fix
          packages/fela-beautifier/webpack.config.js on lines 14..43
          packages/fela-enforce-longhands/webpack.config.js on lines 14..43
          packages/fela-layout-debugger/webpack.config.js on lines 14..43
          packages/fela-logger/webpack.config.js on lines 14..43
          packages/fela-monolithic/webpack.config.js on lines 14..43
          packages/fela-perf/webpack.config.js on lines 14..43
          packages/fela-plugin-bidi/webpack.config.js on lines 14..43
          packages/fela-plugin-custom-property/webpack.config.js on lines 14..43
          packages/fela-plugin-embedded/webpack.config.js on lines 14..43
          packages/fela-plugin-expand-shorthand/webpack.config.js on lines 14..43
          packages/fela-plugin-extend/webpack.config.js on lines 14..43
          packages/fela-plugin-friendly-pseudo-class/webpack.config.js on lines 14..43
          packages/fela-plugin-fullscreen-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-hover-media/webpack.config.js on lines 14..43
          packages/fela-plugin-important/webpack.config.js on lines 14..43
          packages/fela-plugin-isolation/webpack.config.js on lines 14..43
          packages/fela-plugin-kebab-case/webpack.config.js on lines 14..43
          packages/fela-plugin-multiple-selectors/webpack.config.js on lines 14..43
          packages/fela-plugin-named-keys/webpack.config.js on lines 14..43
          packages/fela-plugin-native-media-query/webpack.config.js on lines 14..43
          packages/fela-plugin-placeholder-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-pseudo-prefixer/webpack.config.js on lines 14..43
          packages/fela-plugin-responsive-value/webpack.config.js on lines 14..43
          packages/fela-plugin-rtl/webpack.config.js on lines 14..43
          packages/fela-plugin-simulate/webpack.config.js on lines 14..43
          packages/fela-plugin-theme-value/webpack.config.js on lines 14..43
          packages/fela-plugin-unit/webpack.config.js on lines 14..43
          packages/fela-plugin-validator/webpack.config.js on lines 14..43
          packages/fela-preset-dev/webpack.config.js on lines 14..43
          packages/fela-preset-web/webpack.config.js on lines 14..43
          packages/fela-sort-classnames/webpack.config.js on lines 14..43
          packages/fela-sort-media-query-mobile-first/webpack.config.js on lines 14..43
          packages/fela-statistics/webpack.config.js on lines 14..43
          packages/fela-utils/webpack.config.js on lines 14..43
          packages/fela-dom/webpack.config.js on lines 14..43
          packages/fela-identifier/webpack.config.js on lines 14..43
          packages/fela-plugin-fallback-value/webpack.config.js on lines 14..43
          packages/fela-tools/webpack.config.js on lines 14..43
          packages/fela/webpack.config.js on lines 14..43

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

          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