jshmrtn/generator-jm-vuejs

View on GitHub

Showing 7 of 26 total issues

Function writing has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    writing() {

        let source, target;

        this._copyTpl('package.json', 'package.json');
Severity: Minor
Found in generators/app/index.js - About 5 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 writing has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    writing() {

        let source, target;

        this._copyTpl('package.json', 'package.json');
Severity: Major
Found in generators/app/index.js - About 3 hrs to fix

    Function resource has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const resource = global.caches.match(request).then(response => {
        if (response) {
          if (DEBUG) {
            console.log(`[SW] fetch URL ${requestUrl.href} from cache`);
          }
    Severity: Minor
    Found in generators/app/templates/src/sw.js - About 2 hrs to fix

      Function cssLoaders has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.cssLoaders = function (options) {
        options = options || {};
      
        const cssLoader = {
          loader: 'css-loader',
      Severity: Minor
      Found in generators/app/templates/build/utils.js - About 1 hr to fix

        Function writing has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            writing() {
        
                let source, target;
        
                const componentName = this.props.componentName;
        Severity: Minor
        Found in generators/component/index.js - About 1 hr to fix

          Function writing has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              writing() {
          
                  let source, target;
          
                  const componentName = this.props.componentName;
          Severity: Minor
          Found in generators/component/index.js - About 1 hr 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 exports has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          module.exports = function () {
            const warnings = [];
          
            for (let index = 0; index < versionRequirements.length; index++) {
              const mod = versionRequirements[index];
          Severity: Minor
          Found in generators/app/templates/build/check-versions.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