rofrischmann/inline-style-prefixer

View on GitHub

Showing 397 of 397 total issues

Consider simplifying this complex logical expression.
Open

  if (typeof value === 'string' && values.test(value) && (browserName === 'firefox' && browserVersion < 16 || browserName === 'chrome' && browserVersion < 26 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion < 7 || (browserName === 'opera' || browserName === 'op_mini') && browserVersion < 12.1 || browserName === 'android' && browserVersion < 4.4 || browserName === 'and_uc')) {
    return (0, _getPrefixedValue2.default)(cssPrefix + value, value, keepUnprefixed);
  }
Severity: Critical
Found in benchmark/packages/302/dynamic/plugins/gradient.js - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

      if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
        return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
      }
    Severity: Critical
    Found in benchmark/packages/205/plugins/gradient.js - About 3 hrs to fix

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

      export const static301 = () => {
        const styles = {
          color: 'red',
          display: 'flex',
          justifyContent: 'center',
      Severity: Major
      Found in benchmark/static/cases/301-static.js and 4 other locations - About 3 hrs to fix
      benchmark/static/cases/205-static.js on lines 3..23
      benchmark/static/cases/300-static.js on lines 3..23
      benchmark/static/cases/302-static.js on lines 3..23
      benchmark/static/cases/700-static.js on lines 3..23

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 106.

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

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

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

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

      Refactorings

      Further Reading

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

      export const static205 = () => {
        const styles = {
          color: 'red',
          display: 'flex',
          justifyContent: 'center',
      Severity: Major
      Found in benchmark/static/cases/205-static.js and 4 other locations - About 3 hrs to fix
      benchmark/static/cases/300-static.js on lines 3..23
      benchmark/static/cases/301-static.js on lines 3..23
      benchmark/static/cases/302-static.js on lines 3..23
      benchmark/static/cases/700-static.js on lines 3..23

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 106.

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

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

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

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

      Refactorings

      Further Reading

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

      export const static302 = () => {
        const styles = {
          color: 'red',
          display: 'flex',
          justifyContent: 'center',
      Severity: Major
      Found in benchmark/static/cases/302-static.js and 4 other locations - About 3 hrs to fix
      benchmark/static/cases/205-static.js on lines 3..23
      benchmark/static/cases/300-static.js on lines 3..23
      benchmark/static/cases/301-static.js on lines 3..23
      benchmark/static/cases/700-static.js on lines 3..23

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 106.

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

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

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

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

      Refactorings

      Further Reading

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

      export const static700 = () => {
        const styles = {
          color: 'red',
          display: 'flex',
          justifyContent: 'center',
      Severity: Major
      Found in benchmark/static/cases/700-static.js and 4 other locations - About 3 hrs to fix
      benchmark/static/cases/205-static.js on lines 3..23
      benchmark/static/cases/300-static.js on lines 3..23
      benchmark/static/cases/301-static.js on lines 3..23
      benchmark/static/cases/302-static.js on lines 3..23

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 106.

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

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

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

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

      Refactorings

      Further Reading

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

      export const static300 = () => {
        const styles = {
          color: 'red',
          display: 'flex',
          justifyContent: 'center',
      Severity: Major
      Found in benchmark/static/cases/300-static.js and 4 other locations - About 3 hrs to fix
      benchmark/static/cases/205-static.js on lines 3..23
      benchmark/static/cases/301-static.js on lines 3..23
      benchmark/static/cases/302-static.js on lines 3..23
      benchmark/static/cases/700-static.js on lines 3..23

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 106.

      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

            for (var i = 0, len = keywordProperties.length; i < len; ++i) {
              if (versions[browser].x >= browserList[browser]) {
                var property = keywordProperties[i];
                if (!prefixMap[property]) {
                  prefixMap[property] = [];
      Severity: Major
      Found in benchmark/packages/700/generator/generatePrefixMap.js and 1 other location - About 3 hrs to fix
      modules/generator/generatePrefixMap.js on lines 52..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 102.

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

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

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

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

      Refactorings

      Further Reading

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

              if (versions[browser]) {
                if (versions[browser].x >= browserList[browser]) {
                  const property = keywordProperties[i]
      
                  if (!prefixMap[property]) {
      Severity: Major
      Found in modules/generator/generatePrefixMap.js and 1 other location - About 3 hrs to fix
      benchmark/packages/700/generator/generatePrefixMap.js on lines 52..63

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

      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

      Consider simplifying this complex logical expression.
      Open

        if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browserName === 'firefox' && browserVersion < 22 || browserName === 'chrome' && browserVersion < 21 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion <= 6.1 || browserName === 'android' && browserVersion < 4.4 || browserName === 'and_uc')) {
          delete requiresPrefix[property];
      
          if (!keepUnprefixed && !Array.isArray(style[property])) {
            delete style[property];
      Severity: Critical
      Found in benchmark/packages/301/dynamic/plugins/flexboxOld.js - About 3 hrs to fix

        Consider simplifying this complex logical expression.
        Open

          if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
            if (!keepUnprefixed && !Array.isArray(styles[property])) {
              delete styles[property];
            }
            if (property === 'flexDirection' && typeof value === 'string') {
        Severity: Critical
        Found in benchmark/packages/205/plugins/flexboxOld.js - About 3 hrs to fix

          Consider simplifying this complex logical expression.
          Open

            if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browserName === 'firefox' && browserVersion < 22 || browserName === 'chrome' && browserVersion < 21 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion <= 6.1 || browserName === 'android' && browserVersion < 4.4 || browserName === 'and_uc')) {
              delete requiresPrefix[property];
          
              if (!keepUnprefixed && !Array.isArray(style[property])) {
                delete style[property];
          Severity: Critical
          Found in benchmark/packages/300/dynamic/plugins/flexboxOld.js - About 3 hrs to fix

            Consider simplifying this complex logical expression.
            Open

              if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browserName === 'firefox' && browserVersion < 22 || browserName === 'chrome' && browserVersion < 21 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion <= 6.1 || browserName === 'android' && browserVersion < 4.4 || browserName === 'and_uc')) {
                delete requiresPrefix[property];
            
                if (!keepUnprefixed && !Array.isArray(style[property])) {
                  delete style[property];
            Severity: Critical
            Found in benchmark/packages/302/dynamic/plugins/flexboxOld.js - About 3 hrs to fix

              Function Prefixer has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var Prefixer = function () {
                /**
                 * Instantiante a new prefixer
                 * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com
                 * @param {string} keepUnprefixed - keeps unprefixed properties and values
              Severity: Major
              Found in benchmark/packages/205/Prefixer.js - About 3 hrs to fix

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

                var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                Severity: Major
                Found in benchmark/packages/300/dynamic/plugins/transition.js and 2 other locations - About 3 hrs to fix
                benchmark/packages/301/dynamic/plugins/transition.js on lines 7..7
                benchmark/packages/302/dynamic/plugins/transition.js on lines 7..7

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 95.

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

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

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

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

                Refactorings

                Further Reading

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

                function position(property, value, _ref) {
                  var browserName = _ref.browserName,
                      cssPrefix = _ref.cssPrefix,
                      keepUnprefixed = _ref.keepUnprefixed;
                
                
                Severity: Major
                Found in benchmark/packages/301/dynamic/plugins/position.js and 2 other locations - About 3 hrs to fix
                benchmark/packages/300/dynamic/plugins/position.js on lines 14..22
                benchmark/packages/302/dynamic/plugins/position.js on lines 14..22

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 95.

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

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

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

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

                Refactorings

                Further Reading

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

                function position(property, value, _ref) {
                  var browserName = _ref.browserName,
                      cssPrefix = _ref.cssPrefix,
                      keepUnprefixed = _ref.keepUnprefixed;
                
                
                Severity: Major
                Found in benchmark/packages/302/dynamic/plugins/position.js and 2 other locations - About 3 hrs to fix
                benchmark/packages/300/dynamic/plugins/position.js on lines 14..22
                benchmark/packages/301/dynamic/plugins/position.js on lines 14..22

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 95.

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

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

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

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

                Refactorings

                Further Reading

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

                function position(property, value, _ref) {
                  var browserName = _ref.browserName,
                      cssPrefix = _ref.cssPrefix,
                      keepUnprefixed = _ref.keepUnprefixed;
                
                
                Severity: Major
                Found in benchmark/packages/300/dynamic/plugins/position.js and 2 other locations - About 3 hrs to fix
                benchmark/packages/301/dynamic/plugins/position.js on lines 14..22
                benchmark/packages/302/dynamic/plugins/position.js on lines 14..22

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 95.

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

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

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

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

                Refactorings

                Further Reading

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

                var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                Severity: Major
                Found in benchmark/packages/301/dynamic/plugins/transition.js and 2 other locations - About 3 hrs to fix
                benchmark/packages/300/dynamic/plugins/transition.js on lines 7..7
                benchmark/packages/302/dynamic/plugins/transition.js on lines 7..7

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 95.

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

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

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

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

                Refactorings

                Further Reading

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

                var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
                Severity: Major
                Found in benchmark/packages/302/dynamic/plugins/transition.js and 2 other locations - About 3 hrs to fix
                benchmark/packages/300/dynamic/plugins/transition.js on lines 7..7
                benchmark/packages/301/dynamic/plugins/transition.js on lines 7..7

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 95.

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

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

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

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

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language