rofrischmann/fela

View on GitHub

Showing 105 of 412 total issues

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

  render() {
    const {
      accessibilityLabel,
      color,
      disabled,
Severity: Minor
Found in benchmarks/src/app/Button.js - About 1 hr to fix

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

    const Dot = props => {
      const { className, children: styles } = (
        <scope className="Dot">
          <style jsx>{`
            .Dot {
    Severity: Minor
    Found in benchmarks/src/implementations/styled-jsx/Dot.js - About 1 hr to fix

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

      export default function feFactory(createElement, FelaComponent) {
        return function fe(type, props = {}, ...children) {
          if (props) {
            const { css, key, ref, className, ...otherProps } = props
      
      
      Severity: Minor
      Found in packages/fela-bindings/src/feFactory.js - About 1 hr to fix

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

            const renderFn = (renderer) => {
              if (renderer.devMode && style == null) {
                // eslint-disable-next-line no-console
                console.warn(
                  '"FelaComponent" is being rendered without a style prop\nIf all you need is access to theme, try using "FelaTheme" or the "useFela" hook instead'
        Severity: Minor
        Found in packages/fela-bindings/src/FelaComponentFactory.js - About 1 hr to fix

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

              _renderStyleToCache(reference, property, value, pseudo, media, support) {
                // we remove undefined values to enable
                // usage of optional props without side-effects
                if (isUndefinedValue(value)) {
                  renderer.cache[reference] = {
          Severity: Minor
          Found in packages/fela/src/createRenderer.js - About 1 hr to fix

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

            export default function hoistStatics(target, source) {
              if (typeof source === 'string') {
                return target
              }
            
            
            Severity: Minor
            Found in packages/fela-bindings/src/hoistStatics.js - About 1 hr to fix

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

              function resolveResponsiveValues(style, properties, getMediaQueries, props) {
                for (const property in style) {
                  const value = style[property]
              
                  // resolve nested styles
              Severity: Minor
              Found in packages/fela-plugin-responsive-value/src/index.js - About 1 hr to fix

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

                export default function rehydrateRules(
                  css,
                  media = '',
                  support = '',
                  cache = {},
                Severity: Minor
                Found in packages/fela-dom/src/dom/rehydration/rehydrateRules.js - About 1 hr to fix

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

                      renderKeyframe(keyframe, props = {}) {
                        const resolvedKeyframe = keyframe(props, renderer)
                        const processedKeyframe = processStyleWithPlugins(
                          renderer,
                          resolvedKeyframe,
                  Severity: Minor
                  Found in packages/fela/src/createRenderer.js - About 1 hr to fix

                    Function hoverMediaPlugin has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function hoverMediaPlugin(style) {
                      for (const property in style) {
                        const value = style[property]
                    
                        if (isPlainObject(value)) {
                    Severity: Minor
                    Found in packages/fela-plugin-hover-media/src/index.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 FelaComponentFactory has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function FelaComponentFactory(
                      createElement,
                      RendererContext,
                      FelaTheme
                    ) {
                    Severity: Minor
                    Found in packages/fela-bindings/src/FelaComponentFactory.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 resolveResponsiveValues has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function resolveResponsiveValues(style, properties, getMediaQueries, props) {
                      for (const property in style) {
                        const value = style[property]
                    
                        // resolve nested styles
                    Severity: Minor
                    Found in packages/fela-plugin-responsive-value/src/index.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 RendererProviderFactory has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function RendererProviderFactory(
                      BaseComponent,
                      RendererContext,
                      createElement,
                      renderChildren,
                    Severity: Minor
                    Found in packages/fela-bindings/src/RendererProviderFactory.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 checkMediaQuery has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function checkMediaQuery(style, mediaQueryMap, aliases) {
                      for (const property in style) {
                        const value = style[property]
                    
                        if (isObject(value)) {

                    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 handleError has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      property,
                      style,
                      logInvalid,
                      deleteInvalid,
                      message,
                    Severity: Minor
                    Found in packages/fela-plugin-validator/src/index.js - About 45 mins to fix

                      Function _renderStyleToCache has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          _renderStyleToCache(reference, property, value, pseudo, media, support) {
                      Severity: Minor
                      Found in packages/fela/src/createRenderer.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (!renderer.cache.hasOwnProperty(cacheReference)) {
                                        renderer._renderStyleToCache(
                                          cacheReference,
                                          processed.property,
                                          processed.value,
                        Severity: Major
                        Found in packages/fela/src/createRenderer.js - About 45 mins to fix

                          Function simulatePlugin has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function simulatePlugin(style, type, renderer, props) {
                            if (props.simulate) {
                              for (const property in style) {
                                const value = style[property]
                          
                          
                          Severity: Minor
                          Found in packages/fela-plugin-simulate/src/index.js - About 45 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 createStyleTagMarkup has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            css,
                            type,
                            media = '',
                            rehydrationIndex = -1,
                            support = false,
                          Severity: Minor
                          Found in packages/fela-dom/src/server/createStyleTagMarkup.js - About 45 mins to fix

                            Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                              render() {
                                let renderer;
                                const { isEmoji, isEntity, isHashtag, isMention, isMedia, isUrl } = this.props.part;
                            
                                if (isEmoji || isEntity || isUrl || isMedia) {
                            Severity: Minor
                            Found in benchmarks/src/implementations/react-native-web/Tweet/TweetTextPart.js - About 45 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