rofrischmann/inline-style-prefixer

View on GitHub

Showing 397 of 397 total issues

Function createPrefixer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function createPrefixer(_ref) {
  var prefixMap = _ref.prefixMap,
      plugins = _ref.plugins;

  function prefixAll(style) {
Severity: Minor
Found in benchmark/packages/301/static/createPrefixer.js - About 1 hr to fix

    Function _prefixStyle has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          value: function _prefixStyle(style) {
            for (var property in style) {
              var value = style[property];
    
              // handle nested objects
    Severity: Minor
    Found in benchmark/packages/300/dynamic/createPrefixer.js - About 1 hr to fix

      Function _prefixStyle has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            value: function _prefixStyle(style) {
              for (var property in style) {
                var value = style[property];
      
                // handle nested objects
      Severity: Minor
      Found in benchmark/packages/301/dynamic/createPrefixer.js - About 1 hr to fix

        Function createPrefixer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function createPrefixer(_ref) {
          var prefixMap = _ref.prefixMap,
              plugins = _ref.plugins;
        
          function prefixAll(style) {
        Severity: Minor
        Found in benchmark/packages/300/static/createPrefixer.js - About 1 hr to fix

          Function createPrefixer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function createPrefixer(_ref) {
            var prefixMap = _ref.prefixMap,
                plugins = _ref.plugins;
          
            function prefixAll(style) {
          Severity: Minor
          Found in benchmark/packages/302/static/createPrefixer.js - About 1 hr to fix

            Function flexboxOld has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function flexboxOld(_ref) {
              var property = _ref.property;
              var value = _ref.value;
              var styles = _ref.styles;
              var _ref$browserInfo = _ref.browserInfo;
            Severity: Minor
            Found in benchmark/packages/205/plugins/flexboxOld.js - About 1 hr to fix

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

                function Prefixer() {
                  var _this = this;
              
                  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
              
              
              Severity: Minor
              Found in benchmark/packages/205/Prefixer.js - About 1 hr to fix

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

                  transition: {
                    chrome: maximumVersion,
                    safari: maximumVersion,
                    opera: maximumVersion,
                    and_chr: maximumVersion,
                Severity: Major
                Found in benchmark/packages/700/generator/maps/pluginMap.js and 1 other location - About 1 hr to fix
                modules/generator/maps/pluginMap.js on lines 83..94

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

                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

                  transition: {
                    chrome: maximumVersion,
                    safari: maximumVersion,
                    opera: maximumVersion,
                    and_chr: maximumVersion,
                Severity: Major
                Found in modules/generator/maps/pluginMap.js and 1 other location - About 1 hr to fix
                benchmark/packages/700/generator/maps/pluginMap.js on lines 98..109

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

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

                export function generateFile(prefixMap, pluginList, compatibility) {
                  const pluginImports = pluginList
                    .map((plugin) => generateImportString(plugin, compatibility))
                    .join('\n')
                
                
                Severity: Minor
                Found in modules/generator/index.js - About 1 hr to fix

                  Function createPrefixer has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function createPrefixer(_ref) {
                    var prefixMap = _ref.prefixMap,
                        plugins = _ref.plugins;
                  
                    return function prefix(style) {
                  Severity: Minor
                  Found in benchmark/packages/700/createPrefixer.js - About 1 hr to fix

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

                      return pluginImports + '\n' + prefixVariables + '\n\n' + moduleExporter + ' {\n  plugins: ' + pluginExport + ',\n  prefixMap: ' + prefixMapExport.replace(/\["Webkit"\]/g, 'w').replace(/\["Moz"\]/g, 'm').replace(/\["ms"\]/g, 'ms').replace(/\["Webkit","Moz"\]/g, 'wm').replace(/\["Webkit","ms"\]/g, 'wms').replace(/\["Webkit","Moz","ms"\]/g, 'wmms') + '\n}';
                    Severity: Major
                    Found in benchmark/packages/700/generator/index.js and 1 other location - About 1 hr to fix
                    modules/generator/index.js on lines 34..40

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

                    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

                      prefixMap: ${prefixMapExport
                        .replace(/\["Webkit"\]/g, 'w')
                        .replace(/\["Moz"\]/g, 'm')
                        .replace(/\["ms"\]/g, 'ms')
                        .replace(/\["Webkit","Moz"\]/g, 'wm')
                    Severity: Major
                    Found in modules/generator/index.js and 1 other location - About 1 hr to fix
                    benchmark/packages/700/generator/index.js on lines 40..40

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

                    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

                    function flex(property, value) {
                      if (property === 'display' && values.hasOwnProperty(value)) {
                        return ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value];
                      }
                    }
                    Severity: Minor
                    Found in benchmark/packages/302/static/plugins/flex.js and 1 other location - About 55 mins to fix
                    benchmark/packages/301/static/plugins/flex.js on lines 12..16

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

                    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

                    function flex(property, value) {
                      if (property === 'display' && values.hasOwnProperty(value)) {
                        return ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value];
                      }
                    }
                    Severity: Minor
                    Found in benchmark/packages/301/static/plugins/flex.js and 1 other location - About 55 mins to fix
                    benchmark/packages/302/static/plugins/flex.js on lines 12..16

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

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

                    function getPrefixedKeyframes(browserName, browserVersion, cssPrefix) {
                      var prefixedKeyframes = 'keyframes';
                    
                      if (browserName === 'chrome' && browserVersion < 43 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion < 9 || browserName === 'opera' && browserVersion < 30 || browserName === 'android' && browserVersion <= 4.4 || browserName === 'and_uc') {
                        return cssPrefix + prefixedKeyframes;
                    Severity: Minor
                    Found in benchmark/packages/302/utils/getPrefixedKeyframes.js - About 55 mins 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 getPrefixedKeyframes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function getPrefixedKeyframes(browserName, browserVersion, cssPrefix) {
                      var prefixedKeyframes = 'keyframes';
                    
                      if (browserName === 'chrome' && browserVersion < 43 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion < 9 || browserName === 'opera' && browserVersion < 30 || browserName === 'android' && browserVersion <= 4.4 || browserName === 'and_uc') {
                        return cssPrefix + prefixedKeyframes;
                    Severity: Minor
                    Found in benchmark/packages/301/utils/getPrefixedKeyframes.js - About 55 mins 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 getPrefixedKeyframes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function getPrefixedKeyframes(browserName, browserVersion, cssPrefix) {
                      var prefixedKeyframes = 'keyframes';
                    
                      if (browserName === 'chrome' && browserVersion < 43 || (browserName === 'safari' || browserName === 'ios_saf') && browserVersion < 9 || browserName === 'opera' && browserVersion < 30 || browserName === 'android' && browserVersion <= 4.4 || browserName === 'and_uc') {
                        return cssPrefix + prefixedKeyframes;
                    Severity: Minor
                    Found in benchmark/packages/300/utils/getPrefixedKeyframes.js - About 55 mins 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 transition has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function transition(property, value, style, _ref) {
                      var cssPrefix = _ref.cssPrefix,
                          keepUnprefixed = _ref.keepUnprefixed,
                          requiresPrefix = _ref.requiresPrefix;
                    
                    
                    Severity: Minor
                    Found in benchmark/packages/302/dynamic/plugins/transition.js - About 55 mins 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 transition has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function transition(property, value, style, _ref) {
                      var cssPrefix = _ref.cssPrefix,
                          keepUnprefixed = _ref.keepUnprefixed,
                          requiresPrefix = _ref.requiresPrefix;
                    
                    
                    Severity: Minor
                    Found in benchmark/packages/300/dynamic/plugins/transition.js - About 55 mins 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

                    Severity
                    Category
                    Status
                    Source
                    Language