aureooms/rejuvenate

View on GitHub

Showing 27 of 178 total issues

Avoid too many return statements within this function.
Open

    if (!is(property, n.Identifier)) return false;
Severity: Major
Found in src/transforms/docs:use-codecov-as-test-link.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return absolute === SOURCE_MODULE;
    Severity: Major
    Found in src/transforms/ava:test-build.js - About 30 mins to fix

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

      export default function chcwd({
          cwd,
          offline,
          install: installFlag,
          test: testFlag,
      Severity: Minor
      Found in src/util/chcwd.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 apply has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      export async function apply({readPkg, writePkg, upgrade, fixConfig, install}) {
          // Update package.json
          await update({
              read: readPkg,
              write: writePkg,

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

      export const format = (pkgjson) => {
          const babel = pkgjson.babel;
          if (babel) {
              const env = babel.env;
              if (env) {
      Severity: Minor
      Found in src/lib/babel.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 filter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      const filter = (node, {is, n}) => {
          if (!is(node, n.AssignmentExpression)) return false;
          const {operator, left, right} = node;
          if (!is(left, n.MemberExpression)) return false;
          if (!is(right, n.Literal)) return false;
      Severity: Minor
      Found in src/transforms/docs:use-codecov-as-test-link.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 apply has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      export async function apply({
          read,
          write,
          readPkg,
          writePkg,
      Severity: Minor
      Found in src/transforms/replace-babel-preset-latest-by-scoped-babel-preset-env.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