rofrischmann/fela

View on GitHub

Showing 105 of 412 total issues

Function validateKeyframeObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  style,
  logInvalid,
  deleteInvalid,
  useCSSLint,
  cssRules
Severity: Minor
Found in packages/fela-plugin-validator/src/index.js - About 35 mins to fix

    Function createSnapshotFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      createElement,
      renderToMarkup,
      defaultRenderer,
      defaultRendererProvider,
      defaultThemeProvider
    Severity: Minor
    Found in packages/jest-fela-bindings/src/createSnapshotFactory.js - About 35 mins to fix

      Function generateDeclarationReference has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        property,
        value,
        pseudo = '',
        media = '',
        support = ''
      Severity: Minor
      Found in packages/fela-utils/src/generateDeclarationReference.js - About 35 mins to fix

        Function createComponentFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          createElement,
          RendererContext,
          FelaTheme,
          withProxy = false,
          alwaysPassThroughProps = []
        Severity: Minor
        Found in packages/fela-bindings/src/createComponentFactory.js - About 35 mins to fix

          Function rehydrateRules has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            css,
            media = '',
            support = '',
            cache = {},
            specificityPrefix = ''
          Severity: Minor
          Found in packages/fela-dom/src/dom/rehydration/rehydrateRules.js - About 35 mins to fix

            Function createSnapshotFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              createElement,
              renderHandler,
              defaultRenderer,
              defaultRendererProvider,
              defaultThemeProvider
            Severity: Minor
            Found in packages/jest-fela-bindings/src/createAsyncSnapshotFactory.js - About 35 mins to fix

              Function RendererProviderFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                BaseComponent,
                RendererContext,
                createElement,
                renderChildren,
                statics
              Severity: Minor
              Found in packages/fela-bindings/src/RendererProviderFactory.js - About 35 mins to fix

                Function validateStyleObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  style,
                  logInvalid,
                  deleteInvalid,
                  useCSSLint,
                  cssRules
                Severity: Minor
                Found in packages/fela-plugin-validator/src/index.js - About 35 mins to fix

                  Function processStyleWithPlugins has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    renderer,
                    style,
                    type,
                    props = {},
                    plugins = renderer.plugins
                  Severity: Minor
                  Found in packages/fela-utils/src/processStyleWithPlugins.js - About 35 mins to fix

                    Function typescript has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function typescript(style) {
                      for (const property in style) {
                        const value = style[property]
                    
                        if (property === 'nested' && isPlainObject(value)) {
                    Severity: Minor
                    Found in packages/fela-plugin-typescript/src/index.js - About 35 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 nativeMediaQueryPlugin has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function nativeMediaQueryPlugin(style) {
                      const { width, height } = Dimensions.get('window')
                    
                      for (const property in style) {
                        const value = style[property]
                    Severity: Minor
                    Found in packages/fela-plugin-native-media-query/src/index.js - About 35 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 render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      render() {
                        const { components, x, y, depth, renderCount } = this.props;
                        let { s } = this.props;
                        const { Dot } = components;
                    
                    
                    Severity: Minor
                    Found in benchmarks/src/cases/SierpinskiTriangle.js - About 35 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 setFontSize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      const setFontSize = width => {
                        const fontSize = width > medium ? (width > large ? '18px' : '17px') : '16px';
                        if (htmlElement) {
                          htmlElement.style.fontSize = fontSize;
                        }
                    Severity: Minor
                    Found in benchmarks/src/app/theme.js - About 35 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 sortMediaQuery has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function sortMediaQuery(mediaQueryOrder = []) {
                      return function sort(a, b) {
                        if (mediaQueryOrder.indexOf(b) === -1) {
                          if (mediaQueryOrder.indexOf(a) === -1) {
                            return 0
                    Severity: Minor
                    Found in packages/fela/src/sortMediaQuery.js - About 35 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 Heading has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function Heading({ level, children }) {
                      const { theme } = useFela()
                    
                      const [text, fixedId] = getFixedId(children)
                      const id = getId(children, level, fixedId)
                    Severity: Minor
                    Found in website/components/Heading.js - About 35 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 Content has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function Content({ docsPath, children }) {
                      const router = useRouter()
                      const { theme } = useFela()
                    
                      return (
                    Severity: Minor
                    Found in website/components/DocLayout.js - About 35 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

                    Avoid too many return statements within this function.
                    Open

                          return undefined
                    Severity: Major
                    Found in packages/fela-dom/src/dom/connection/getNodeSibling.js - About 30 mins to fix

                      Function getRules has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function getRules(cssRules, rules = {}) {
                        for (let i = 0; i < cssRules.length; ++i) {
                          const rule = cssRules[i]
                          const { selectorText, conditionText, style } = rule
                      
                      
                      Severity: Minor
                      Found in packages/fela-dom/src/dom/__helpers__/getStyleSheetStyle.js - About 25 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 fallbackValuePlugin has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function fallbackValuePlugin(style) {
                        for (const property in style) {
                          const value = style[property]
                      
                          if (Array.isArray(value)) {
                      Severity: Minor
                      Found in packages/fela-plugin-fallback-value/src/index.js - About 25 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 deprecate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      export default function deprecate(condition, message, effect) {
                        if (condition) {
                          if (!isProd && !cache[message]) {
                            console.warn(message)
                            cache[message] = true
                      Severity: Minor
                      Found in packages/fela-bindings/src/_deprecate.js - About 25 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