tunnckoCore/parse-function

View on GitHub

Showing 8 of 8 total issues

Function parseFunction has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function parseFunction (opts) {
  const plugins = []
  const app = {
    /**
     * > Parse a given `code` and returns a `result` object
Severity: Minor
Found in src/index.js - About 1 hr to fix

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

    export default function parseFunction (opts) {
      const plugins = []
      const app = {
        /**
         * > Parse a given `code` and returns a `result` object
    Severity: Minor
    Found in 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

    Parsing error: The keyword 'import' is reserved
    Open

    import arrayify from 'arrify'
    Severity: Minor
    Found in src/lib/utils.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Parsing error: The keyword 'export' is reserved
    Open

    export default (app) => (node, result) => {
    Severity: Minor
    Found in src/lib/plugins/params.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Parsing error: The keyword 'import' is reserved
    Open

    import utils from './lib/utils.js'
    Severity: Minor
    Found in src/index.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Parsing error: The keyword 'export' is reserved
    Open

    export default (app) => (node, result) => {
    Severity: Minor
    Found in src/lib/plugins/body.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Parsing error: The keyword 'export' is reserved
    Open

    export default (app) => (node, result) => {
    Severity: Minor
    Found in src/lib/plugins/props.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Parsing error: The keyword 'import' is reserved
    Open

    import body from './body.js'
    Severity: Minor
    Found in src/lib/plugins/initial.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Severity
    Category
    Status
    Source
    Language