vuematerial/vue-material

View on GitHub

Showing 330 of 330 total issues

Function handleTouchMove has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    handleTouchMove (event) {
      if (this.swipeStart) {
        const touchmoveX = event.touches[0].screenX
        const touchmoveY = event.touches[0].screenY

Severity: Minor
Found in src/core/mixins/MdSwipeable/MdSwipeable.js - About 2 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

Function init has 42 lines of code (exceeds 40 allowed). Consider refactoring.
Open

const init = () => {
  let material = new MdReactive({
    ripple: true,
    theming: {},
    locale: {
Severity: Minor
Found in src/material.js - About 1 hr to fix

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

        attrs () {
          const attrs = {
            id: this.id,
            name: this.name,
            disabled: this.disabled,
    Severity: Minor
    Found in src/components/MdCheckbox/MdCheckboxMixin.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 handleFlexibleMode has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        handleFlexibleMode ($event) {
          let { scrollTop, initialHeight } = this.getToolbarConstrants($event)
          const toolbar = this.MdApp.toolbar.element
          const firstRow = toolbar.querySelector('.md-toolbar-row:first-child')
          const firstRowHeight = firstRow.offsetHeight
    Severity: Minor
    Found in src/components/MdApp/MdAppMixin.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 getAncestorTheme has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        getAncestorTheme (component) {
          if (component) {
            const currentTheme = component.mdTheme
            const getParentThemeName = (parent) => {
              if (parent) {
    Severity: Minor
    Found in src/core/MdTheme.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 setLabelFor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        setLabelFor () {
          if (this.$el.parentNode) {
            const label = this.$el.parentNode.querySelector('label')
    
            if (label) {
    Severity: Minor
    Found in src/components/MdField/MdFieldMixin.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 transitionName has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        transitionName () {
          const childrenComponent = this._vnode.componentOptions.children[0]
    
          if (childrenComponent) {
            const transition = childrenComponent.data.transition
    Severity: Minor
    Found in src/components/MdPortal/MdPortal.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 containerStyles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        containerStyles () {
          let styles = {}
    
          if (this.isFixed) {
            styles['margin-top'] = this.MdApp.toolbar.initialHeight + 'px'
    Severity: Minor
    Found in src/components/MdApp/MdAppMixin.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 handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          handler () {
            const { fullThemeName, themeTarget, enabled } = this
    
            if (themeTarget) {
              if (enabled) {
    Severity: Minor
    Found in src/core/MdTheme.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

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Multiple consecutive blank lines
    Open

    
    
    Severity: Info
    Found in CHANGELOG.md by markdownlint

    MD012 - Multiple consecutive blank lines

    Tags: whitespace, blank_lines

    Aliases: no-multiple-blanks

    This rule is triggered when there are multiple consecutive blank lines in the document:

    Some text here
    
    
    Some more text here

    To fix this, delete the offending lines:

    Some text here
    
    Some more text here

    Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

    Severity
    Category
    Status
    Source
    Language