MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

View on GitHub
src/squirrel.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function handleStartupEvent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const handleStartupEvent = () => {
  if (process.platform !== 'win32') {
    return false;
  }

Severity: Minor
Found in src/squirrel.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

            return true;
    Severity: Major
    Found in src/squirrel.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        return false;
      Severity: Major
      Found in src/squirrel.js - About 30 mins to fix

        Unary operator '++' used.
        Open

          for (let i = 0; i < process.argv.length; i++) {
        Severity: Minor
        Found in src/squirrel.js by eslint

        disallow the unary operators ++ and -- (no-plusplus)

        Because the unary ++ and -- operators are subject to automatic semicolon insertion, differences in whitespace can change semantics of source code.

        var i = 10;
        var j = 20;
        
        i ++
        j
        // i = 11, j = 20
        var i = 10;
        var j = 20;
        
        i
        ++
        j
        // i = 10, j = 21

        Rule Details

        This rule disallows the unary operators ++ and --.

        Examples of incorrect code for this rule:

        /*eslint no-plusplus: "error"*/
        
        var foo = 0;
        foo++;
        
        var bar = 42;
        bar--;
        
        for (i = 0; i < l; i++) {
            return;
        }

        Examples of correct code for this rule:

        /*eslint no-plusplus: "error"*/
        
        var foo = 0;
        foo += 1;
        
        var bar = 42;
        bar -= 1;
        
        for (i = 0; i < l; i += 1) {
            return;
        }

        Options

        This rule has an object option.

        • "allowForLoopAfterthoughts": true allows unary operators ++ and -- in the afterthought (final expression) of a for loop.

        allowForLoopAfterthoughts

        Examples of correct code for this rule with the { "allowForLoopAfterthoughts": true } option:

        /*eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }]*/
        
        for (i = 0; i < l; i++) {
            return;
        }
        
        for (i = 0; i < l; i--) {
            return;
        }

        Source: http://eslint.org/docs/rules/

        There are no issues that match your filters.

        Category
        Status