AutolabJS/AutolabJS

View on GitHub
main_server/reval/reval.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function revaluation has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function revaluation(lab,start_time,end_time,admin_key,callback)
{

    var max_scores = {};
    var number_of_requests=0;
Severity: Minor
Found in main_server/reval/reval.js - About 1 hr to fix

    Line 62 exceeds the maximum line length of 100.
    Open

                            if(max_scores[data.id_no]) max_scores[data.id_no] = Math.max(max_scores[data.id_no],total_score);
    Severity: Minor
    Found in main_server/reval/reval.js by eslint

    enforce a maximum line length (max-len)

    Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

    var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

    Rule Details

    This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

    Options

    This rule has a number or object option:

    • "code" (default 80) enforces a maximum line length
    • "tabWidth" (default 4) specifies the character width for tab characters
    • "comments" enforces a maximum line length for comments; defaults to value of code
    • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
    • "ignoreComments": true ignores all trailing comments and comments on their own line
    • "ignoreTrailingComments": true ignores only trailing comments
    • "ignoreUrls": true ignores lines that contain a URL
    • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
    • "ignoreTemplateLiterals": true ignores lines that contain a template literal
    • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

    code

    Examples of incorrect code for this rule with the default { "code": 80 } option:

    /*eslint max-len: ["error", 80]*/
    
    var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

    Examples of correct code for this rule with the default { "code": 80 } option:

    /*eslint max-len: ["error", 80]*/
    
    var foo = {
      "bar": "This is a bar.",
      "baz": { "qux": "This is a qux" },
      "easier": "to read"
    };

    tabWidth

    Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

    /*eslint max-len: ["error", 80, 4]*/
    
    \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

    Examples of correct code for this rule with the default { "tabWidth": 4 } option:

    /*eslint max-len: ["error", 80, 4]*/
    
    \t  \t  var foo = {
    \t  \t  \t  \t  "bar": "This is a bar.",
    \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
    \t  \t  };

    comments

    Examples of incorrect code for this rule with the { "comments": 65 } option:

    /*eslint max-len: ["error", { "comments": 65 }]*/
    
    /**
     * This is a comment that violates the maximum line length we have specified
    **/

    ignoreComments

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

    /*eslint max-len: ["error", { "ignoreComments": true }]*/
    
    /**
     * This is a really really really really really really really really really long comment
    **/

    ignoreTrailingComments

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

    /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
    
    var foo = 'bar'; // This is a really really really really really really really long comment

    ignoreUrls

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

    /*eslint max-len: ["error", { "ignoreUrls": true }]*/
    
    var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

    ignoreStrings

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

    /*eslint max-len: ["error", { "ignoreStrings": true }]*/
    
    var longString = 'this is a really really really really really long string!';

    ignoreTemplateLiterals

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

    /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
    
    var longTemplateLiteral = `this is a really really really really really long template literal!`;

    ignoreRegExpLiterals

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

    /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
    
    var longRegExpLiteral = /this is a really really really really really long regular expression!/;

    ignorePattern

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

    /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
    
    var dep = require('really/really/really/really/really/really/really/really/long/module');

    Related Rules

    • [complexity](complexity.md)
    • [max-depth](max-depth.md)
    • [max-nested-callbacks](max-nested-callbacks.md)
    • [max-params](max-params.md)
    • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

    Line 31 exceeds the maximum line length of 100.
    Open

        gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
    Severity: Minor
    Found in main_server/reval/reval.js by eslint

    enforce a maximum line length (max-len)

    Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

    var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

    Rule Details

    This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

    Options

    This rule has a number or object option:

    • "code" (default 80) enforces a maximum line length
    • "tabWidth" (default 4) specifies the character width for tab characters
    • "comments" enforces a maximum line length for comments; defaults to value of code
    • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
    • "ignoreComments": true ignores all trailing comments and comments on their own line
    • "ignoreTrailingComments": true ignores only trailing comments
    • "ignoreUrls": true ignores lines that contain a URL
    • "ignoreStrings": true ignores lines that contain a double-quoted or single-quoted string
    • "ignoreTemplateLiterals": true ignores lines that contain a template literal
    • "ignoreRegExpLiterals": true ignores lines that contain a RegExp literal

    code

    Examples of incorrect code for this rule with the default { "code": 80 } option:

    /*eslint max-len: ["error", 80]*/
    
    var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

    Examples of correct code for this rule with the default { "code": 80 } option:

    /*eslint max-len: ["error", 80]*/
    
    var foo = {
      "bar": "This is a bar.",
      "baz": { "qux": "This is a qux" },
      "easier": "to read"
    };

    tabWidth

    Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

    /*eslint max-len: ["error", 80, 4]*/
    
    \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

    Examples of correct code for this rule with the default { "tabWidth": 4 } option:

    /*eslint max-len: ["error", 80, 4]*/
    
    \t  \t  var foo = {
    \t  \t  \t  \t  "bar": "This is a bar.",
    \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
    \t  \t  };

    comments

    Examples of incorrect code for this rule with the { "comments": 65 } option:

    /*eslint max-len: ["error", { "comments": 65 }]*/
    
    /**
     * This is a comment that violates the maximum line length we have specified
    **/

    ignoreComments

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

    /*eslint max-len: ["error", { "ignoreComments": true }]*/
    
    /**
     * This is a really really really really really really really really really long comment
    **/

    ignoreTrailingComments

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

    /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
    
    var foo = 'bar'; // This is a really really really really really really really long comment

    ignoreUrls

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

    /*eslint max-len: ["error", { "ignoreUrls": true }]*/
    
    var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

    ignoreStrings

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

    /*eslint max-len: ["error", { "ignoreStrings": true }]*/
    
    var longString = 'this is a really really really really really long string!';

    ignoreTemplateLiterals

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

    /*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
    
    var longTemplateLiteral = `this is a really really really really really long template literal!`;

    ignoreRegExpLiterals

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

    /*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
    
    var longRegExpLiteral = /this is a really really really really really long regular expression!/;

    ignorePattern

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

    /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
    
    var dep = require('really/really/really/really/really/really/really/really/long/module');

    Related Rules

    • [complexity](complexity.md)
    • [max-depth](max-depth.md)
    • [max-nested-callbacks](max-nested-callbacks.md)
    • [max-params](max-params.md)
    • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

    Function revaluation has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function revaluation(lab,start_time,end_time,admin_key,callback)
    Severity: Minor
    Found in main_server/reval/reval.js - About 35 mins to fix

      A space is required after ','.
      Open

      var gitlab = require('./gitlab.js')('localhost',rootId,password);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

          hostname: 'localhost' ,//require('../config/conf.json').host.hostname,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Infix operators must be spaced.
      Open

      var password=require('/etc/main_server/conf.json').gitlab.password;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Unexpected var, use let or const instead.
      Open

       var main_server = 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

      var rootId=require('/etc/main_server/conf.json').gitlab.username;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

      var gitlab = require('./gitlab.js')('localhost',rootId,password);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      var gitlab = require('./gitlab.js')('localhost',rootId,password);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

      var async = require('async');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Expected indentation of 0 spaces but found 1.
      Open

       var main_server = 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Identifier 'main_server' is not in camel case.
      Open

       var main_server = 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Expected indentation of 3 spaces but found 0.
      Open

      {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Trailing spaces not allowed.
      Open

       var main_server = 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      A space is required after ','.
      Open

          hostname: 'localhost' ,//require('../config/conf.json').host.hostname,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

      var path = require('path')
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Identifier 'end_time' is not in camel case.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Identifier 'commit_date' is not in camel case.
      Open

                              var commit_date = new Date(commit["created_at"]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Infix operators must be spaced.
      Open

      var rootId=require('/etc/main_server/conf.json').gitlab.username;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      A space is required after ','.
      Open

      languages = ['cpp','cpp14','java','python2','python3'];
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

          var max_scores = {};
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected require().
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforce require() on the top-level module scope (global-require)

      In Node.js, module dependencies are included using the require() function, such as:

      var fs = require("fs");

      While require() may be called anywhere in code, some style guides prescribe that it should be called only in the top level of a module to make it easier to identify dependencies. For instance, it's arguably harder to identify dependencies when they are deeply nested inside of functions and other statements:

      function foo() {
      
          if (condition) {
              var fs = require("fs");
          }
      }

      Since require() does a synchronous load, it can cause performance problems when used in other locations.

      Further, ES6 modules mandate that import and export statements can only occur in the top level of the module's body.

      Rule Details

      This rule requires all calls to require() to be at the top level of the module, similar to ES6 import and export statements, which also can occur only at the top level.

      Examples of incorrect code for this rule:

      /*eslint global-require: "error"*/
      /*eslint-env es6*/
      
      // calling require() inside of a function is not allowed
      function readFile(filename, callback) {
          var fs = require('fs');
          fs.readFile(filename, callback)
      }
      
      // conditional requires like this are also not allowed
      if (DEBUG) { require('debug'); }
      
      // a require() in a switch statement is also flagged
      switch(x) { case '1': require('1'); break; }
      
      // you may not require() inside an arrow function body
      var getModule = (name) => require(name);
      
      // you may not require() inside of a function body as well
      function getModule(name) { return require(name); }
      
      // you may not require() inside of a try/catch block
      try {
          require(unsafeModule);
      } catch(e) {
          console.log(e);
      }

      Examples of correct code for this rule:

      /*eslint global-require: "error"*/
      
      // all these variations of require() are ok
      require('x');
      var y = require('y');
      var z;
      z = require('z').initialize();
      
      // requiring a module and using it in a function is ok
      var fs = require('fs');
      function readFile(filename, callback) {
          fs.readFile(filename, callback)
      }
      
      // you can use a ternary to determine which module to require
      var logger = DEBUG ? require('dev-logger') : require('logger');
      
      // if you want you can require() at the end of your module
      function doSomethingA() {}
      function doSomethingB() {}
      var x = require("x"),
          z = require("z");

      When Not To Use It

      If you have a module that must be initialized with information that comes from the file-system or if a module is only used in very rare situations and will cause significant overhead to load it may make sense to disable the rule. If you need to require() an optional dependency inside of a try/catch, you can disable this rule for just that dependency using the // eslint-disable-line global-require comment. Source: http://eslint.org/docs/rules/

      Expected indentation of 0 spaces but found 1 tab.
      Open

          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                          commits.filter(function(commit)              //Check if the commit is within the lab timings
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Opening curly brace does not appear on the same line as controlling statement.
      Open

                          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Expected space(s) after "if".
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Opening curly brace does not appear on the same line as controlling statement.
      Open

      {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Opening curly brace does not appear on the same line as controlling statement.
      Open

          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Expected indentation of 2 spaces but found 2 tabs.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected indentation of 2 spaces but found 3 tabs.
      Open

                  user = userList[i];                    
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Missing space before function parentheses.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Unexpected tab character.
      Open

                  {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected var, use let or const instead.
      Open

      var password=require('/etc/main_server/conf.json').gitlab.password;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              var commit_date = new Date(commit["created_at"]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected exception block, space or tab after '//' in comment.
      Open

          hostname: 'localhost' ,//require('../config/conf.json').host.hostname,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Requires or disallows a whitespace (space or tab) beginning a comment (spaced-comment)

      Some style guides require or disallow a whitespace immediately after the initial // or /* of a comment. Whitespace after the // or /* makes it easier to read text in comments. On the other hand, commenting out code is easier without having to put a whitespace right after the // or /*.

      Rule Details

      This rule will enforce consistency of spacing after the start of a comment // or /*. It also provides several exceptions for various documentation styles.

      Options

      The rule takes two options.

      • The first is a string which be either "always" or "never". The default is "always".

        • If "always" then the // or /* must be followed by at least one whitespace.
        • If "never" then there should be no whitespace following.
      • This rule can also take a 2nd option, an object with any of the following keys: "exceptions" and "markers".

        • The "exceptions" value is an array of string patterns which are considered exceptions to the rule. Please note that exceptions are ignored if the first argument is "never".
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
        • The "markers" value is an array of string patterns which are considered markers for docblock-style comments, such as an additional /, used to denote documentation read by doxygen, vsdoc, etc. which must have additional characters. The "markers" array will apply regardless of the value of the first argument, e.g. "always" or "never".
        "spaced-comment": ["error", "always", { "markers": ["/"] }]

      The difference between a marker and an exception is that a marker only appears at the beginning of the comment whereas exceptions can occur anywhere in the comment string.

      You can also define separate exceptions and markers for block and line comments. The "block" object can have an additional key "balanced", a boolean that specifies if inline block comments should have balanced spacing. The default value is false.

      • If "balanced": true and "always" then the /* must be followed by at least one whitespace, and the */ must be preceded by at least one whitespace.

      • If "balanced": true and "never" then there should be no whitespace following /* or preceding */.

      • If "balanced": false then balanced whitespace is not enforced.

      "spaced-comment": ["error", "always", {
          "line": {
              "markers": ["/"],
              "exceptions": ["-", "+"]
          },
          "block": {
              "markers": ["!"],
              "exceptions": ["*"],
              "balanced": true
          }
      }]

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint spaced-comment: ["error", "always"]*/
      
      //This is a comment with no whitespace at the beginning
      
      /*This is a comment with no whitespace at the beginning */
      /* eslint spaced-comment: ["error", "always", { "block": { "balanced": true } }] */
      /* This is a comment with whitespace at the beginning but not the end*/

      Examples of correct code for this rule with the "always" option:

      /* eslint spaced-comment: ["error", "always"] */
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /*
       * This is a comment with a whitespace at the beginning
       */
      
      /*
      This comment has a newline
      */
      /* eslint spaced-comment: ["error", "always"] */
      
      /**
      * I am jsdoc
      */

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /* \nThis is a comment with a whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never", { "block": { "balanced": true } }]*/
      /*This is a comment with whitespace at the end */

      Examples of correct code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      /*This is a comment with no whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never"]*/
      
      /**
      * I am jsdoc
      */

      exceptions

      Examples of incorrect code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      //------++++++++
      // Comment block
      //------++++++++
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      /*------++++++++*/
      /* Comment block */
      /*------++++++++*/
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      Examples of correct code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-"] }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["*"] }] */
      
      /****************
       * Comment block
       ****************/
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-+"] }] */
      
      //-+-+-+-+-+-+-+
      // Comment block
      //-+-+-+-+-+-+-+
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/
      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      markers

      Examples of incorrect code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      ///This is a comment with a marker but without whitespace
      /*eslint spaced-comment: ["error", "always", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*! This is a comment with a marker but without whitespace at the end*/
      /*eslint spaced-comment: ["error", "never", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*!This is a comment with a marker but with whitespace at the end */

      Examples of correct code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      /// This is a comment with a marker
      /*eslint spaced-comment: ["error", "never", { "markers": ["!<"] }]*/
      
      //!<this is a line comment with marker block subsequent lines are ignored></this>
      /* eslint spaced-comment: ["error", "always", { "markers": ["global"] }] */
      
      /*global ABC*/

      Related Rules

      Unexpected var, use let or const instead.
      Open

          var max_scores = {};
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected exception block, space or tab after '//' in comment.
      Open

          //Get all the commits from the userList for the specified lab 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Requires or disallows a whitespace (space or tab) beginning a comment (spaced-comment)

      Some style guides require or disallow a whitespace immediately after the initial // or /* of a comment. Whitespace after the // or /* makes it easier to read text in comments. On the other hand, commenting out code is easier without having to put a whitespace right after the // or /*.

      Rule Details

      This rule will enforce consistency of spacing after the start of a comment // or /*. It also provides several exceptions for various documentation styles.

      Options

      The rule takes two options.

      • The first is a string which be either "always" or "never". The default is "always".

        • If "always" then the // or /* must be followed by at least one whitespace.
        • If "never" then there should be no whitespace following.
      • This rule can also take a 2nd option, an object with any of the following keys: "exceptions" and "markers".

        • The "exceptions" value is an array of string patterns which are considered exceptions to the rule. Please note that exceptions are ignored if the first argument is "never".
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
        • The "markers" value is an array of string patterns which are considered markers for docblock-style comments, such as an additional /, used to denote documentation read by doxygen, vsdoc, etc. which must have additional characters. The "markers" array will apply regardless of the value of the first argument, e.g. "always" or "never".
        "spaced-comment": ["error", "always", { "markers": ["/"] }]

      The difference between a marker and an exception is that a marker only appears at the beginning of the comment whereas exceptions can occur anywhere in the comment string.

      You can also define separate exceptions and markers for block and line comments. The "block" object can have an additional key "balanced", a boolean that specifies if inline block comments should have balanced spacing. The default value is false.

      • If "balanced": true and "always" then the /* must be followed by at least one whitespace, and the */ must be preceded by at least one whitespace.

      • If "balanced": true and "never" then there should be no whitespace following /* or preceding */.

      • If "balanced": false then balanced whitespace is not enforced.

      "spaced-comment": ["error", "always", {
          "line": {
              "markers": ["/"],
              "exceptions": ["-", "+"]
          },
          "block": {
              "markers": ["!"],
              "exceptions": ["*"],
              "balanced": true
          }
      }]

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint spaced-comment: ["error", "always"]*/
      
      //This is a comment with no whitespace at the beginning
      
      /*This is a comment with no whitespace at the beginning */
      /* eslint spaced-comment: ["error", "always", { "block": { "balanced": true } }] */
      /* This is a comment with whitespace at the beginning but not the end*/

      Examples of correct code for this rule with the "always" option:

      /* eslint spaced-comment: ["error", "always"] */
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /*
       * This is a comment with a whitespace at the beginning
       */
      
      /*
      This comment has a newline
      */
      /* eslint spaced-comment: ["error", "always"] */
      
      /**
      * I am jsdoc
      */

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /* \nThis is a comment with a whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never", { "block": { "balanced": true } }]*/
      /*This is a comment with whitespace at the end */

      Examples of correct code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      /*This is a comment with no whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never"]*/
      
      /**
      * I am jsdoc
      */

      exceptions

      Examples of incorrect code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      //------++++++++
      // Comment block
      //------++++++++
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      /*------++++++++*/
      /* Comment block */
      /*------++++++++*/
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      Examples of correct code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-"] }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["*"] }] */
      
      /****************
       * Comment block
       ****************/
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-+"] }] */
      
      //-+-+-+-+-+-+-+
      // Comment block
      //-+-+-+-+-+-+-+
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/
      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      markers

      Examples of incorrect code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      ///This is a comment with a marker but without whitespace
      /*eslint spaced-comment: ["error", "always", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*! This is a comment with a marker but without whitespace at the end*/
      /*eslint spaced-comment: ["error", "never", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*!This is a comment with a marker but with whitespace at the end */

      Examples of correct code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      /// This is a comment with a marker
      /*eslint spaced-comment: ["error", "never", { "markers": ["!<"] }]*/
      
      //!<this is a line comment with marker block subsequent lines are ignored></this>
      /* eslint spaced-comment: ["error", "always", { "markers": ["global"] }] */
      
      /*global ABC*/

      Related Rules

      Unexpected tab character.
      Open

          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 2 spaces but found 2 tabs.
      Open

              console.log(token)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Opening curly brace does not appear on the same line as controlling statement.
      Open

              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Trailing spaces not allowed.
      Open

                  user = userList[i];                    
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Expected indentation of 2 spaces but found 1 tab.
      Open

          var number_of_requests=0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Infix operators must be spaced.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Infix operators must be spaced.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Unexpected function expression.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Expected exception block, space or tab after '//' in comment.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Requires or disallows a whitespace (space or tab) beginning a comment (spaced-comment)

      Some style guides require or disallow a whitespace immediately after the initial // or /* of a comment. Whitespace after the // or /* makes it easier to read text in comments. On the other hand, commenting out code is easier without having to put a whitespace right after the // or /*.

      Rule Details

      This rule will enforce consistency of spacing after the start of a comment // or /*. It also provides several exceptions for various documentation styles.

      Options

      The rule takes two options.

      • The first is a string which be either "always" or "never". The default is "always".

        • If "always" then the // or /* must be followed by at least one whitespace.
        • If "never" then there should be no whitespace following.
      • This rule can also take a 2nd option, an object with any of the following keys: "exceptions" and "markers".

        • The "exceptions" value is an array of string patterns which are considered exceptions to the rule. Please note that exceptions are ignored if the first argument is "never".
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
        • The "markers" value is an array of string patterns which are considered markers for docblock-style comments, such as an additional /, used to denote documentation read by doxygen, vsdoc, etc. which must have additional characters. The "markers" array will apply regardless of the value of the first argument, e.g. "always" or "never".
        "spaced-comment": ["error", "always", { "markers": ["/"] }]

      The difference between a marker and an exception is that a marker only appears at the beginning of the comment whereas exceptions can occur anywhere in the comment string.

      You can also define separate exceptions and markers for block and line comments. The "block" object can have an additional key "balanced", a boolean that specifies if inline block comments should have balanced spacing. The default value is false.

      • If "balanced": true and "always" then the /* must be followed by at least one whitespace, and the */ must be preceded by at least one whitespace.

      • If "balanced": true and "never" then there should be no whitespace following /* or preceding */.

      • If "balanced": false then balanced whitespace is not enforced.

      "spaced-comment": ["error", "always", {
          "line": {
              "markers": ["/"],
              "exceptions": ["-", "+"]
          },
          "block": {
              "markers": ["!"],
              "exceptions": ["*"],
              "balanced": true
          }
      }]

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint spaced-comment: ["error", "always"]*/
      
      //This is a comment with no whitespace at the beginning
      
      /*This is a comment with no whitespace at the beginning */
      /* eslint spaced-comment: ["error", "always", { "block": { "balanced": true } }] */
      /* This is a comment with whitespace at the beginning but not the end*/

      Examples of correct code for this rule with the "always" option:

      /* eslint spaced-comment: ["error", "always"] */
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /*
       * This is a comment with a whitespace at the beginning
       */
      
      /*
      This comment has a newline
      */
      /* eslint spaced-comment: ["error", "always"] */
      
      /**
      * I am jsdoc
      */

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /* \nThis is a comment with a whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never", { "block": { "balanced": true } }]*/
      /*This is a comment with whitespace at the end */

      Examples of correct code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      /*This is a comment with no whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never"]*/
      
      /**
      * I am jsdoc
      */

      exceptions

      Examples of incorrect code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      //------++++++++
      // Comment block
      //------++++++++
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      /*------++++++++*/
      /* Comment block */
      /*------++++++++*/
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      Examples of correct code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-"] }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["*"] }] */
      
      /****************
       * Comment block
       ****************/
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-+"] }] */
      
      //-+-+-+-+-+-+-+
      // Comment block
      //-+-+-+-+-+-+-+
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/
      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      markers

      Examples of incorrect code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      ///This is a comment with a marker but without whitespace
      /*eslint spaced-comment: ["error", "always", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*! This is a comment with a marker but without whitespace at the end*/
      /*eslint spaced-comment: ["error", "never", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*!This is a comment with a marker but with whitespace at the end */

      Examples of correct code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      /// This is a comment with a marker
      /*eslint spaced-comment: ["error", "never", { "markers": ["!<"] }]*/
      
      //!<this is a line comment with marker block subsequent lines are ignored></this>
      /* eslint spaced-comment: ["error", "always", { "markers": ["global"] }] */
      
      /*global ABC*/

      Related Rules

      Opening curly brace does not appear on the same line as controlling statement.
      Open

                      {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Unexpected tab character.
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

      languages = ['cpp','cpp14','java','python2','python3'];
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Missing space before function parentheses.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Infix operators must be spaced.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      A space is required after ','.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected indentation of 3 spaces but found 0.
      Open

      }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected var, use let or const instead.
      Open

      var userList = fs.readFileSync(path.join(__dirname + '/..' + '/userList')).toString('utf-8').split('\n');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Identifier 'admin_key' is not in camel case.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected unnamed function.
      Open

          socket.on('error',function(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      A space is required after ','.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Missing space before function parentheses.
      Open

                          commits.filter(function(commit)              //Check if the commit is within the lab timings
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Identifier 'start_time' is not in camel case.
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

          port: '9000'     //require('../config/conf.json').host_port.port
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected var, use let or const instead.
      Open

          var number_of_requests=0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Identifier 'number_of_requests' is not in camel case.
      Open

          var number_of_requests=0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected function expression.
      Open

          socket.on('error',function(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Missing space before function parentheses.
      Open

          socket.on('error',function(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Missing semicolon.
      Open

              console.log(token)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                  user = userList[i];                    
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 5 tabs.
      Open

                          commits.filter(function(commit)              //Check if the commit is within the lab timings
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

                          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'commit_date' is not in camel case.
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

      userList.pop()
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      languages = ['cpp','cpp14','java','python2','python3'];
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected unnamed function.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Opening curly brace does not appear on the same line as controlling statement.
      Open

          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Expected space(s) after "for".
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Unexpected function expression.
      Open

                          commits.filter(function(commit)              //Check if the commit is within the lab timings
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Missing semicolon.
      Open

      console.log(userList)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Block must not be padded by blank lines.
      Open

      {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow padding within blocks (padded-blocks)

      Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

      if (a) {
      
          b();
      
      }

      Since it's good to have a consistent code style, you should either always write padded blocks or never do it.

      Rule Details

      This rule enforces consistent empty line padding within blocks.

      Options

      This rule has one option, which can be a string option or an object option.

      String option:

      • "always" (default) requires empty lines at the beginning and ending of block statements (except switch statements and classes)
      • "never" disallows empty lines at the beginning and ending of block statements (except switch statements and classes)

      Object option:

      • "blocks" require or disallow padding within block statements
      • "classes" require or disallow padding within classes
      • "switches" require or disallow padding within switch statements

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      blocks

      Examples of incorrect code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      Examples of incorrect code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      classes

      Examples of incorrect code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
          constructor(){
          }
      }

      Examples of correct code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of incorrect code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of correct code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
          constructor(){
          }
      }

      switches

      Examples of incorrect code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
          case 0: foo();
      }

      Examples of correct code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }
      
      if (a) {
          b();
      }

      Examples of incorrect code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }

      Examples of correct code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
          case 0: foo();
      }
      
      if (a) {
      
          b();
      
      }

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of padding within blocks. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 1 tab.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected string concatenation.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using template literals instead of string concatenation. (prefer-template)

      In ES2015 (ES6), we can use template literals instead of string concatenation.

      var str = "Hello, " + name + "!";
      /*eslint-env es6*/
      
      var str = `Hello, ${name}!`;

      Rule Details

      This rule is aimed to flag usage of + operators with strings.

      Examples

      Examples of incorrect code for this rule:

      /*eslint prefer-template: "error"*/
      
      var str = "Hello, " + name + "!";
      var str = "Time: " + (12 * 60 * 60 * 1000);

      Examples of correct code for this rule:

      /*eslint prefer-template: "error"*/
      /*eslint-env es6*/
      
      var str = "Hello World!";
      var str = `Hello, ${name}!`;
      var str = `Time: ${12 * 60 * 60 * 1000}`;
      
      // This is reported by `no-useless-concat`.
      var str = "Hello, " + "World!";

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about string concatenation, you can safely disable this rule.

      Related Rules

      Infix operators must be spaced.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Unexpected tab character.
      Open

          socket.on('error',function(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

              console.log(token)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      All 'var' declarations must be at the top of the function scope.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Variable Declarations to be at the top of their scope (vars-on-top)

      The vars-on-top rule generates warnings when variable declarations are not used serially at the top of a function scope or the top of a program. By default variable declarations are always moved (“hoisted”) invisibly to the top of their containing scope by the JavaScript interpreter. This rule forces the programmer to represent that behaviour by manually moving the variable declaration to the top of its containing scope.

      Rule Details

      This rule aims to keep all variable declarations in the leading series of statements. Allowing multiple declarations helps promote maintainability and is thus allowed.

      Examples of incorrect code for this rule:

      /*eslint vars-on-top: "error"*/
      
      // Variable declarations in a block:
      function doSomething() {
          var first;
          if (true) {
              first = true;
          }
          var second;
      }
      
      // Variable declaration in for initializer:
      function doSomething() {
          for (var i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      // Variables after other statements:
      f();
      var a;

      Examples of correct code for this rule:

      /*eslint vars-on-top: "error"*/
      
      function doSomething() {
          var first;
          var second; //multiple declarations are allowed at the top
          if (true) {
              first = true;
          }
      }
      
      function doSomething() {
          var i;
          for (i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      var a;
      f();
      /*eslint vars-on-top: "error"*/
      
      // Directives may precede variable declarations.
      "use strict";
      var a;
      f();
      
      // Comments can describe variables.
      function doSomething() {
          // this is the first var.
          var first;
          // this is the second var.
          var second
      }

      Further Reading

      Missing whitespace after semicolon.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforce spacing before and after semicolons (semi-spacing)

      JavaScript allows you to place unnecessary spaces before or after a semicolon.

      Disallowing or enforcing space around a semicolon can improve the readability of your program.

      var a = "b" ;
      
      var c = "d";var e = "f";

      Rule Details

      This rule aims to enforce spacing around a semicolon. This rule prevents the use of spaces before a semicolon in expressions.

      This rule doesn't check spacing in the following cases:

      • The spacing after the semicolon if it is the first token in the line.

      • The spacing before the semicolon if it is after an opening parenthesis (( or {), or the spacing after the semicolon if it is before a closing parenthesis () or }). That spacing is checked by space-in-parens or block-spacing.

      • The spacing around the semicolon in a for loop with an empty condition (for(;;)).

      Options

      The rule takes one option, an object, which has two keys before and after having boolean values true or false. If before is true, space is enforced before semicolons and if it's false, space is disallowed before semicolons. If after is true, space is enforced after semicolons and if it's false, space is disallowed after semicolons. The after option will be only applied if a semicolon is not at the end of line.

      The default is {"before": false, "after": true}.

      "semi-spacing": ["error", {"before": false, "after": true}]

      {"before": false, "after": true}

      This is the default option. It enforces spacing after semicolons and disallows spacing before semicolons.

      Examples of incorrect code for this rule:

      /*eslint semi-spacing: "error"*/
      
      var foo ;
      var foo;var bar;
      throw new Error("error") ;
      while (a) { break ; }
      for (i = 0 ; i < 10 ; i++) {}
      for (i = 0;i < 10;i++) {}

      Examples of correct code for this rule:

      /*eslint semi-spacing: "error"*/
      
      var foo;
      var foo; var bar;
      throw new Error("error");
      while (a) { break; }
      for (i = 0; i < 10; i++) {}
      for (;;) {}
      if (true) {;}
      ;foo();

      {"before": true, "after": false}

      This option enforces spacing before semicolons and disallows spacing after semicolons.

      Examples of incorrect code for this rule with the {"before": true, "after": false} option:

      /*eslint semi-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo;
      var foo ; var bar;
      throw new Error("error");
      while (a) { break; }
      for (i = 0;i < 10;i++) {}
      for (i = 0; i < 10; i++) {}

      Examples of correct code for this rule with the {"before": true, "after": false} option:

      /*eslint semi-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo ;
      var foo ;var bar ;
      throw new Error("error") ;
      while (a) {break ;}
      for (i = 0 ;i < 10 ;i++) {}

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before or after semicolons.

      Related Rules

      • [semi](semi.md)
      • [no-extra-semi](no-extra-semi.md)
      • [comma-spacing](comma-spacing.md)
      • [block-spacing](block-spacing.md)
      • [space-in-parens](space-in-parens.md) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                      {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'commit_date' is not in camel case.
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

      var path = require('path')
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Unexpected string concatenation.
      Open

      var userList = fs.readFileSync(path.join(__dirname + '/..' + '/userList')).toString('utf-8').split('\n');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using template literals instead of string concatenation. (prefer-template)

      In ES2015 (ES6), we can use template literals instead of string concatenation.

      var str = "Hello, " + name + "!";
      /*eslint-env es6*/
      
      var str = `Hello, ${name}!`;

      Rule Details

      This rule is aimed to flag usage of + operators with strings.

      Examples

      Examples of incorrect code for this rule:

      /*eslint prefer-template: "error"*/
      
      var str = "Hello, " + name + "!";
      var str = "Time: " + (12 * 60 * 60 * 1000);

      Examples of correct code for this rule:

      /*eslint prefer-template: "error"*/
      /*eslint-env es6*/
      
      var str = "Hello World!";
      var str = `Hello, ${name}!`;
      var str = `Time: ${12 * 60 * 60 * 1000}`;
      
      // This is reported by `no-useless-concat`.
      var str = "Hello, " + "World!";

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about string concatenation, you can safely disable this rule.

      Related Rules

      A space is required after ','.
      Open

      languages = ['cpp','cpp14','java','python2','python3'];
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected exception block, space or tab after '//' in comment.
      Open

      //start_time and end_time are JavaScript Date objects
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Requires or disallows a whitespace (space or tab) beginning a comment (spaced-comment)

      Some style guides require or disallow a whitespace immediately after the initial // or /* of a comment. Whitespace after the // or /* makes it easier to read text in comments. On the other hand, commenting out code is easier without having to put a whitespace right after the // or /*.

      Rule Details

      This rule will enforce consistency of spacing after the start of a comment // or /*. It also provides several exceptions for various documentation styles.

      Options

      The rule takes two options.

      • The first is a string which be either "always" or "never". The default is "always".

        • If "always" then the // or /* must be followed by at least one whitespace.
        • If "never" then there should be no whitespace following.
      • This rule can also take a 2nd option, an object with any of the following keys: "exceptions" and "markers".

        • The "exceptions" value is an array of string patterns which are considered exceptions to the rule. Please note that exceptions are ignored if the first argument is "never".
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
        • The "markers" value is an array of string patterns which are considered markers for docblock-style comments, such as an additional /, used to denote documentation read by doxygen, vsdoc, etc. which must have additional characters. The "markers" array will apply regardless of the value of the first argument, e.g. "always" or "never".
        "spaced-comment": ["error", "always", { "markers": ["/"] }]

      The difference between a marker and an exception is that a marker only appears at the beginning of the comment whereas exceptions can occur anywhere in the comment string.

      You can also define separate exceptions and markers for block and line comments. The "block" object can have an additional key "balanced", a boolean that specifies if inline block comments should have balanced spacing. The default value is false.

      • If "balanced": true and "always" then the /* must be followed by at least one whitespace, and the */ must be preceded by at least one whitespace.

      • If "balanced": true and "never" then there should be no whitespace following /* or preceding */.

      • If "balanced": false then balanced whitespace is not enforced.

      "spaced-comment": ["error", "always", {
          "line": {
              "markers": ["/"],
              "exceptions": ["-", "+"]
          },
          "block": {
              "markers": ["!"],
              "exceptions": ["*"],
              "balanced": true
          }
      }]

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint spaced-comment: ["error", "always"]*/
      
      //This is a comment with no whitespace at the beginning
      
      /*This is a comment with no whitespace at the beginning */
      /* eslint spaced-comment: ["error", "always", { "block": { "balanced": true } }] */
      /* This is a comment with whitespace at the beginning but not the end*/

      Examples of correct code for this rule with the "always" option:

      /* eslint spaced-comment: ["error", "always"] */
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /*
       * This is a comment with a whitespace at the beginning
       */
      
      /*
      This comment has a newline
      */
      /* eslint spaced-comment: ["error", "always"] */
      
      /**
      * I am jsdoc
      */

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /* \nThis is a comment with a whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never", { "block": { "balanced": true } }]*/
      /*This is a comment with whitespace at the end */

      Examples of correct code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      /*This is a comment with no whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never"]*/
      
      /**
      * I am jsdoc
      */

      exceptions

      Examples of incorrect code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      //------++++++++
      // Comment block
      //------++++++++
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      /*------++++++++*/
      /* Comment block */
      /*------++++++++*/
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      Examples of correct code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-"] }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["*"] }] */
      
      /****************
       * Comment block
       ****************/
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-+"] }] */
      
      //-+-+-+-+-+-+-+
      // Comment block
      //-+-+-+-+-+-+-+
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/
      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      markers

      Examples of incorrect code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      ///This is a comment with a marker but without whitespace
      /*eslint spaced-comment: ["error", "always", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*! This is a comment with a marker but without whitespace at the end*/
      /*eslint spaced-comment: ["error", "never", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*!This is a comment with a marker but with whitespace at the end */

      Examples of correct code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      /// This is a comment with a marker
      /*eslint spaced-comment: ["error", "never", { "markers": ["!<"] }]*/
      
      //!<this is a line comment with marker block subsequent lines are ignored></this>
      /* eslint spaced-comment: ["error", "always", { "markers": ["global"] }] */
      
      /*global ABC*/

      Related Rules

      Infix operators must be spaced.
      Open

          var number_of_requests=0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Expected indentation of 2 spaces but found 1 tab.
      Open

          socket.on('error',function(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Trailing spaces not allowed.
      Open

                      
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Unexpected unnamed function.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Unexpected var, use let or const instead.
      Open

                              var commit_date = new Date(commit["created_at"]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 1 tab.
      Open

          var max_scores = {};
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Identifier 'max_scores' is not in camel case.
      Open

          var max_scores = {};
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

              console.log(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Trailing spaces not allowed.
      Open

          //Get all the commits from the userList for the specified lab 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Unexpected tab character.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected function expression.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                              var commit_date = new Date(commit["created_at"]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'end_time' is not in camel case.
      Open

                              if(commit_date >= start_time && commit_date <= end_time) return true;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Expected indentation of 5 spaces but found 1 tab.
      Open

          hostname: 'localhost' ,//require('../config/conf.json').host.hostname,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      There should be no space before ','.
      Open

          hostname: 'localhost' ,//require('../config/conf.json').host.hostname,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

      var fs = require('fs');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Trailing spaces not allowed.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Strings must use singlequote.
      Open

                              var commit_date = new Date(commit["created_at"]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce the consistent use of either backticks, double, or single quotes (quotes)

      JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

      /*eslint-env es6*/
      
      var double = "double";
      var single = 'single';
      var backtick = `backtick`;    // ES6 only

      Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

      Many codebases require strings to be defined in a consistent manner.

      Rule Details

      This rule enforces the consistent use of either backticks, double, or single quotes.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "double" (default) requires the use of double quotes wherever possible
      • "single" requires the use of single quotes wherever possible
      • "backtick" requires the use of backticks wherever possible

      Object option:

      • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
      • "allowTemplateLiterals": true allows strings to use backticks

      Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

      double

      Examples of incorrect code for this rule with the default "double" option:

      /*eslint quotes: ["error", "double"]*/
      
      var single = 'single';
      var unescaped = 'a string containing "double" quotes';

      Examples of correct code for this rule with the default "double" option:

      /*eslint quotes: ["error", "double"]*/
      /*eslint-env es6*/
      
      var double = "double";
      var backtick = `back\ntick`;  // backticks are allowed due to newline
      var backtick = tag`backtick`; // backticks are allowed due to tag

      single

      Examples of incorrect code for this rule with the "single" option:

      /*eslint quotes: ["error", "single"]*/
      
      var double = "double";
      var unescaped = "a string containing 'single' quotes";

      Examples of correct code for this rule with the "single" option:

      /*eslint quotes: ["error", "single"]*/
      /*eslint-env es6*/
      
      var single = 'single';
      var backtick = `back${x}tick`; // backticks are allowed due to substitution

      backticks

      Examples of incorrect code for this rule with the "backtick" option:

      /*eslint quotes: ["error", "backtick"]*/
      
      var single = 'single';
      var double = "double";
      var unescaped = 'a string containing `backticks`';

      Examples of correct code for this rule with the "backtick" option:

      /*eslint quotes: ["error", "backtick"]*/
      /*eslint-env es6*/
      
      var backtick = `backtick`;

      avoidEscape

      Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

      /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
      
      var single = 'a string containing "double" quotes';

      Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

      /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
      
      var double = "a string containing 'single' quotes";

      Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

      /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
      
      var double = "a string containing `backtick` quotes"

      allowTemplateLiterals

      Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

      /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
      
      var double = "double";
      var double = `double`;

      Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

      /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
      
      var single = 'single';
      var single = `single`;

      When Not To Use It

      If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Expected indentation of 5 spaces but found 1 tab.
      Open

          port: '9000'     //require('../config/conf.json').host_port.port
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

          //Get all the commits from the userList for the specified lab 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Infix operators must be spaced.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Missing whitespace after semicolon.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforce spacing before and after semicolons (semi-spacing)

      JavaScript allows you to place unnecessary spaces before or after a semicolon.

      Disallowing or enforcing space around a semicolon can improve the readability of your program.

      var a = "b" ;
      
      var c = "d";var e = "f";

      Rule Details

      This rule aims to enforce spacing around a semicolon. This rule prevents the use of spaces before a semicolon in expressions.

      This rule doesn't check spacing in the following cases:

      • The spacing after the semicolon if it is the first token in the line.

      • The spacing before the semicolon if it is after an opening parenthesis (( or {), or the spacing after the semicolon if it is before a closing parenthesis () or }). That spacing is checked by space-in-parens or block-spacing.

      • The spacing around the semicolon in a for loop with an empty condition (for(;;)).

      Options

      The rule takes one option, an object, which has two keys before and after having boolean values true or false. If before is true, space is enforced before semicolons and if it's false, space is disallowed before semicolons. If after is true, space is enforced after semicolons and if it's false, space is disallowed after semicolons. The after option will be only applied if a semicolon is not at the end of line.

      The default is {"before": false, "after": true}.

      "semi-spacing": ["error", {"before": false, "after": true}]

      {"before": false, "after": true}

      This is the default option. It enforces spacing after semicolons and disallows spacing before semicolons.

      Examples of incorrect code for this rule:

      /*eslint semi-spacing: "error"*/
      
      var foo ;
      var foo;var bar;
      throw new Error("error") ;
      while (a) { break ; }
      for (i = 0 ; i < 10 ; i++) {}
      for (i = 0;i < 10;i++) {}

      Examples of correct code for this rule:

      /*eslint semi-spacing: "error"*/
      
      var foo;
      var foo; var bar;
      throw new Error("error");
      while (a) { break; }
      for (i = 0; i < 10; i++) {}
      for (;;) {}
      if (true) {;}
      ;foo();

      {"before": true, "after": false}

      This option enforces spacing before semicolons and disallows spacing after semicolons.

      Examples of incorrect code for this rule with the {"before": true, "after": false} option:

      /*eslint semi-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo;
      var foo ; var bar;
      throw new Error("error");
      while (a) { break; }
      for (i = 0;i < 10;i++) {}
      for (i = 0; i < 10; i++) {}

      Examples of correct code for this rule with the {"before": true, "after": false} option:

      /*eslint semi-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo ;
      var foo ;var bar ;
      throw new Error("error") ;
      while (a) {break ;}
      for (i = 0 ;i < 10 ;i++) {}

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before or after semicolons.

      Related Rules

      • [semi](semi.md)
      • [no-extra-semi](no-extra-semi.md)
      • [comma-spacing](comma-spacing.md)
      • [block-spacing](block-spacing.md)
      • [space-in-parens](space-in-parens.md) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 3 tabs.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      A space is required after ','.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Block must not be padded by blank lines.
      Open

                  {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow padding within blocks (padded-blocks)

      Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

      if (a) {
      
          b();
      
      }

      Since it's good to have a consistent code style, you should either always write padded blocks or never do it.

      Rule Details

      This rule enforces consistent empty line padding within blocks.

      Options

      This rule has one option, which can be a string option or an object option.

      String option:

      • "always" (default) requires empty lines at the beginning and ending of block statements (except switch statements and classes)
      • "never" disallows empty lines at the beginning and ending of block statements (except switch statements and classes)

      Object option:

      • "blocks" require or disallow padding within block statements
      • "classes" require or disallow padding within classes
      • "switches" require or disallow padding within switch statements

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      blocks

      Examples of incorrect code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      Examples of incorrect code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      classes

      Examples of incorrect code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
          constructor(){
          }
      }

      Examples of correct code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of incorrect code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of correct code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
          constructor(){
          }
      }

      switches

      Examples of incorrect code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
          case 0: foo();
      }

      Examples of correct code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }
      
      if (a) {
          b();
      }

      Examples of incorrect code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }

      Examples of correct code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
          case 0: foo();
      }
      
      if (a) {
      
          b();
      
      }

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of padding within blocks. Source: http://eslint.org/docs/rules/

      Expected exception block, space or tab after '//' in comment.
      Open

                          commits.filter(function(commit)              //Check if the commit is within the lab timings
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Requires or disallows a whitespace (space or tab) beginning a comment (spaced-comment)

      Some style guides require or disallow a whitespace immediately after the initial // or /* of a comment. Whitespace after the // or /* makes it easier to read text in comments. On the other hand, commenting out code is easier without having to put a whitespace right after the // or /*.

      Rule Details

      This rule will enforce consistency of spacing after the start of a comment // or /*. It also provides several exceptions for various documentation styles.

      Options

      The rule takes two options.

      • The first is a string which be either "always" or "never". The default is "always".

        • If "always" then the // or /* must be followed by at least one whitespace.
        • If "never" then there should be no whitespace following.
      • This rule can also take a 2nd option, an object with any of the following keys: "exceptions" and "markers".

        • The "exceptions" value is an array of string patterns which are considered exceptions to the rule. Please note that exceptions are ignored if the first argument is "never".
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
        • The "markers" value is an array of string patterns which are considered markers for docblock-style comments, such as an additional /, used to denote documentation read by doxygen, vsdoc, etc. which must have additional characters. The "markers" array will apply regardless of the value of the first argument, e.g. "always" or "never".
        "spaced-comment": ["error", "always", { "markers": ["/"] }]

      The difference between a marker and an exception is that a marker only appears at the beginning of the comment whereas exceptions can occur anywhere in the comment string.

      You can also define separate exceptions and markers for block and line comments. The "block" object can have an additional key "balanced", a boolean that specifies if inline block comments should have balanced spacing. The default value is false.

      • If "balanced": true and "always" then the /* must be followed by at least one whitespace, and the */ must be preceded by at least one whitespace.

      • If "balanced": true and "never" then there should be no whitespace following /* or preceding */.

      • If "balanced": false then balanced whitespace is not enforced.

      "spaced-comment": ["error", "always", {
          "line": {
              "markers": ["/"],
              "exceptions": ["-", "+"]
          },
          "block": {
              "markers": ["!"],
              "exceptions": ["*"],
              "balanced": true
          }
      }]

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint spaced-comment: ["error", "always"]*/
      
      //This is a comment with no whitespace at the beginning
      
      /*This is a comment with no whitespace at the beginning */
      /* eslint spaced-comment: ["error", "always", { "block": { "balanced": true } }] */
      /* This is a comment with whitespace at the beginning but not the end*/

      Examples of correct code for this rule with the "always" option:

      /* eslint spaced-comment: ["error", "always"] */
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /*
       * This is a comment with a whitespace at the beginning
       */
      
      /*
      This comment has a newline
      */
      /* eslint spaced-comment: ["error", "always"] */
      
      /**
      * I am jsdoc
      */

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /* \nThis is a comment with a whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never", { "block": { "balanced": true } }]*/
      /*This is a comment with whitespace at the end */

      Examples of correct code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      /*This is a comment with no whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never"]*/
      
      /**
      * I am jsdoc
      */

      exceptions

      Examples of incorrect code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      //------++++++++
      // Comment block
      //------++++++++
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      /*------++++++++*/
      /* Comment block */
      /*------++++++++*/
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      Examples of correct code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-"] }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["*"] }] */
      
      /****************
       * Comment block
       ****************/
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-+"] }] */
      
      //-+-+-+-+-+-+-+
      // Comment block
      //-+-+-+-+-+-+-+
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/
      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      markers

      Examples of incorrect code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      ///This is a comment with a marker but without whitespace
      /*eslint spaced-comment: ["error", "always", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*! This is a comment with a marker but without whitespace at the end*/
      /*eslint spaced-comment: ["error", "never", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*!This is a comment with a marker but with whitespace at the end */

      Examples of correct code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      /// This is a comment with a marker
      /*eslint spaced-comment: ["error", "never", { "markers": ["!<"] }]*/
      
      //!<this is a line comment with marker block subsequent lines are ignored></this>
      /* eslint spaced-comment: ["error", "always", { "markers": ["global"] }] */
      
      /*global ABC*/

      Related Rules

      ["created_at"] is better written in dot notation.
      Open

                              var commit_date = new Date(commit["created_at"]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Dot Notation (dot-notation)

      In JavaScript, one can access properties using the dot notation (foo.bar) or square-bracket notation (foo["bar"]). However, the dot notation is often preferred because it is easier to read, less verbose, and works better with aggressive JavaScript minimizers.

      foo["bar"];

      Rule Details

      This rule is aimed at maintaining code consistency and improving code readability by encouraging use of the dot notation style whenever possible. As such, it will warn when it encounters an unnecessary use of square-bracket notation.

      Examples of incorrect code for this rule:

      /*eslint dot-notation: "error"*/
      
      var x = foo["bar"];

      Examples of correct code for this rule:

      /*eslint dot-notation: "error"*/
      
      var x = foo.bar;
      
      var x = foo[bar];    // Property name is a variable, square-bracket notation required

      Options

      This rule accepts a single options argument:

      • Set the allowKeywords option to false (default is true) to follow ECMAScript version 3 compatible style, avoiding dot notation for reserved word properties.
      • Set the allowPattern option to a regular expression string to allow bracket notation for property names that match a pattern (by default, no pattern is tested).

      allowKeywords

      Examples of correct code for the { "allowKeywords": false } option:

      /*eslint dot-notation: ["error", { "allowKeywords": false }]*/
      
      var foo = { "class": "CS 101" }
      var x = foo["class"]; // Property name is a reserved word, square-bracket notation required

      allowPattern

      For example, when preparing data to be sent to an external API, it is often required to use property names that include underscores. If the camelcase rule is in effect, these snake case properties would not be allowed. By providing an allowPattern to the dot-notation rule, these snake case properties can be accessed with bracket notation.

      Examples of correct code for the sample { "allowPattern": "^[a-z]+(_[a-z]+)+$" } option:

      /*eslint camelcase: "error"*/
      /*eslint dot-notation: ["error", { "allowPattern": "^[a-z]+(_[a-z]+)+$" }]*/
      
      var data = {};
      data.foo_bar = 42;
      
      var data = {};
      data["fooBar"] = 42;
      
      var data = {};
      data["foo_bar"] = 42; // no warning

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

      Unexpected tab character.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 0 spaces but found 5 tabs.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

                              var total_score =0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unnecessary 'else' after 'return'.
      Open

                              else return false;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow return before else (no-else-return)

      If an if block contains a return statement, the else block becomes unnecessary. Its contents can be placed outside of the block.

      function foo() {
          if (x) {
              return y;
          } else {
              return z;
          }
      }

      Rule Details

      This rule is aimed at highlighting an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.

      Examples of incorrect code for this rule:

      /*eslint no-else-return: "error"*/
      
      function foo() {
          if (x) {
              return y;
          } else {
              return z;
          }
      }
      
      function foo() {
          if (x) {
              return y;
          } else if (z) {
              return w;
          } else {
              return t;
          }
      }
      
      function foo() {
          if (x) {
              return y;
          } else {
              var t = "foo";
          }
      
          return t;
      }
      
      // Two warnings for nested occurrences
      function foo() {
          if (x) {
              if (y) {
                  return y;
              } else {
                  return x;
              }
          } else {
              return z;
          }
      }

      Examples of correct code for this rule:

      /*eslint no-else-return: "error"*/
      
      function foo() {
          if (x) {
              return y;
          }
      
          return z;
      }
      
      function foo() {
          if (x) {
              return y;
          } else if (z) {
              var t = "foo";
          } else {
              return w;
          }
      }
      
      function foo() {
          if (x) {
              if (z) {
                  return y;
              }
          } else {
              return z;
          }
      }

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

      Identifier 'total_score' is not in camel case.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Opening curly brace does not appear on the same line as controlling statement.
      Open

      {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Expected indentation of 2 spaces but found 5 tabs.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected indentation of 2 spaces but found 2 tabs.
      Open

              return function(call)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      All 'var' declarations must be at the top of the function scope.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Variable Declarations to be at the top of their scope (vars-on-top)

      The vars-on-top rule generates warnings when variable declarations are not used serially at the top of a function scope or the top of a program. By default variable declarations are always moved (“hoisted”) invisibly to the top of their containing scope by the JavaScript interpreter. This rule forces the programmer to represent that behaviour by manually moving the variable declaration to the top of its containing scope.

      Rule Details

      This rule aims to keep all variable declarations in the leading series of statements. Allowing multiple declarations helps promote maintainability and is thus allowed.

      Examples of incorrect code for this rule:

      /*eslint vars-on-top: "error"*/
      
      // Variable declarations in a block:
      function doSomething() {
          var first;
          if (true) {
              first = true;
          }
          var second;
      }
      
      // Variable declaration in for initializer:
      function doSomething() {
          for (var i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      // Variables after other statements:
      f();
      var a;

      Examples of correct code for this rule:

      /*eslint vars-on-top: "error"*/
      
      function doSomething() {
          var first;
          var second; //multiple declarations are allowed at the top
          if (true) {
              first = true;
          }
      }
      
      function doSomething() {
          var i;
          for (i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      var a;
      f();
      /*eslint vars-on-top: "error"*/
      
      // Directives may precede variable declarations.
      "use strict";
      var a;
      f();
      
      // Comments can describe variables.
      function doSomething() {
          // this is the first var.
          var first;
          // this is the second var.
          var second
      }

      Further Reading

      Unexpected function expression.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Trailing spaces not allowed.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Identifier 'total_score' is not in camel case.
      Open

                              else max_scores[data.id_no]=total_score;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Missing space before value for key 'labName'.
      Open

                                           labName:lab,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing between keys and values in object literal properties (key-spacing)

      This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

      Rule Details

      This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

      Options

      This rule has an object option:

      • "beforeColon": false (default) disallows spaces between the key and the colon in object literals.
      • "beforeColon": true requires at least one space between the key and the colon in object literals.
      • "afterColon": true (default) requires at least one space between the colon and the value in object literals.
      • "afterColon": false disallows spaces between the colon and the value in object literals.
      • "mode": "strict" (default) enforces exactly one space before or after colons in object literals.
      • "mode": "minimum" enforces one or more spaces before or after colons in object literals.
      • "align": "value" enforces horizontal alignment of values in object literals.
      • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
      • "align" with an object value allows for fine-grained spacing when values are being aligned in object literals.
      • "singleLine" specifies a spacing style for single-line object literals.
      • "multiLine" specifies a spacing style for multi-line object literals.

      Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

      beforeColon

      Examples of incorrect code for this rule with the default { "beforeColon": false } option:

      /*eslint key-spacing: ["error", { "beforeColon": false }]*/
      
      var obj = { "foo" : 42 };

      Examples of correct code for this rule with the default { "beforeColon": false } option:

      /*eslint key-spacing: ["error", { "beforeColon": false }]*/
      
      var obj = { "foo": 42 };

      Examples of incorrect code for this rule with the { "beforeColon": true } option:

      /*eslint key-spacing: ["error", { "beforeColon": true }]*/
      
      var obj = { "foo": 42 };

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

      /*eslint key-spacing: ["error", { "beforeColon": true }]*/
      
      var obj = { "foo" : 42 };

      afterColon

      Examples of incorrect code for this rule with the default { "afterColon": true } option:

      /*eslint key-spacing: ["error", { "afterColon": true }]*/
      
      var obj = { "foo":42 };

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

      /*eslint key-spacing: ["error", { "afterColon": true }]*/
      
      var obj = { "foo": 42 };

      Examples of incorrect code for this rule with the { "afterColon": false } option:

      /*eslint key-spacing: ["error", { "afterColon": false }]*/
      
      var obj = { "foo": 42 };

      Examples of correct code for this rule with the { "afterColon": false } option:

      /*eslint key-spacing: ["error", { "afterColon": false }]*/
      
      var obj = { "foo":42 };

      mode

      Examples of incorrect code for this rule with the default { "mode": "strict" } option:

      /*eslint key-spacing: ["error", { "mode": "strict" }]*/
      
      call({
          foobar: 42,
          bat:    2 * 2
      });

      Examples of correct code for this rule with the default { "mode": "strict" } option:

      /*eslint key-spacing: ["error", { "mode": "strict" }]*/
      
      call({
          foobar: 42,
          bat: 2 * 2
      });

      Examples of correct code for this rule with the { "mode": "minimum" } option:

      /*eslint key-spacing: ["error", { "mode": "minimum" }]*/
      
      call({
          foobar: 42,
          bat:    2 * 2
      });

      align

      Examples of incorrect code for this rule with the { "align": "value" } option:

      /*eslint key-spacing: ["error", { "align": "value" }]*/
      
      var obj = {
          a: value,
          bcde:  42,
          fg :   foo()
      };

      Examples of correct code for this rule with the { "align": "value" } option:

      /*eslint key-spacing: ["error", { "align": "value" }]*/
      
      var obj = {
          a:    value,
          bcde: 42,
      
          fg: foo(),
          h:  function() {
              return this.a;
          },
          ijkl: 'Non-consecutive lines form a new group'
      };
      
      var obj = { a: "foo", longPropertyName: "bar" };

      Examples of incorrect code for this rule with the { "align": "colon" } option:

      /*eslint key-spacing: ["error", { "align": "colon" }]*/
      
      call({
          foobar: 42,
          bat:    2 * 2
      });

      Examples of correct code for this rule with the { "align": "colon" } option:

      /*eslint key-spacing: ["error", { "align": "colon" }]*/
      
      call({
          foobar: 42,
          bat   : 2 * 2
      });

      align

      The align option can take additional configuration through the beforeColon, afterColon, mode, and on options.

      If align is defined as an object, but not all of the parameters are provided, undefined parameters will default to the following:

      // Defaults
      align: {
          "beforeColon": false,
          "afterColon": true,
          "on": "colon",
          "mode": "strict"
      }

      Examples of correct code for this rule with sample { "align": { } } options:

      /*eslint key-spacing: ["error", {
          "align": {
              "beforeColon": true,
              "afterColon": true,
              "on": "colon"
          }
      }]*/
      
      var obj = {
          "one"   : 1,
          "seven" : 7
      }
      /*eslint key-spacing: ["error", {
          "align": {
              "beforeColon": false,
              "afterColon": false,
              "on": "value"
          }
      }]*/
      
      var obj = {
          "one":  1,
          "seven":7
      }

      align and multiLine

      The multiLine and align options can differ, which allows for fine-tuned control over the key-spacing of your files. align will not inherit from multiLine if align is configured as an object.

      multiLine is used any time an object literal spans multiple lines. The align configuration is used when there is a group of properties in the same object. For example:

      var myObj = {
        key1: 1, // uses multiLine
      
        key2: 2, // uses align (when defined)
        key3: 3, // uses align (when defined)
      
        key4: 4 // uses multiLine
      }

      Examples of incorrect code for this rule with sample { "align": { }, "multiLine": { } } options:

      /*eslint key-spacing: ["error", {
          "multiLine": {
              "beforeColon": false,
              "afterColon":true
          },
          "align": {
              "beforeColon": true,
              "afterColon": true,
              "on": "colon"
          }
      }]*/
      
      var obj = {
          "myObjectFunction": function() {
              // Do something
          },
          "one"             : 1,
          "seven"           : 7
      }

      Examples of correct code for this rule with sample { "align": { }, "multiLine": { } } options:

      /*eslint key-spacing: ["error", {
          "multiLine": {
              "beforeColon": false,
              "afterColon": true
      
          },
          "align": {
              "beforeColon": true,
              "afterColon": true,
              "on": "colon"
          }
      }]*/
      
      var obj = {
          "myObjectFunction": function() {
              // Do something
              //
          }, // These are two separate groups, so no alignment between `myObjectFuction` and `one`
          "one"   : 1,
          "seven" : 7 // `one` and `seven` are in their own group, and therefore aligned
      }

      singleLine and multiLine

      Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

      /*eslint "key-spacing": [2, {
          "singleLine": {
              "beforeColon": false,
              "afterColon": true
          },
          "multiLine": {
              "beforeColon": true,
              "afterColon": true,
              "align": "colon"
          }
      }]*/
      var obj = { one: 1, "two": 2, three: 3 };
      var obj2 = {
          "two" : 2,
          three : 3
      };

      When Not To Use It

      If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Mixed spaces and tabs.
      Open

                                           score:max_scores
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow mixed spaces and tabs for indentation (no-mixed-spaces-and-tabs)

      Most code conventions require either tabs or spaces be used for indentation. As such, it's usually an error if a single line of code is indented with both tabs and spaces.

      Rule Details

      This rule disallows mixed spaces and tabs for indentation.

      Examples of incorrect code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->..return x + y;
      
            return x + y;
      }
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Examples of correct code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->return x + y;
          return x + y;
      }

      Options

      This rule has a string option.

      • "smart-tabs" allows mixed spaces and tabs when the latter are used for alignment.

      smart-tabs

      Examples of correct code for this rule with the "smart-tabs" option:

      /*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Further Reading

      Unexpected unnamed function.
      Open

      module.exports = function(labs,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Unexpected tab character.
      Open

                                  number_of_requests++;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Infix operators must be spaced.
      Open

                              var total_score =0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      All 'var' declarations must be at the top of the function scope.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Variable Declarations to be at the top of their scope (vars-on-top)

      The vars-on-top rule generates warnings when variable declarations are not used serially at the top of a function scope or the top of a program. By default variable declarations are always moved (“hoisted”) invisibly to the top of their containing scope by the JavaScript interpreter. This rule forces the programmer to represent that behaviour by manually moving the variable declaration to the top of its containing scope.

      Rule Details

      This rule aims to keep all variable declarations in the leading series of statements. Allowing multiple declarations helps promote maintainability and is thus allowed.

      Examples of incorrect code for this rule:

      /*eslint vars-on-top: "error"*/
      
      // Variable declarations in a block:
      function doSomething() {
          var first;
          if (true) {
              first = true;
          }
          var second;
      }
      
      // Variable declaration in for initializer:
      function doSomething() {
          for (var i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      // Variables after other statements:
      f();
      var a;

      Examples of correct code for this rule:

      /*eslint vars-on-top: "error"*/
      
      function doSomething() {
          var first;
          var second; //multiple declarations are allowed at the top
          if (true) {
              first = true;
          }
      }
      
      function doSomething() {
          var i;
          for (i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      var a;
      f();
      /*eslint vars-on-top: "error"*/
      
      // Directives may precede variable declarations.
      "use strict";
      var a;
      f();
      
      // Comments can describe variables.
      function doSomething() {
          // this is the first var.
          var first;
          // this is the second var.
          var second
      }

      Further Reading

      Unexpected tab character.
      Open

                              if(max_scores[data.id_no]) max_scores[data.id_no] = Math.max(max_scores[data.id_no],total_score);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

                              if(max_scores[data.id_no]) max_scores[data.id_no] = Math.max(max_scores[data.id_no],total_score);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                              number_of_requests--;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

                  return revaluation(lab_info.lab,lab_info.startDate, lab_info.endDate,lab_info.admin_key,call);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              else return false;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              var total_score =0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Infix operators must be spaced.
      Open

                              else max_scores[data.id_no]=total_score;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Identifier 'number_of_requests' is not in camel case.
      Open

                              number_of_requests--;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Block must not be padded by blank lines.
      Open

                              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow padding within blocks (padded-blocks)

      Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

      if (a) {
      
          b();
      
      }

      Since it's good to have a consistent code style, you should either always write padded blocks or never do it.

      Rule Details

      This rule enforces consistent empty line padding within blocks.

      Options

      This rule has one option, which can be a string option or an object option.

      String option:

      • "always" (default) requires empty lines at the beginning and ending of block statements (except switch statements and classes)
      • "never" disallows empty lines at the beginning and ending of block statements (except switch statements and classes)

      Object option:

      • "blocks" require or disallow padding within block statements
      • "classes" require or disallow padding within classes
      • "switches" require or disallow padding within switch statements

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      blocks

      Examples of incorrect code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      Examples of incorrect code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      classes

      Examples of incorrect code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
          constructor(){
          }
      }

      Examples of correct code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of incorrect code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of correct code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
          constructor(){
          }
      }

      switches

      Examples of incorrect code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
          case 0: foo();
      }

      Examples of correct code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }
      
      if (a) {
          b();
      }

      Examples of incorrect code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }

      Examples of correct code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
          case 0: foo();
      }
      
      if (a) {
      
          b();
      
      }

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of padding within blocks. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                          
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Block must not be padded by blank lines.
      Open

                      })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow padding within blocks (padded-blocks)

      Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

      if (a) {
      
          b();
      
      }

      Since it's good to have a consistent code style, you should either always write padded blocks or never do it.

      Rule Details

      This rule enforces consistent empty line padding within blocks.

      Options

      This rule has one option, which can be a string option or an object option.

      String option:

      • "always" (default) requires empty lines at the beginning and ending of block statements (except switch statements and classes)
      • "never" disallows empty lines at the beginning and ending of block statements (except switch statements and classes)

      Object option:

      • "blocks" require or disallow padding within block statements
      • "classes" require or disallow padding within classes
      • "switches" require or disallow padding within switch statements

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      blocks

      Examples of incorrect code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      Examples of incorrect code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      classes

      Examples of incorrect code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
          constructor(){
          }
      }

      Examples of correct code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of incorrect code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of correct code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
          constructor(){
          }
      }

      switches

      Examples of incorrect code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
          case 0: foo();
      }

      Examples of correct code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }
      
      if (a) {
          b();
      }

      Examples of incorrect code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }

      Examples of correct code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
          case 0: foo();
      }
      
      if (a) {
      
          b();
      
      }

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of padding within blocks. Source: http://eslint.org/docs/rules/

      Opening curly brace does not appear on the same line as controlling statement.
      Open

              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Missing space before function parentheses.
      Open

      module.exports = function(labs,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Missing space before function parentheses.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Unexpected unnamed function.
      Open

              return function(call)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Unexpected var, use let or const instead.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

                              var total_score =0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Unexpected var, use let or const instead.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Infix operators must be spaced.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              if(max_scores[data.id_no]) max_scores[data.id_no] = Math.max(max_scores[data.id_no],total_score);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected space(s) after "if".
      Open

                              if(max_scores[data.id_no]) max_scores[data.id_no] = Math.max(max_scores[data.id_no],total_score);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              else max_scores[data.id_no]=total_score;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected indentation of 0 spaces but found 6 tabs.
      Open

                              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected space(s) after "for".
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Expected indentation of 0 spaces but found 2 tabs.
      Open

              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      A space is required after ','.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected space(s) after "for".
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Trailing spaces not allowed.
      Open

                          
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Missing semicolon.
      Open

          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Trailing spaces not allowed.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow trailing whitespace at the end of lines (no-trailing-spaces)

      Sometimes in the course of editing files, you can end up with extra whitespace at the end of lines. These whitespace differences can be picked up by source control systems and flagged as diffs, causing frustration for developers. While this extra whitespace causes no functional issues, many code conventions require that trailing spaces be removed before check-in.

      Rule Details

      This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines.

      Examples of incorrect code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;//•••••
      var baz = 5;//••
      //•••••

      Examples of correct code for this rule:

      /*eslint no-trailing-spaces: "error"*/
      
      var foo = 0;
      var baz = 5;

      Options

      This rule has an object option:

      • "skipBlankLines": false (default) disallows trailing whitespace on empty lines
      • "skipBlankLines": true allows trailing whitespace on empty lines

      skipBlankLines

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

      /*eslint no-trailing-spaces: ["error", { "skipBlankLines": true }]*/
      
      var foo = 0;
      var baz = 5;
      //•••••

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

      Opening curly brace does not appear on the same line as controlling statement.
      Open

                          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Unexpected tab character.
      Open

                              if(!number_of_requests)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'number_of_requests' is not in camel case.
      Open

                              if(!number_of_requests)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Mixed spaces and tabs.
      Open

                                   return callback(null,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow mixed spaces and tabs for indentation (no-mixed-spaces-and-tabs)

      Most code conventions require either tabs or spaces be used for indentation. As such, it's usually an error if a single line of code is indented with both tabs and spaces.

      Rule Details

      This rule disallows mixed spaces and tabs for indentation.

      Examples of incorrect code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->..return x + y;
      
            return x + y;
      }
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Examples of correct code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->return x + y;
          return x + y;
      }

      Options

      This rule has a string option.

      • "smart-tabs" allows mixed spaces and tabs when the latter are used for alignment.

      smart-tabs

      Examples of correct code for this rule with the "smart-tabs" option:

      /*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Further Reading

      Missing space before value for key 'score'.
      Open

                                           score:max_scores
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing between keys and values in object literal properties (key-spacing)

      This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

      Rule Details

      This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

      Options

      This rule has an object option:

      • "beforeColon": false (default) disallows spaces between the key and the colon in object literals.
      • "beforeColon": true requires at least one space between the key and the colon in object literals.
      • "afterColon": true (default) requires at least one space between the colon and the value in object literals.
      • "afterColon": false disallows spaces between the colon and the value in object literals.
      • "mode": "strict" (default) enforces exactly one space before or after colons in object literals.
      • "mode": "minimum" enforces one or more spaces before or after colons in object literals.
      • "align": "value" enforces horizontal alignment of values in object literals.
      • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
      • "align" with an object value allows for fine-grained spacing when values are being aligned in object literals.
      • "singleLine" specifies a spacing style for single-line object literals.
      • "multiLine" specifies a spacing style for multi-line object literals.

      Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

      beforeColon

      Examples of incorrect code for this rule with the default { "beforeColon": false } option:

      /*eslint key-spacing: ["error", { "beforeColon": false }]*/
      
      var obj = { "foo" : 42 };

      Examples of correct code for this rule with the default { "beforeColon": false } option:

      /*eslint key-spacing: ["error", { "beforeColon": false }]*/
      
      var obj = { "foo": 42 };

      Examples of incorrect code for this rule with the { "beforeColon": true } option:

      /*eslint key-spacing: ["error", { "beforeColon": true }]*/
      
      var obj = { "foo": 42 };

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

      /*eslint key-spacing: ["error", { "beforeColon": true }]*/
      
      var obj = { "foo" : 42 };

      afterColon

      Examples of incorrect code for this rule with the default { "afterColon": true } option:

      /*eslint key-spacing: ["error", { "afterColon": true }]*/
      
      var obj = { "foo":42 };

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

      /*eslint key-spacing: ["error", { "afterColon": true }]*/
      
      var obj = { "foo": 42 };

      Examples of incorrect code for this rule with the { "afterColon": false } option:

      /*eslint key-spacing: ["error", { "afterColon": false }]*/
      
      var obj = { "foo": 42 };

      Examples of correct code for this rule with the { "afterColon": false } option:

      /*eslint key-spacing: ["error", { "afterColon": false }]*/
      
      var obj = { "foo":42 };

      mode

      Examples of incorrect code for this rule with the default { "mode": "strict" } option:

      /*eslint key-spacing: ["error", { "mode": "strict" }]*/
      
      call({
          foobar: 42,
          bat:    2 * 2
      });

      Examples of correct code for this rule with the default { "mode": "strict" } option:

      /*eslint key-spacing: ["error", { "mode": "strict" }]*/
      
      call({
          foobar: 42,
          bat: 2 * 2
      });

      Examples of correct code for this rule with the { "mode": "minimum" } option:

      /*eslint key-spacing: ["error", { "mode": "minimum" }]*/
      
      call({
          foobar: 42,
          bat:    2 * 2
      });

      align

      Examples of incorrect code for this rule with the { "align": "value" } option:

      /*eslint key-spacing: ["error", { "align": "value" }]*/
      
      var obj = {
          a: value,
          bcde:  42,
          fg :   foo()
      };

      Examples of correct code for this rule with the { "align": "value" } option:

      /*eslint key-spacing: ["error", { "align": "value" }]*/
      
      var obj = {
          a:    value,
          bcde: 42,
      
          fg: foo(),
          h:  function() {
              return this.a;
          },
          ijkl: 'Non-consecutive lines form a new group'
      };
      
      var obj = { a: "foo", longPropertyName: "bar" };

      Examples of incorrect code for this rule with the { "align": "colon" } option:

      /*eslint key-spacing: ["error", { "align": "colon" }]*/
      
      call({
          foobar: 42,
          bat:    2 * 2
      });

      Examples of correct code for this rule with the { "align": "colon" } option:

      /*eslint key-spacing: ["error", { "align": "colon" }]*/
      
      call({
          foobar: 42,
          bat   : 2 * 2
      });

      align

      The align option can take additional configuration through the beforeColon, afterColon, mode, and on options.

      If align is defined as an object, but not all of the parameters are provided, undefined parameters will default to the following:

      // Defaults
      align: {
          "beforeColon": false,
          "afterColon": true,
          "on": "colon",
          "mode": "strict"
      }

      Examples of correct code for this rule with sample { "align": { } } options:

      /*eslint key-spacing: ["error", {
          "align": {
              "beforeColon": true,
              "afterColon": true,
              "on": "colon"
          }
      }]*/
      
      var obj = {
          "one"   : 1,
          "seven" : 7
      }
      /*eslint key-spacing: ["error", {
          "align": {
              "beforeColon": false,
              "afterColon": false,
              "on": "value"
          }
      }]*/
      
      var obj = {
          "one":  1,
          "seven":7
      }

      align and multiLine

      The multiLine and align options can differ, which allows for fine-tuned control over the key-spacing of your files. align will not inherit from multiLine if align is configured as an object.

      multiLine is used any time an object literal spans multiple lines. The align configuration is used when there is a group of properties in the same object. For example:

      var myObj = {
        key1: 1, // uses multiLine
      
        key2: 2, // uses align (when defined)
        key3: 3, // uses align (when defined)
      
        key4: 4 // uses multiLine
      }

      Examples of incorrect code for this rule with sample { "align": { }, "multiLine": { } } options:

      /*eslint key-spacing: ["error", {
          "multiLine": {
              "beforeColon": false,
              "afterColon":true
          },
          "align": {
              "beforeColon": true,
              "afterColon": true,
              "on": "colon"
          }
      }]*/
      
      var obj = {
          "myObjectFunction": function() {
              // Do something
          },
          "one"             : 1,
          "seven"           : 7
      }

      Examples of correct code for this rule with sample { "align": { }, "multiLine": { } } options:

      /*eslint key-spacing: ["error", {
          "multiLine": {
              "beforeColon": false,
              "afterColon": true
      
          },
          "align": {
              "beforeColon": true,
              "afterColon": true,
              "on": "colon"
          }
      }]*/
      
      var obj = {
          "myObjectFunction": function() {
              // Do something
              //
          }, // These are two separate groups, so no alignment between `myObjectFuction` and `one`
          "one"   : 1,
          "seven" : 7 // `one` and `seven` are in their own group, and therefore aligned
      }

      singleLine and multiLine

      Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

      /*eslint "key-spacing": [2, {
          "singleLine": {
              "beforeColon": false,
              "afterColon": true
          },
          "multiLine": {
              "beforeColon": true,
              "afterColon": true,
              "align": "colon"
          }
      }]*/
      var obj = { one: 1, "two": 2, three: 3 };
      var obj2 = {
          "two" : 2,
          three : 3
      };

      When Not To Use It

      If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Expected indentation of 0 spaces but found 1 tab.
      Open

          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      A space is required after ','.
      Open

                  return revaluation(lab_info.lab,lab_info.startDate, lab_info.endDate,lab_info.admin_key,call);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

      module.exports = function(labs,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                  return revaluation(lab_info.lab,lab_info.startDate, lab_info.endDate,lab_info.admin_key,call);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Missing semicolon.
      Open

              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Block must not be padded by blank lines.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow padding within blocks (padded-blocks)

      Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

      if (a) {
      
          b();
      
      }

      Since it's good to have a consistent code style, you should either always write padded blocks or never do it.

      Rule Details

      This rule enforces consistent empty line padding within blocks.

      Options

      This rule has one option, which can be a string option or an object option.

      String option:

      • "always" (default) requires empty lines at the beginning and ending of block statements (except switch statements and classes)
      • "never" disallows empty lines at the beginning and ending of block statements (except switch statements and classes)

      Object option:

      • "blocks" require or disallow padding within block statements
      • "classes" require or disallow padding within classes
      • "switches" require or disallow padding within switch statements

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      blocks

      Examples of incorrect code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      Examples of incorrect code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      classes

      Examples of incorrect code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
          constructor(){
          }
      }

      Examples of correct code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of incorrect code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of correct code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
          constructor(){
          }
      }

      switches

      Examples of incorrect code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
          case 0: foo();
      }

      Examples of correct code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }
      
      if (a) {
          b();
      }

      Examples of incorrect code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }

      Examples of correct code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
          case 0: foo();
      }
      
      if (a) {
      
          b();
      
      }

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of padding within blocks. Source: http://eslint.org/docs/rules/

      All 'var' declarations must be at the top of the function scope.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Variable Declarations to be at the top of their scope (vars-on-top)

      The vars-on-top rule generates warnings when variable declarations are not used serially at the top of a function scope or the top of a program. By default variable declarations are always moved (“hoisted”) invisibly to the top of their containing scope by the JavaScript interpreter. This rule forces the programmer to represent that behaviour by manually moving the variable declaration to the top of its containing scope.

      Rule Details

      This rule aims to keep all variable declarations in the leading series of statements. Allowing multiple declarations helps promote maintainability and is thus allowed.

      Examples of incorrect code for this rule:

      /*eslint vars-on-top: "error"*/
      
      // Variable declarations in a block:
      function doSomething() {
          var first;
          if (true) {
              first = true;
          }
          var second;
      }
      
      // Variable declaration in for initializer:
      function doSomething() {
          for (var i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      // Variables after other statements:
      f();
      var a;

      Examples of correct code for this rule:

      /*eslint vars-on-top: "error"*/
      
      function doSomething() {
          var first;
          var second; //multiple declarations are allowed at the top
          if (true) {
              first = true;
          }
      }
      
      function doSomething() {
          var i;
          for (i=0; i<10; i++) {}
      }
      /*eslint vars-on-top: "error"*/
      
      var a;
      f();
      /*eslint vars-on-top: "error"*/
      
      // Directives may precede variable declarations.
      "use strict";
      var a;
      f();
      
      // Comments can describe variables.
      function doSomething() {
          // this is the first var.
          var first;
          // this is the second var.
          var second
      }

      Further Reading

      A space is required after ','.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Identifier 'total_score' is not in camel case.
      Open

                              var total_score =0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Infix operators must be spaced.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require spacing around infix operators (space-infix-ops)

      While formatting preferences are very personal, a number of style guides require spaces around operators, such as:

      var sum = 1 + 2;

      The proponents of these extra spaces believe it make the code easier to read and can more easily highlight potential errors, such as:

      var sum = i+++2;

      While this is valid JavaScript syntax, it is hard to determine what the author intended.

      Rule Details

      This rule is aimed at ensuring there are spaces around infix operators.

      Options

      This rule accepts a single options argument with the following defaults:

      "space-infix-ops": ["error", {"int32Hint": false}]

      int32Hint

      Set the int32Hint option to true (default is false) to allow write a|0 without space.

      var foo = bar|0; // `foo` is forced to be signed 32 bit integer

      Examples of incorrect code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a+b
      
      a+ b
      
      a +b
      
      a?b:c
      
      const a={b:1};
      
      var {a=0}=bar;
      
      function foo(a=0) { }

      Examples of correct code for this rule:

      /*eslint space-infix-ops: "error"*/
      /*eslint-env es6*/
      
      a + b
      
      a       + b
      
      a ? b : c
      
      const a = {b:1};
      
      var {a = 0} = bar;
      
      function foo(a = 0) { }

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

      Mixed spaces and tabs.
      Open

                                       {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow mixed spaces and tabs for indentation (no-mixed-spaces-and-tabs)

      Most code conventions require either tabs or spaces be used for indentation. As such, it's usually an error if a single line of code is indented with both tabs and spaces.

      Rule Details

      This rule disallows mixed spaces and tabs for indentation.

      Examples of incorrect code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->..return x + y;
      
            return x + y;
      }
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Examples of correct code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->return x + y;
          return x + y;
      }

      Options

      This rule has a string option.

      • "smart-tabs" allows mixed spaces and tabs when the latter are used for alignment.

      smart-tabs

      Examples of correct code for this rule with the "smart-tabs" option:

      /*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Further Reading

      Unexpected tab character.
      Open

                                           labName:lab,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 0 spaces but found 4 tabs.
      Open

                      })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 0 spaces but found 2 tabs.
      Open

              return function(call)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected { after 'for-in'.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Following Curly Brace Conventions (curly)

      JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity. So the following:

      if (foo) foo++;

      Can be rewritten as:

      if (foo) {
          foo++;
      }

      There are, however, some who prefer to only use braces when there is more than one statement to be executed.

      Rule Details

      This rule is aimed at preventing bugs and increasing code clarity by ensuring that block statements are wrapped in curly braces. It will warn when it encounters blocks that omit curly braces.

      Options

      all

      Examples of incorrect code for the default "all" option:

      /*eslint curly: "error"*/
      
      if (foo) foo++;
      
      while (bar)
          baz();
      
      if (foo) {
          baz();
      } else qux();

      Examples of correct code for the default "all" option:

      /*eslint curly: "error"*/
      
      if (foo) {
          foo++;
      }
      
      while (bar) {
          baz();
      }
      
      if (foo) {
          baz();
      } else {
          qux();
      }

      multi

      By default, this rule warns whenever if, else, for, while, or do are used without block statements as their body. However, you can specify that block statements should be used only when there are multiple statements in the block and warn when there is only one statement in the block.

      Examples of incorrect code for the "multi" option:

      /*eslint curly: ["error", "multi"]*/
      
      if (foo) {
          foo++;
      }
      
      if (foo) bar();
      else {
          foo++;
      }
      
      while (true) {
          doSomething();
      }
      
      for (var i=0; i < items.length; i++) {
          doSomething();
      }

      Examples of correct code for the "multi" option:

      /*eslint curly: ["error", "multi"]*/
      
      if (foo) foo++;
      
      else foo();
      
      while (true) {
          doSomething();
          doSomethingElse();
      }

      multi-line

      Alternatively, you can relax the rule to allow brace-less single-line if, else if, else, for, while, or do, while still enforcing the use of curly braces for other instances.

      Examples of incorrect code for the "multi-line" option:

      /*eslint curly: ["error", "multi-line"]*/
      
      if (foo)
        doSomething();
      else
        doSomethingElse();
      
      if (foo) foo(
        bar,
        baz);

      Examples of correct code for the "multi-line" option:

      /*eslint curly: ["error", "multi-line"]*/
      
      if (foo) foo++; else doSomething();
      
      if (foo) foo++;
      else if (bar) baz()
      else doSomething();
      
      do something();
      while (foo);
      
      while (foo
        && bar) baz();
      
      if (foo) {
          foo++;
      }
      
      if (foo) { foo++; }
      
      while (true) {
          doSomething();
          doSomethingElse();
      }

      multi-or-nest

      You can use another configuration that forces brace-less if, else if, else, for, while, or do if their body contains only one single-line statement. And forces braces in all other cases.

      Examples of incorrect code for the "multi-or-nest" option:

      /*eslint curly: ["error", "multi-or-nest"]*/
      
      if (!foo)
          foo = {
              bar: baz,
              qux: foo
          };
      
      while (true)
        if(foo)
            doSomething();
        else
            doSomethingElse();
      
      if (foo) {
          foo++;
      }
      
      while (true) {
          doSomething();
      }
      
      for (var i = 0; foo; i++) {
          doSomething();
      }
      
      if (foo)
          // some comment
          bar();

      Examples of correct code for the "multi-or-nest" option:

      /*eslint curly: ["error", "multi-or-nest"]*/
      
      if (!foo) {
          foo = {
              bar: baz,
              qux: foo
          };
      }
      
      while (true) {
        if(foo)
            doSomething();
        else
            doSomethingElse();
      }
      
      if (foo)
          foo++;
      
      while (true)
          doSomething();
      
      for (var i = 0; foo; i++)
          doSomething();
      
      if (foo) {
          // some comment
          bar();
      }

      consistent

      When using any of the multi* options, you can add an option to enforce all bodies of a if, else if and else chain to be with or without braces.

      Examples of incorrect code for the "multi", "consistent" options:

      /*eslint curly: ["error", "multi", "consistent"]*/
      
      if (foo) {
          bar();
          baz();
      } else
          buz();
      
      if (foo)
          bar();
      else if (faa)
          bor();
      else {
          other();
          things();
      }
      
      if (true)
          foo();
      else {
          baz();
      }
      
      if (foo) {
          foo++;
      }

      Examples of correct code for the "multi", "consistent" options:

      /*eslint curly: ["error", "multi", "consistent"]*/
      
      if (foo) {
          bar();
          baz();
      } else {
          buz();
      }
      
      if (foo) {
          bar();
      } else if (faa) {
          bor();
      } else {
          other();
          things();
      }
      
      if (true)
          foo();
      else
          baz();
      
      if (foo)
          foo++;

      When Not To Use It

      If you have no strict conventions about when to use block statements and when not to, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              if(!number_of_requests)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Opening curly brace does not appear on the same line as controlling statement.
      Open

                              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Unexpected tab character.
      Open

                                       });
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 0 spaces but found 5 tabs.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      A space is required after ','.
      Open

                  return revaluation(lab_info.lab,lab_info.startDate, lab_info.endDate,lab_info.admin_key,call);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'lab_info' is not in camel case.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 3 tabs.
      Open

                  return revaluation(lab_info.lab,lab_info.startDate, lab_info.endDate,lab_info.admin_key,call);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

          });
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected unnamed function.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Expected space(s) after "if".
      Open

                              if(!number_of_requests)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

                  })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Opening curly brace does not appear on the same line as controlling statement.
      Open

          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      A space is required after ','.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected indentation of 2 spaces but found 6 tabs.
      Open

                              number_of_requests--;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

                                   return callback(null,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                  })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 2 spaces but found 1 tab.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected space(s) after "for".
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent spacing before and after keywords (keyword-spacing)

      Keywords are syntax elements of JavaScript, such as function and if. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always surrounded by spaces, which would mean if-else statements must look like this:

      if (foo) {
          // ...
      } else {
          // ...
      }

      Of course, you could also have a style guide that disallows spaces around keywords.

      Rule Details

      This rule enforces consistent spacing around keywords and keyword-like tokens: as (in module declarations), async (of async functions), await (of await expressions), break, case, catch, class, const, continue, debugger, default, delete, do, else, export, extends, finally, for, from (in module declarations), function, get (of getters), if, import, in, instanceof, let, new, of (in for-of statements), return, set (of setters), static, super, switch, this, throw, try, typeof, var, void, while, with, and yield. This rule is designed carefully not to conflict with other spacing rules: it does not apply to spacing where other rules report problems.

      Options

      This rule has an object option:

      • "before": true (default) requires at least one space before keywords
      • "before": false disallows spaces before keywords
      • "after": true (default) requires at least one space after keywords
      • "after": false disallows spaces after keywords
      • "overrides" allows overriding spacing style for specified keywords

      before

      Examples of incorrect code for this rule with the default { "before": true } option:

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "before": true }]*/
      /*eslint-env es6*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // no conflict with `array-bracket-spacing`
      let a = [this];
      let b = [function() {}];
      
      // no conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // no conflict with `block-spacing`
      {function foo() {}}
      
      // no conflict with `comma-spacing`
      let a = [100,this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // no conflict with `generator-star-spacing`
      function *foo() {}
      
      // no conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // no conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // no conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // no conflict with `space-in-parens`
      (function () {})();
      
      // no conflict with `space-infix-ops`
      if ("foo"in {foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "before": false } option:

      /*eslint keyword-spacing: ["error", { "before": false }]*/
      
      if (foo) {
          //...
      }else if (bar) {
          //...
      }else {
          //...
      }

      after

      Examples of incorrect code for this rule with the default { "after": true } option:

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

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

      /*eslint keyword-spacing: ["error", { "after": true }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }
      
      // not conflict with `array-bracket-spacing`
      let a = [this];
      
      // not conflict with `arrow-spacing`
      let a = ()=> this.foo;
      
      // not conflict with `comma-spacing`
      let a = [100, this.foo, this.bar];
      
      // not conflict with `computed-property-spacing`
      obj[this.foo] = 0;
      
      // not conflict with `generator-star-spacing`
      function* foo() {}
      
      // not conflict with `key-spacing`
      let obj = {
          foo:function() {}
      };
      
      // not conflict with `func-call-spacing`
      class A {
          constructor() {
              super();
          }
      }
      
      // not conflict with `object-curly-spacing`
      let obj = {foo: this};
      
      // not conflict with `semi-spacing`
      let a = this;function foo() {}
      
      // not conflict with `space-before-function-paren`
      function() {}
      
      // no conflict with `space-infix-ops`
      if ("foo"in{foo: 0}) {}
      if (10+this.foo<= this.bar) {}
      
      // no conflict with `space-unary-ops`
      function* foo(a) {
          return yield+a;
      }
      
      // no conflict with `yield-star-spacing`
      function* foo(a) {
          return yield* a;
      }
      
      // no conflict with `jsx-curly-spacing`
      let a = 

      Examples of incorrect code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if (foo) {
          //...
      } else if (bar) {
          //...
      } else {
          //...
      }

      Examples of correct code for this rule with the { "after": false } option:

      /*eslint keyword-spacing: ["error", { "after": false }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else{
          //...
      }

      overrides

      Examples of correct code for this rule with the { "overrides": { "if": { "after": false }, "for": { "after": false }, "while": { "after": false } } } option:

      /*eslint keyword-spacing: ["error", { "overrides": {
        "if": { "after": false },
        "for": { "after": false },
        "while": { "after": false }
      } }]*/
      
      if(foo) {
          //...
      } else if(bar) {
          //...
      } else {
          //...
      }
      
      for(;;);
      
      while(true) {
        //...
      }

      When Not To Use It

      If you don't want to enforce consistency on keyword spacing, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

      Identifier 'lab_tasks' is not in camel case.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected unnamed function.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Unexpected tab character.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected function expression.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Missing space before function parentheses.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Unexpected tab character.
      Open

                          {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                                           score:max_scores
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected var, use let or const instead.
      Open

          var lab_tasks = labs.map(function(lab_info)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Missing space before function parentheses.
      Open

              return function(call)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Expected indentation of 0 spaces but found 2 tabs.
      Open

              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected exception block, space or tab after '//' in comment.
      Open

          port: '9000'     //require('../config/conf.json').host_port.port
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Requires or disallows a whitespace (space or tab) beginning a comment (spaced-comment)

      Some style guides require or disallow a whitespace immediately after the initial // or /* of a comment. Whitespace after the // or /* makes it easier to read text in comments. On the other hand, commenting out code is easier without having to put a whitespace right after the // or /*.

      Rule Details

      This rule will enforce consistency of spacing after the start of a comment // or /*. It also provides several exceptions for various documentation styles.

      Options

      The rule takes two options.

      • The first is a string which be either "always" or "never". The default is "always".

        • If "always" then the // or /* must be followed by at least one whitespace.
        • If "never" then there should be no whitespace following.
      • This rule can also take a 2nd option, an object with any of the following keys: "exceptions" and "markers".

        • The "exceptions" value is an array of string patterns which are considered exceptions to the rule. Please note that exceptions are ignored if the first argument is "never".
        "spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
        • The "markers" value is an array of string patterns which are considered markers for docblock-style comments, such as an additional /, used to denote documentation read by doxygen, vsdoc, etc. which must have additional characters. The "markers" array will apply regardless of the value of the first argument, e.g. "always" or "never".
        "spaced-comment": ["error", "always", { "markers": ["/"] }]

      The difference between a marker and an exception is that a marker only appears at the beginning of the comment whereas exceptions can occur anywhere in the comment string.

      You can also define separate exceptions and markers for block and line comments. The "block" object can have an additional key "balanced", a boolean that specifies if inline block comments should have balanced spacing. The default value is false.

      • If "balanced": true and "always" then the /* must be followed by at least one whitespace, and the */ must be preceded by at least one whitespace.

      • If "balanced": true and "never" then there should be no whitespace following /* or preceding */.

      • If "balanced": false then balanced whitespace is not enforced.

      "spaced-comment": ["error", "always", {
          "line": {
              "markers": ["/"],
              "exceptions": ["-", "+"]
          },
          "block": {
              "markers": ["!"],
              "exceptions": ["*"],
              "balanced": true
          }
      }]

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint spaced-comment: ["error", "always"]*/
      
      //This is a comment with no whitespace at the beginning
      
      /*This is a comment with no whitespace at the beginning */
      /* eslint spaced-comment: ["error", "always", { "block": { "balanced": true } }] */
      /* This is a comment with whitespace at the beginning but not the end*/

      Examples of correct code for this rule with the "always" option:

      /* eslint spaced-comment: ["error", "always"] */
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /*
       * This is a comment with a whitespace at the beginning
       */
      
      /*
      This comment has a newline
      */
      /* eslint spaced-comment: ["error", "always"] */
      
      /**
      * I am jsdoc
      */

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      // This is a comment with a whitespace at the beginning
      
      /* This is a comment with a whitespace at the beginning */
      
      /* \nThis is a comment with a whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never", { "block": { "balanced": true } }]*/
      /*This is a comment with whitespace at the end */

      Examples of correct code for this rule with the "never" option:

      /*eslint spaced-comment: ["error", "never"]*/
      
      /*This is a comment with no whitespace at the beginning */
      /*eslint spaced-comment: ["error", "never"]*/
      
      /**
      * I am jsdoc
      */

      exceptions

      Examples of incorrect code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      //------++++++++
      // Comment block
      //------++++++++
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-", "+"] }] */
      
      /*------++++++++*/
      /* Comment block */
      /*------++++++++*/
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      Examples of correct code for this rule with the "always" option combined with "exceptions":

      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-"] }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["-"] } }] */
      
      //--------------
      // Comment block
      //--------------
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["*"] }] */
      
      /****************
       * Comment block
       ****************/
      /* eslint spaced-comment: ["error", "always", { "exceptions": ["-+"] }] */
      
      //-+-+-+-+-+-+-+
      // Comment block
      //-+-+-+-+-+-+-+
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/
      /* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["-+"] } }] */
      
      /*-+-+-+-+-+-+-+*/
      // Comment block
      /*-+-+-+-+-+-+-+*/

      markers

      Examples of incorrect code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      ///This is a comment with a marker but without whitespace
      /*eslint spaced-comment: ["error", "always", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*! This is a comment with a marker but without whitespace at the end*/
      /*eslint spaced-comment: ["error", "never", { "block": { "markers": ["!"], "balanced": true } }]*/
      /*!This is a comment with a marker but with whitespace at the end */

      Examples of correct code for this rule with the "always" option combined with "markers":

      /* eslint spaced-comment: ["error", "always", { "markers": ["/"] }] */
      
      /// This is a comment with a marker
      /*eslint spaced-comment: ["error", "never", { "markers": ["!<"] }]*/
      
      //!<this is a line comment with marker block subsequent lines are ignored></this>
      /* eslint spaced-comment: ["error", "always", { "markers": ["global"] }] */
      
      /*global ABC*/

      Related Rules

      Missing semicolon.
      Open

      }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 2 tabs.
      Open

              console.log(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      A space is required after ','.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Unexpected unnamed function.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Opening curly brace does not appear on the same line as controlling statement.
      Open

                  {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Unexpected tab character.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected function expression.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Suggest using arrow functions as callbacks. (prefer-arrow-callback)

      Arrow functions are suited to callbacks, because:

      • this keywords in arrow functions bind to the upper scope's.
      • The notation of the arrow function is shorter than function expression's.

      Rule Details

      This rule is aimed to flag usage of function expressions in an argument list.

      The following patterns are considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      
      foo(function(a) { return a; });
      foo(function() { return this.a; }.bind(this));

      The following patterns are not considered problems:

      /*eslint prefer-arrow-callback: "error"*/
      /*eslint-env es6*/
      
      foo(a => a);
      foo(function*() { yield; });
      
      // this is not a callback.
      var foo = function foo(a) { return a; };
      
      // using `this` without `.bind(this)`.
      foo(function() { return this.a; });
      
      // recursively.
      foo(function bar(n) { return n && n + bar(n - 1); });

      Options

      This rule takes one optional argument, an object which is an options object.

      allowNamedFunctions

      This is a boolean option and it is false by default. When set to true, the rule doesn't warn on named functions used as callbacks.

      Examples of correct code for the { "allowNamedFunctions": true } option:

      /*eslint prefer-arrow-callback: ["error", { "allowNamedFunctions": true }]*/
      
      foo(function bar() {});

      allowUnboundThis

      This is a boolean option and it is true by default. When set to false, this option allows the use of this without restriction and checks for dynamically assigned this values such as when using Array.prototype.map with a context argument. Normally, the rule will flag the use of this whenever a function does not use bind() to specify the value of this constantly.

      Examples of incorrect code for the { "allowUnboundThis": false } option:

      /*eslint prefer-arrow-callback: ["error", { "allowUnboundThis": false }]*/
      /*eslint-env es6*/
      
      foo(function() { this.a; });
      
      foo(function() { (() => this); });
      
      someArray.map(function (itm) { return this.doSomething(itm); }, someObject);

      When Not To Use It

      This rule should not be used in ES3/5 environments.

      In ES2015 (ES6) or later, if you don't want to be notified about function expressions in an argument list, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      Unexpected unnamed function.
      Open

                          commits.filter(function(commit)              //Check if the commit is within the lab timings
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow named function expressions (func-names)

      A pattern that's becoming more common is to give function expressions names to aid in debugging. For example:

      Foo.prototype.bar = function bar() {};

      Adding the second bar in the above example is optional. If you leave off the function name then when the function throws an exception you are likely to get something similar to anonymous function in the stack trace. If you provide the optional name for a function expression then you will get the name of the function expression in the stack trace.

      Rule Details

      This rule can enforce or disallow the use of named function expressions.

      Options

      This rule has a string option:

      • "always" (default) requires function expressions to have a name
      • "as-needed" requires function expressions to have a name, if the name cannot be assigned automatically in an ES6 environment
      • "never" disallows named function expressions, except in recursive functions, where a name is needed

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "always" option:

      /*eslint func-names: ["error", "always"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      as-needed

      ECMAScript 6 introduced a name property on all functions. The value of name is determined by evaluating the code around the function to see if a name can be inferred. For example, a function assigned to a variable will automatically have a name property equal to the name of the variable. The value of name is then used in stack traces for easier debugging.

      Examples of incorrect code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Examples of correct code for this rule with the default "as-needed" option:

      /*eslint func-names: ["error", "as-needed"]*/
      
      var bar = function() {};
      
      (function bar() {
          // ...
      }())

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function bar() {};
      
      (function bar() {
          // ...
      }())

      Examples of correct code for this rule with the "never" option:

      /*eslint func-names: ["error", "never"]*/
      
      Foo.prototype.bar = function() {};
      
      (function() {
          // ...
      }())

      Further Reading

      Compatibility

      Unexpected tab character.
      Open

                              else return false;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'number_of_requests' is not in camel case.
      Open

                                  number_of_requests++;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 0 spaces but found 6 tabs.
      Open

                              }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Mixed spaces and tabs.
      Open

                                           labName:lab,
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow mixed spaces and tabs for indentation (no-mixed-spaces-and-tabs)

      Most code conventions require either tabs or spaces be used for indentation. As such, it's usually an error if a single line of code is indented with both tabs and spaces.

      Rule Details

      This rule disallows mixed spaces and tabs for indentation.

      Examples of incorrect code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->..return x + y;
      
            return x + y;
      }
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Examples of correct code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->return x + y;
          return x + y;
      }

      Options

      This rule has a string option.

      • "smart-tabs" allows mixed spaces and tabs when the latter are used for alignment.

      smart-tabs

      Examples of correct code for this rule with the "smart-tabs" option:

      /*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Further Reading

      Opening curly brace does not appear on the same line as controlling statement.
      Open

                              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Brace Style (brace-style)

      Brace style is closely related to indent style in programming and describes the placement of braces relative to their control statement and body. There are probably a dozen, if not more, brace styles in the world.

      The one true brace style is one of the most common brace styles in JavaScript, in which the opening brace of a block is placed on the same line as its corresponding statement or declaration. For example:

      if (foo) {
        bar();
      } else {
        baz();
      }

      One common variant of one true brace style is called Stroustrup, in which the else statements in an if-else construct, as well as catch and finally, must be on its own line after the preceding closing brace. For example:

      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Another style is called Allman, in which all the braces are expected to be on their own lines without any extra indentation. For example:

      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }

      While no style is considered better than the other, most developers agree that having a consistent style throughout a project is important for its long-term maintainability.

      Rule Details

      This rule enforces consistent brace style for blocks.

      Options

      This rule has a string option:

      • "1tbs" (default) enforces one true brace style
      • "stroustrup" enforces Stroustrup style
      • "allman" enforces Allman style

      This rule has an object option for an exception:

      • "allowSingleLine": true (default false) allows the opening and closing braces for a block to be on the same line

      1tbs

      Examples of incorrect code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }

      Examples of correct code for this rule with the default "1tbs" option:

      /*eslint brace-style: "error"*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }
      
      try {
        somethingRisky();
      } catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "1tbs", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "1tbs", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); } else { baz(); }
      
      try { somethingRisky(); } catch(e) { handleError(); }

      stroustrup

      Examples of incorrect code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "stroustrup" option:

      /*eslint brace-style: ["error", "stroustrup"]*/
      
      function foo() {
        return true;
      }
      
      if (foo) {
        bar();
      }
      
      if (foo) {
        bar();
      }
      else {
        baz();
      }
      
      try {
        somethingRisky();
      }
      catch(e) {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "stroustrup", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "stroustrup", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      allman

      Examples of incorrect code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo() {
        return true;
      }
      
      if (foo)
      {
        bar(); }
      
      try
      {
        somethingRisky();
      } catch(e)
      {
        handleError();
      }
      
      if (foo) {
        bar();
      } else {
        baz();
      }

      Examples of correct code for this rule with the "allman" option:

      /*eslint brace-style: ["error", "allman"]*/
      
      function foo()
      {
        return true;
      }
      
      if (foo)
      {
        bar();
      }
      
      if (foo)
      {
        bar();
      }
      else
      {
        baz();
      }
      
      try
      {
        somethingRisky();
      }
      catch(e)
      {
        handleError();
      }
      
      // when there are no braces, there are no problems
      if (foo) bar();
      else if (baz) boom();

      Examples of correct code for this rule with the "allman", { "allowSingleLine": true } options:

      /*eslint brace-style: ["error", "allman", { "allowSingleLine": true }]*/
      
      function nop() { return; }
      
      if (foo) { bar(); }
      
      if (foo) { bar(); }
      else { baz(); }
      
      try { somethingRisky(); }
      catch(e) { handleError(); }

      When Not To Use It

      If you don't want to enforce a particular brace style, don't enable this rule.

      Further Reading

      Block must not be padded by blank lines.
      Open

                          })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow padding within blocks (padded-blocks)

      Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

      if (a) {
      
          b();
      
      }

      Since it's good to have a consistent code style, you should either always write padded blocks or never do it.

      Rule Details

      This rule enforces consistent empty line padding within blocks.

      Options

      This rule has one option, which can be a string option or an object option.

      String option:

      • "always" (default) requires empty lines at the beginning and ending of block statements (except switch statements and classes)
      • "never" disallows empty lines at the beginning and ending of block statements (except switch statements and classes)

      Object option:

      • "blocks" require or disallow padding within block statements
      • "classes" require or disallow padding within classes
      • "switches" require or disallow padding within switch statements

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint padded-blocks: ["error", "always"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the "never" option:

      /*eslint padded-blocks: ["error", "never"]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      blocks

      Examples of incorrect code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
          b();
      }
      
      if (a) { b(); }
      
      if (a)
      {
          b();
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }
      
      if (a) {
          // comment
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "always" } option:

      /*eslint padded-blocks: ["error", { "blocks": "always" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          // comment
          b();
      
      }

      Examples of incorrect code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
      
          b();
      
      }
      
      if (a)
      {
      
          b();
      
      }
      
      if (a) {
      
          b();
      }
      
      if (a) {
          b();
      
      }

      Examples of correct code for this rule with the { "blocks": "never" } option:

      /*eslint padded-blocks: ["error", { "blocks": "never" }]*/
      
      if (a) {
          b();
      }
      
      if (a)
      {
          b();
      }

      classes

      Examples of incorrect code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
          constructor(){
          }
      }

      Examples of correct code for this rule with the { "classes": "always" } option:

      /*eslint padded-blocks: ["error", { "classes": "always" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of incorrect code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
      
          constructor(){
          }
      
      }

      Examples of correct code for this rule with the { "classes": "never" } option:

      /*eslint padded-blocks: ["error", { "classes": "never" }]*/
      
      class  A {
          constructor(){
          }
      }

      switches

      Examples of incorrect code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
          case 0: foo();
      }

      Examples of correct code for this rule with the { "switches": "always" } option:

      /*eslint padded-blocks: ["error", { "switches": "always" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }
      
      if (a) {
          b();
      }

      Examples of incorrect code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
      
          case 0: foo();
      
      }

      Examples of correct code for this rule with the { "switches": "never" } option:

      /*eslint padded-blocks: ["error", { "switches": "never" }]*/
      
      switch (a) {
          case 0: foo();
      }
      
      if (a) {
      
          b();
      
      }

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of padding within blocks. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                      })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Missing semicolon.
      Open

                      })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 7 tabs.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

              return function(call)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Identifier 'start_time' is not in camel case.
      Open

      function revaluation(lab,start_time,end_time,admin_key,callback)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 5 tabs.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

          var number_of_requests=0;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Strings must use singlequote.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce the consistent use of either backticks, double, or single quotes (quotes)

      JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

      /*eslint-env es6*/
      
      var double = "double";
      var single = 'single';
      var backtick = `backtick`;    // ES6 only

      Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

      Many codebases require strings to be defined in a consistent manner.

      Rule Details

      This rule enforces the consistent use of either backticks, double, or single quotes.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "double" (default) requires the use of double quotes wherever possible
      • "single" requires the use of single quotes wherever possible
      • "backtick" requires the use of backticks wherever possible

      Object option:

      • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
      • "allowTemplateLiterals": true allows strings to use backticks

      Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

      double

      Examples of incorrect code for this rule with the default "double" option:

      /*eslint quotes: ["error", "double"]*/
      
      var single = 'single';
      var unescaped = 'a string containing "double" quotes';

      Examples of correct code for this rule with the default "double" option:

      /*eslint quotes: ["error", "double"]*/
      /*eslint-env es6*/
      
      var double = "double";
      var backtick = `back\ntick`;  // backticks are allowed due to newline
      var backtick = tag`backtick`; // backticks are allowed due to tag

      single

      Examples of incorrect code for this rule with the "single" option:

      /*eslint quotes: ["error", "single"]*/
      
      var double = "double";
      var unescaped = "a string containing 'single' quotes";

      Examples of correct code for this rule with the "single" option:

      /*eslint quotes: ["error", "single"]*/
      /*eslint-env es6*/
      
      var single = 'single';
      var backtick = `back${x}tick`; // backticks are allowed due to substitution

      backticks

      Examples of incorrect code for this rule with the "backtick" option:

      /*eslint quotes: ["error", "backtick"]*/
      
      var single = 'single';
      var double = "double";
      var unescaped = 'a string containing `backticks`';

      Examples of correct code for this rule with the "backtick" option:

      /*eslint quotes: ["error", "backtick"]*/
      /*eslint-env es6*/
      
      var backtick = `backtick`;

      avoidEscape

      Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

      /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
      
      var single = 'a string containing "double" quotes';

      Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

      /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
      
      var double = "a string containing 'single' quotes";

      Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

      /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
      
      var double = "a string containing `backtick` quotes"

      allowTemplateLiterals

      Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

      /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
      
      var double = "double";
      var double = `double`;

      Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

      /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
      
      var single = 'single';
      var single = `single`;

      When Not To Use It

      If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      A space is required after ','.
      Open

          socket.on('error',function(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

              console.log(err)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 1 tab.
      Open

          gitlab.getPrivateToken(function(err,token)             //Get the private token required to get all the commits
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Missing whitespace after semicolon.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforce spacing before and after semicolons (semi-spacing)

      JavaScript allows you to place unnecessary spaces before or after a semicolon.

      Disallowing or enforcing space around a semicolon can improve the readability of your program.

      var a = "b" ;
      
      var c = "d";var e = "f";

      Rule Details

      This rule aims to enforce spacing around a semicolon. This rule prevents the use of spaces before a semicolon in expressions.

      This rule doesn't check spacing in the following cases:

      • The spacing after the semicolon if it is the first token in the line.

      • The spacing before the semicolon if it is after an opening parenthesis (( or {), or the spacing after the semicolon if it is before a closing parenthesis () or }). That spacing is checked by space-in-parens or block-spacing.

      • The spacing around the semicolon in a for loop with an empty condition (for(;;)).

      Options

      The rule takes one option, an object, which has two keys before and after having boolean values true or false. If before is true, space is enforced before semicolons and if it's false, space is disallowed before semicolons. If after is true, space is enforced after semicolons and if it's false, space is disallowed after semicolons. The after option will be only applied if a semicolon is not at the end of line.

      The default is {"before": false, "after": true}.

      "semi-spacing": ["error", {"before": false, "after": true}]

      {"before": false, "after": true}

      This is the default option. It enforces spacing after semicolons and disallows spacing before semicolons.

      Examples of incorrect code for this rule:

      /*eslint semi-spacing: "error"*/
      
      var foo ;
      var foo;var bar;
      throw new Error("error") ;
      while (a) { break ; }
      for (i = 0 ; i < 10 ; i++) {}
      for (i = 0;i < 10;i++) {}

      Examples of correct code for this rule:

      /*eslint semi-spacing: "error"*/
      
      var foo;
      var foo; var bar;
      throw new Error("error");
      while (a) { break; }
      for (i = 0; i < 10; i++) {}
      for (;;) {}
      if (true) {;}
      ;foo();

      {"before": true, "after": false}

      This option enforces spacing before semicolons and disallows spacing after semicolons.

      Examples of incorrect code for this rule with the {"before": true, "after": false} option:

      /*eslint semi-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo;
      var foo ; var bar;
      throw new Error("error");
      while (a) { break; }
      for (i = 0;i < 10;i++) {}
      for (i = 0; i < 10; i++) {}

      Examples of correct code for this rule with the {"before": true, "after": false} option:

      /*eslint semi-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo ;
      var foo ;var bar ;
      throw new Error("error") ;
      while (a) {break ;}
      for (i = 0 ;i < 10 ;i++) {}

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before or after semicolons.

      Related Rules

      • [semi](semi.md)
      • [no-extra-semi](no-extra-semi.md)
      • [comma-spacing](comma-spacing.md)
      • [block-spacing](block-spacing.md)
      • [space-in-parens](space-in-parens.md) Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                      
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Expected indentation of 2 spaces but found 4 tabs.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Missing space before function parentheses.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require or disallow a space before function parenthesis (space-before-function-paren)

      When formatting a function, whitespace is allowed between the function name or function keyword and the opening paren. Named functions also require a space between the function keyword and the function name, but anonymous functions require no whitespace. For example:

      function withoutSpace(x) {
          // ...
      }
      
      function withSpace (x) {
          // ...
      }
      
      var anonymousWithoutSpace = function() {};
      
      var anonymousWithSpace = function () {};

      Style guides may require a space after the function keyword for anonymous functions, while others specify no whitespace. Similarly, the space after a function name may or may not be required.

      Rule Details

      This rule aims to enforce consistent spacing before function parentheses and as such, will warn whenever whitespace doesn't match the preferences specified.

      Options

      This rule has a string option or an object option:

      {
          "space-before-function-paren": ["error", "always"],
          // or
          "space-before-function-paren": ["error", {
              "anonymous": "always",
              "named": "always",
              "asyncArrow": "ignore"
          }],
      }
      • always (default) requires a space followed by the ( of arguments.
      • never disallows any space followed by the ( of arguments.

      The string option does not check async arrow function expressions for backward compatibility.

      You can also use a separate option for each type of function. Each of the following options can be set to "always", "never", or "ignore". Default is "always" basically.

      • anonymous is for anonymous function expressions (e.g. function () {}).
      • named is for named function expressions (e.g. function foo () {}).
      • asyncArrow is for async arrow function expressions (e.g. async () => {}). asyncArrow is set to "ignore" by default for backwards compatibility.

      "always"

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the default "always" option:

      /*eslint space-before-function-paren: "error"*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      "never"

      Examples of incorrect code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      var bar = function foo () {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint space-before-function-paren: ["error", "never"]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      var bar = function foo() {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      // async arrow function expressions are ignored by default.
      var foo = async () => 1
      var foo = async() => 1

      {"anonymous": "always", "named": "never", "asyncArrow": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };
      
      var foo = async(a) => await a

      Examples of correct code for this rule with the {"anonymous": "always", "named": "never", "asyncArrow": "always"} option:

      /*eslint space-before-function-paren: ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };
      
      var foo = async (a) => await a

      {"anonymous": "never", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      var bar = function () {
          // ...
      };
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "never", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "never", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo () {
          // ...
      }
      
      var bar = function() {
          // ...
      };
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      {"anonymous": "ignore", "named": "always"}

      Examples of incorrect code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      function foo() {
          // ...
      }
      
      class Foo {
          constructor() {
              // ...
          }
      }
      
      var foo = {
          bar() {
              // ...
          }
      };

      Examples of correct code for this rule with the {"anonymous": "ignore", "named": "always"} option:

      /*eslint space-before-function-paren: ["error", { "anonymous": "ignore", "named": "always" }]*/
      /*eslint-env es6*/
      
      var bar = function() {
          // ...
      };
      
      var bar = function () {
          // ...
      };
      
      function foo () {
          // ...
      }
      
      class Foo {
          constructor () {
              // ...
          }
      }
      
      var foo = {
          bar () {
              // ...
          }
      };

      When Not To Use It

      You can turn this rule off if you are not concerned with the consistency of spacing before function parenthesis.

      Related Rules

      Unexpected var, use let or const instead.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require let or const instead of var (no-var)

      ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the let and const keywords. Block scope is common in many other programming languages and helps programmers avoid mistakes such as:

      var count = people.length;
      var enoughFood = count > sandwiches.length;
      
      if (enoughFood) {
          var count = sandwiches.length; // accidentally overriding the count variable
          console.log("We have " + count + " sandwiches for everyone. Plenty for all!");
      }
      
      // our count variable is no longer accurate
      console.log("We have " + count + " people and " + sandwiches.length + " sandwiches!");

      Rule Details

      This rule is aimed at discouraging the use of var and encouraging the use of const or let instead.

      Examples

      Examples of incorrect code for this rule:

      /*eslint no-var: "error"*/
      
      var x = "y";
      var CONFIG = {};

      Examples of correct code for this rule:

      /*eslint no-var: "error"*/
      /*eslint-env es6*/
      
      let x = "y";
      const CONFIG = {};

      When Not To Use It

      In addition to non-ES6 environments, existing JavaScript projects that are beginning to introduce ES6 into their codebase may not want to apply this rule if the cost of migrating from var to let is too costly. Source: http://eslint.org/docs/rules/

      Unexpected tab character.
      Open

                              {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Identifier 'admin_key' is not in camel case.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Camelcase (camelcase)

      When it comes to naming variables, style guides generally fall into one of two camps: camelcase (variableName) and underscores (variable_name). This rule focuses on using the camelcase approach. If your style guide calls for camelcasing your variable names, then this rule is for you!

      Rule Details

      This rule looks for any underscores (_) located within the source code. It ignores leading and trailing underscores and only checks those in the middle of a variable name. If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown. Otherwise, a warning will be thrown. This rule only flags definitions and assignments but not function calls. In case of ES6 import statements, this rule only targets the name of the variable that will be imported into the local module scope.

      Options

      This rule has an object option:

      • "properties": "always" (default) enforces camelcase style for property names
      • "properties": "never" does not check property names

      always

      Examples of incorrect code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased } from "external-module"
      
      var my_favorite_color = "#112C85";
      
      function do_something() {
          // ...
      }
      
      obj.do_something = function() {
          // ...
      };
      
      var obj = {
          my_pref: 1
      };

      Examples of correct code for this rule with the default { "properties": "always" } option:

      /*eslint camelcase: "error"*/
      
      import { no_camelcased as camelCased } from "external-module";
      
      var myFavoriteColor   = "#112C85";
      var _myFavoriteColor  = "#112C85";
      var myFavoriteColor_  = "#112C85";
      var MY_FAVORITE_COLOR = "#112C85";
      var foo = bar.baz_boom;
      var foo = { qux: bar.baz_boom };
      
      obj.do_something();
      do_something();
      new do_something();
      
      var { category_id: category } = query;

      never

      Examples of correct code for this rule with the { "properties": "never" } option:

      /*eslint camelcase: ["error", {properties: "never"}]*/
      
      var obj = {
          my_pref: 1
      };

      When Not To Use It

      If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off. Source: http://eslint.org/docs/rules/

      Expected indentation of 2 spaces but found 7 tabs.
      Open

                                  number_of_requests++;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

                              else max_scores[data.id_no]=total_score;
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Unexpected tab character.
      Open

                                       {
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      Mixed spaces and tabs.
      Open

                                       });
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow mixed spaces and tabs for indentation (no-mixed-spaces-and-tabs)

      Most code conventions require either tabs or spaces be used for indentation. As such, it's usually an error if a single line of code is indented with both tabs and spaces.

      Rule Details

      This rule disallows mixed spaces and tabs for indentation.

      Examples of incorrect code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->..return x + y;
      
            return x + y;
      }
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Examples of correct code for this rule:

      /*eslint no-mixed-spaces-and-tabs: "error"*/
      
      function add(x, y) {
      // --->return x + y;
          return x + y;
      }

      Options

      This rule has a string option.

      • "smart-tabs" allows mixed spaces and tabs when the latter are used for alignment.

      smart-tabs

      Examples of correct code for this rule with the "smart-tabs" option:

      /*eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
      
      function main() {
      // --->var x = 5,
      // --->....y = 7;
      
          var x = 5,
              y = 7;
      }

      Further Reading

      Expected indentation of 0 spaces but found 3 tabs.
      Open

                  })
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Unexpected tab character.
      Open

          async.parallel(lab_tasks,callback);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow all tabs (no-tabs)

      Some style guides don't allow the use of tab characters at all, including within comments.

      Rule Details

      This rule looks for tabs anywhere inside a file: code, comments or anything else.

      Examples of incorrect code for this rule:

      var a /t= 2;
      
      /**
      * /t/t it's a test function
      */
      function test(){}
      
      var x = 1; // /t test

      Examples of correct code for this rule:

      var a = 2;
      
      /**
      * it's a test function
      */
      function test(){}
      
      var x = 1; // test

      When Not To Use It

      If you have established a standard where having tabs is fine.

      Compatibility

      A space is required after ','.
      Open

          async.parallel(lab_tasks,callback);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Enforces spacing around commas (comma-spacing)

      Spacing around commas improve readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.

      var foo = 1, bar = 2;
      var foo = 1 ,bar = 2;

      Rule Details

      This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.

      This rule does not apply in an ArrayExpression or ArrayPattern in either of the following cases:

      • adjacent null elements
      • an initial null element, to avoid conflicts with the [array-bracket-spacing](array-bracket-spacing.md) rule

      Options

      This rule has an object option:

      • "before": false (default) disallows spaces before commas
      • "before": true requires one or more spaces before commas
      • "after": true (default) requires one or more spaces after commas
      • "after": false disallows spaces after commas

      after

      Examples of incorrect code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1 ,bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      
      var foo = 1, bar = 2
          , baz = 3;
      var arr = [1, 2];
      var arr = [1,, 3]
      var obj = {"foo": "bar", "baz": "qur"};
      foo(a, b);
      new Foo(a, b);
      function foo(a, b){}
      a, b

      Example of correct code for this rule with initial null element for the default { "before": false, "after": true } options:

      /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
      /*eslint array-bracket-spacing: ["error", "always"]*/
      
      var arr = [ , 2, 3 ]

      before

      Examples of incorrect code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1, bar = 2;
      var arr = [1 , 2];
      var obj = {"foo": "bar", "baz": "qur"};
      new Foo(a,b);
      function foo(a,b){}
      a, b

      Examples of correct code for this rule with the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      
      var foo = 1 ,bar = 2 ,
          baz = true;
      var arr = [1 ,2];
      var arr = [1 ,,3]
      var obj = {"foo": "bar" ,"baz": "qur"};
      foo(a ,b);
      new Foo(a ,b);
      function foo(a ,b){}
      a ,b

      Examples of correct code for this rule with initial null element for the { "before": true, "after": false } options:

      /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
      /*eslint array-bracket-spacing: ["error", "never"]*/
      
      var arr = [,2 ,3]

      When Not To Use It

      If your project will not be following a consistent comma-spacing pattern, turn this rule off.

      Further Reading

      Related Rules

      • [array-bracket-spacing](array-bracket-spacing.md)
      • [comma-style](comma-style.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      Missing semicolon.
      Open

      }
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow semicolons instead of ASI (semi)

      JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. For example, the following lines are both valid:

      var name = "ESLint"
      var website = "eslint.org";

      On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement.

      In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required, and thus decreases the possibility of introducing an error.

      However, the ASI mechanism can sometimes be tricky to people who are using semicolons. For example, consider this code:

      return
      {
          name: "ESLint"
      };

      This may look like a return statement that returns an object literal, however, the JavaScript engine will interpret this code as:

      return;
      {
          name: "ESLint";
      }

      Effectively, a semicolon is inserted after the return statement, causing the code below it (a labeled literal inside a block) to be unreachable. This rule and the [no-unreachable](no-unreachable.md) rule will protect your code from such cases.

      On the other side of the argument are those who says that since semicolons are inserted automatically, they are optional and do not need to be inserted manually. However, the ASI mechanism can also be tricky to people who don't use semicolons. For example, consider this code:

      var globalCounter = { }
      
      (function () {
          var n = 0
          globalCounter.increment = function () {
              return ++n
          }
      })()

      In this example, a semicolon will not be inserted after the first line, causing a run-time error (because an empty object is called as if it's a function). The [no-unexpected-multiline](no-unexpected-multiline.md) rule can protect your code from such cases.

      Although ASI allows for more freedom over your coding style, it can also make your code behave in an unexpected way, whether you use semicolons or not. Therefore, it is best to know when ASI takes place and when it does not, and have ESLint protect your code from these potentially unexpected cases. In short, as once described by Isaac Schlueter, a \n character always ends a statement (just like a semicolon) unless one of the following is true:

      1. The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
      2. The line is -- or ++ (in which case it will decrement/increment the next token.)
      3. It is a for(), while(), do, if(), or else, and there is no {
      4. The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

      Rule Details

      This rule enforces consistent use of semicolons.

      Options

      This rule has two options, a string option and an object option.

      String option:

      • "always" (default) requires semicolons at the end of statements
      • "never" disallows semicolons as the end of statements (except to disambiguate statements beginning with [, (, /, +, or -)

      Object option:

      • "omitLastInOneLineBlock": true ignores the last semicolon in a block in which its braces (and therefore the content of the block) are in the same line

      always

      Examples of incorrect code for this rule with the default "always" option:

      /*eslint semi: ["error", "always"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }

      Examples of correct code for this rule with the default "always" option:

      /*eslint semi: "error"*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      never

      Examples of incorrect code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint";
      
      object.method = function() {
          // ...
      };

      Examples of correct code for this rule with the "never" option:

      /*eslint semi: ["error", "never"]*/
      
      var name = "ESLint"
      
      object.method = function() {
          // ...
      }
      
      var name = "ESLint"
      
      ;(function() {
          // ...
      })()

      omitLastInOneLineBlock

      Examples of additional correct code for this rule with the "always", { "omitLastInOneLineBlock": true } options:

      /*eslint semi: ["error", "always", { "omitLastInOneLineBlock": true}] */
      
      if (foo) { bar() }
      
      if (foo) { bar(); baz() }

      When Not To Use It

      If you do not want to enforce semicolon usage (or omission) in any particular way, then you can turn this rule off.

      Further Reading

      Related Rules

      • [no-extra-semi](no-extra-semi.md)
      • [no-unexpected-multiline](no-unexpected-multiline.md)
      • [semi-spacing](semi-spacing.md) Source: http://eslint.org/docs/rules/

      Expected indentation of 0 spaces but found 1 tab.
      Open

          });
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      Expected indentation of 2 spaces but found 1 tab.
      Open

          async.parallel(lab_tasks,callback);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      enforce consistent indentation (indent)

      There are several common guidelines which require specific indentation of nested blocks and statements, like:

      function hello(indentSize, type) {
          if (indentSize === 4 && type !== 'tab') {
              console.log('Each next indentation will increase on 4 spaces');
          }
      }

      These are the most common scenarios recommended in different style guides:

      • Two spaces, not longer and no tabs: Google, npm, Node.js, Idiomatic, Felix
      • Tabs: jQuery
      • Four spaces: Crockford

      Rule Details

      This rule enforces a consistent indentation style. The default style is 4 spaces.

      Options

      This rule has a mixed option:

      For example, for 2-space indentation:

      {
          "indent": ["error", 2]
      }

      Or for tabbed indentation:

      {
          "indent": ["error", "tab"]
      }

      Examples of incorrect code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
        b=c;
        function foo(d) {
          e=f;
        }
      }

      Examples of correct code for this rule with the default options:

      /*eslint indent: "error"*/
      
      if (a) {
          b=c;
          function foo(d) {
              e=f;
          }
      }

      This rule has an object option:

      • "SwitchCase" (default: 0) enforces indentation level for case clauses in switch statements
      • "VariableDeclarator" (default: 1) enforces indentation level for var declarators; can also take an object to define separate rules for var, let and const declarations.
      • "outerIIFEBody" (default: 1) enforces indentation level for file-level IIFEs.
      • "MemberExpression" (off by default) enforces indentation level for multi-line property chains (except in variable declarations and assignments)
      • "FunctionDeclaration" takes an object to define rules for function declarations.
        • parameters (off by default) enforces indentation level for parameters in a function declaration. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the declaration must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function declaration.
      • "FunctionExpression" takes an object to define rules for function expressions.
        • parameters (off by default) enforces indentation level for parameters in a function expression. This can either be a number indicating indentation level, or the string "first" indicating that all parameters of the expression must be aligned with the first parameter.
        • body (default: 1) enforces indentation level for the body of a function expression.
      • "CallExpression" takes an object to define rules for function call expressions.
        • arguments (off by default) enforces indentation level for arguments in a call expression. This can either be a number indicating indentation level, or the string "first" indicating that all arguments of the expression must be aligned with the first argument.
      • "ArrayExpression" (default: 1) enforces indentation level for elements in arrays. It can also be set to the string "first", indicating that all the elements in the array should be aligned with the first element.
      • "ObjectExpression" (default: 1) enforces indentation level for properties in objects. It can be set to the string "first", indicating that all properties in the object should be aligned with the first property.

      Level of indentation denotes the multiple of the indent specified. Example:

      • Indent of 4 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 8 spaces.
      • Indent of 2 spaces with VariableDeclarator set to 2 will indent the multi-line variable declarations with 4 spaces.
      • Indent of 2 spaces with VariableDeclarator set to {"var": 2, "let": 2, "const": 3} will indent the multi-line variable declarations with 4 spaces for var and let, 6 spaces for const statements.
      • Indent of tab with VariableDeclarator set to 2 will indent the multi-line variable declarations with 2 tabs.
      • Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 1 will indent case clauses with 2 spaces with respect to switch statements.
      • Indent of 2 spaces with SwitchCase set to 2 will indent case clauses with 4 spaces with respect to switch statements.
      • Indent of tab with SwitchCase set to 2 will indent case clauses with 2 tabs with respect to switch statements.
      • Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 2 spaces with MemberExpression set to 1 will indent the multi-line property chains with 2 spaces.
      • Indent of 2 spaces with MemberExpression set to 2 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 0 will indent the multi-line property chains with 0 spaces.
      • Indent of 4 spaces with MemberExpression set to 1 will indent the multi-line property chains with 4 spaces.
      • Indent of 4 spaces with MemberExpression set to 2 will indent the multi-line property chains with 8 spaces.

      tab

      Examples of incorrect code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
           b=c;
      function foo(d) {
                 e=f;
       }
      }

      Examples of correct code for this rule with the "tab" option:

      /*eslint indent: ["error", "tab"]*/
      
      if (a) {
      /*tab*/b=c;
      /*tab*/function foo(d) {
      /*tab*//*tab*/e=f;
      /*tab*/}
      }

      SwitchCase

      Examples of incorrect code for this rule with the 2, { "SwitchCase": 1 } options:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
      case "a":
          break;
      case "b":
          break;
      }

      Examples of correct code for this rule with the 2, { "SwitchCase": 1 } option:

      /*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/
      
      switch(a){
        case "a":
          break;
        case "b":
          break;
      }

      VariableDeclarator

      Examples of incorrect code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 1 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
      /*eslint-env es6*/
      
      var a,
        b,
        c;
      let a,
        b,
        c;
      const a = 1,
        b = 2,
        c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": 2 } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
          b = 2,
          c = 3;

      Examples of correct code for this rule with the 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } } options:

      /*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
      /*eslint-env es6*/
      
      var a,
          b,
          c;
      let a,
          b,
          c;
      const a = 1,
            b = 2,
            c = 3;

      outerIIFEBody

      Examples of incorrect code for this rule with the options 2, { "outerIIFEBody": 0 }:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
        function foo(x) {
          return x + 1;
        }
      
      })();
      
      
      if(y) {
      console.log('foo');
      }

      Examples of correct code for this rule with the options 2, {"outerIIFEBody": 0}:

      /*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/
      
      (function() {
      
      function foo(x) {
        return x + 1;
      }
      
      })();
      
      
      if(y) {
         console.log('foo');
      }

      MemberExpression

      Examples of incorrect code for this rule with the 2, { "MemberExpression": 1 } options:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
      .bar
      .baz()

      Examples of correct code for this rule with the 2, { "MemberExpression": 1 } option:

      /*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
      
      foo
        .bar
        .baz();
      
      // Any indentation is permitted in variable declarations and assignments.
      var bip = aardvark.badger
                        .coyote;

      FunctionDeclaration

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/
      
      function foo(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionDeclaration": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/
      
      function foo(bar, baz,
                   qux, boop) {
        qux();
      }

      FunctionExpression

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
        baz,
        qux) {
          qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"body": 1, "parameters": 2} } option:

      /*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/
      
      var foo = function(bar,
          baz,
          qux) {
        qux();
      }

      Examples of incorrect code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
        qux, boop) {
        qux();
      }

      Examples of correct code for this rule with the 2, { "FunctionExpression": {"parameters": "first"} } option:

      /*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/
      
      var foo = function(bar, baz,
                         qux, boop) {
        qux();
      }

      CallExpression

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
          baz,
            qux
      );

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": 1} } option:

      /*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/
      
      foo(bar,
        baz,
        qux
      );

      Examples of incorrect code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
        baz, boop, beep);

      Examples of correct code for this rule with the 2, { "CallExpression": {"arguments": "first"} } option:

      /*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/
      
      foo(bar, baz,
          baz, boop, beep);

      ArrayExpression

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
          bar,
      baz,
            qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/
      
      var foo = [
        bar,
        baz,
        qux
      ];

      Examples of incorrect code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
        baz,
        qux
      ];

      Examples of correct code for this rule with the 2, { "ArrayExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/
      
      var foo = [bar,
                 baz,
                 qux
      ];

      ObjectExpression

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
          bar: 1,
      baz: 2,
            qux: 3
      };

      Examples of correct code for this rule with the 2, { "ObjectExpression": 1 } option:

      /*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/
      
      var foo = {
        bar: 1,
        baz: 2,
        qux: 3
      };

      Examples of incorrect code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
        baz: 2 };

      Examples of correct code for this rule with the 2, { "ObjectExpression": "first" } option:

      /*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/
      
      var foo = { bar: 1,
                  baz: 2 };

      Compatibility

      'languages' is not defined.
      Open

      languages = ['cpp','cpp14','java','python2','python3'];
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Undeclared Variables (no-undef)

      This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

      Rule Details

      Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

      Examples of incorrect code for this rule:

      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      Examples of correct code for this rule with global declaration:

      /*global someFunction b:true*/
      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      The b:true syntax in /*global */ indicates that assignment to b is correct.

      Examples of incorrect code for this rule with global declaration:

      /*global b*/
      /*eslint no-undef: "error"*/
      
      b = 10;

      By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

      Options

      • typeof set to true will warn for variables used inside typeof check (Default false).

      typeof

      Examples of correct code for the default { "typeof": false } option:

      /*eslint no-undef: "error"*/
      
      if (typeof UndefinedIdentifier === "undefined") {
          // do something ...
      }

      You can use this option if you want to prevent typeof check on a variable which has not been declared.

      Examples of incorrect code for the { "typeof": true } option:

      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Examples of correct code for the { "typeof": true } option with global declaration:

      /*global a*/
      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Environments

      For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

      browser

      Examples of correct code for this rule with browser environment:

      /*eslint no-undef: "error"*/
      /*eslint-env browser*/
      
      setTimeout(function() {
          alert("Hello");
      });

      node

      Examples of correct code for this rule with node environment:

      /*eslint no-undef: "error"*/
      /*eslint-env node*/
      
      var fs = require("fs");
      module.exports = function() {
          console.log(fs);
      };

      When Not To Use It

      If explicit declaration of global variables is not to your taste.

      Compatibility

      This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

      'user' is not defined.
      Open

                  user = userList[i];                    
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Undeclared Variables (no-undef)

      This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

      Rule Details

      Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

      Examples of incorrect code for this rule:

      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      Examples of correct code for this rule with global declaration:

      /*global someFunction b:true*/
      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      The b:true syntax in /*global */ indicates that assignment to b is correct.

      Examples of incorrect code for this rule with global declaration:

      /*global b*/
      /*eslint no-undef: "error"*/
      
      b = 10;

      By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

      Options

      • typeof set to true will warn for variables used inside typeof check (Default false).

      typeof

      Examples of correct code for the default { "typeof": false } option:

      /*eslint no-undef: "error"*/
      
      if (typeof UndefinedIdentifier === "undefined") {
          // do something ...
      }

      You can use this option if you want to prevent typeof check on a variable which has not been declared.

      Examples of incorrect code for the { "typeof": true } option:

      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Examples of correct code for the { "typeof": true } option with global declaration:

      /*global a*/
      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Environments

      For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

      browser

      Examples of correct code for this rule with browser environment:

      /*eslint no-undef: "error"*/
      /*eslint-env browser*/
      
      setTimeout(function() {
          alert("Hello");
      });

      node

      Examples of correct code for this rule with node environment:

      /*eslint no-undef: "error"*/
      /*eslint-env node*/
      
      var fs = require("fs");
      module.exports = function() {
          console.log(fs);
      };

      When Not To Use It

      If explicit declaration of global variables is not to your taste.

      Compatibility

      This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

      Unary operator '++' used.
      Open

              for(var i=0;i<userList.length;i++)
      Severity: Minor
      Found in main_server/reval/reval.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/

      'err' is already declared in the upper scope.
      Open

                      gitlab.getCommits(token,id,function(err,commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow variable declarations from shadowing variables declared in the outer scope (no-shadow)

      Shadowing is the process by which a local variable shares the same name as a variable in its containing scope. For example:

      var a = 3;
      function b() {
          var a = 10;
      }

      In this case, the variable a inside of b() is shadowing the variable a in the global scope. This can cause confusion while reading the code and it's impossible to access the global variable.

      Rule Details

      This rule aims to eliminate shadowed variable declarations.

      Examples of incorrect code for this rule:

      /*eslint no-shadow: "error"*/
      /*eslint-env es6*/
      
      var a = 3;
      function b() {
          var a = 10;
      }
      
      var b = function () {
          var a = 10;
      }
      
      function b(a) {
          a = 10;
      }
      b(a);
      
      if (true) {
          let a = 5;
      }

      Options

      This rule takes one option, an object, with properties "builtinGlobals", "hoist" and "allow".

      {
          "no-shadow": ["error", { "builtinGlobals": false, "hoist": "functions", "allow": [] }]
      }

      builtinGlobals

      The builtinGlobals option is false by default. If it is true, the rule prevents shadowing of built-in global variables: Object, Array, Number, and so on.

      Examples of incorrect code for the { "builtinGlobals": true } option:

      /*eslint no-shadow: ["error", { "builtinGlobals": true }]*/
      
      function foo() {
          var Object = 0;
      }

      hoist

      The hoist option has three settings:

      • functions (by default) - reports shadowing before the outer functions are defined.
      • all - reports all shadowing before the outer variables/functions are defined.
      • never - never report shadowing before the outer variables/functions are defined.

      hoist: functions

      Examples of incorrect code for the default { "hoist": "functions" } option:

      /*eslint no-shadow: ["error", { "hoist": "functions" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let b = 6;
      }
      
      function b() {}

      Although let b in the if statement is before the function declaration in the outer scope, it is incorrect.

      Examples of correct code for the default { "hoist": "functions" } option:

      /*eslint no-shadow: ["error", { "hoist": "functions" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let a = 3;
      }
      
      let a = 5;

      Because let a in the if statement is before the variable declaration in the outer scope, it is correct.

      hoist: all

      Examples of incorrect code for the { "hoist": "all" } option:

      /*eslint no-shadow: ["error", { "hoist": "all" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let a = 3;
          let b = 6;
      }
      
      let a = 5;
      function b() {}

      hoist: never

      Examples of correct code for the { "hoist": "never" } option:

      /*eslint no-shadow: ["error", { "hoist": "never" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let a = 3;
          let b = 6;
      }
      
      let a = 5;
      function b() {}

      Because let a and let b in the if statement are before the declarations in the outer scope, they are correct.

      allow

      The allow option is an array of identifier names for which shadowing is allowed. For example, "resolve", "reject", "done", "cb".

      Examples of correct code for the { "allow": ["done"] } option:

      /*eslint no-shadow: ["error", { "allow": ["done"] }]*/
      /*eslint-env es6*/
      
      import async from 'async';
      
      function foo(done) {
        async.map([1, 2], function (e, done) {
          done(null, e * 2)
        }, done);
      }
      
      foo(function (err, result) {
        console.log({ err, result });
      });

      Further Reading

      Related Rules

      Unexpected string concatenation of literals.
      Open

      var userList = fs.readFileSync(path.join(__dirname + '/..' + '/userList')).toString('utf-8').split('\n');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow unnecessary concatenation of strings (no-useless-concat)

      It's unnecessary to concatenate two strings together, such as:

      var foo = "a" + "b";

      This code is likely the result of refactoring where a variable was removed from the concatenation (such as "a" + b + "b"). In such a case, the concatenation isn't important and the code can be rewritten as:

      var foo = "ab";

      Rule Details

      This rule aims to flag the concatenation of 2 literals when they could be combined into a single literal. Literals can be strings or template literals.

      Examples of incorrect code for this rule:

      /*eslint no-useless-concat: "error"*/
      /*eslint-env es6*/
      
      // these are the same as "10"
      var a = `some` + `string`;
      var a = '1' + '0';
      var a = '1' + `0`;
      var a = `1` + '0';
      var a = `1` + `0`;

      Examples of correct code for this rule:

      /*eslint no-useless-concat: "error"*/
      
      // when a non string is included
      var c = a + b;
      var c = '1' + a;
      var a = 1 + '1';
      var c = 1 - 2;
      // when the string concatenation is multiline
      var c = "foo" +
          "bar";

      When Not To Use It

      If you don't want to be notified about unnecessary string concatenation, you can safely disable this rule. Source: http://eslint.org/docs/rules/

      'user' is not defined.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Undeclared Variables (no-undef)

      This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

      Rule Details

      Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

      Examples of incorrect code for this rule:

      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      Examples of correct code for this rule with global declaration:

      /*global someFunction b:true*/
      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      The b:true syntax in /*global */ indicates that assignment to b is correct.

      Examples of incorrect code for this rule with global declaration:

      /*global b*/
      /*eslint no-undef: "error"*/
      
      b = 10;

      By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

      Options

      • typeof set to true will warn for variables used inside typeof check (Default false).

      typeof

      Examples of correct code for the default { "typeof": false } option:

      /*eslint no-undef: "error"*/
      
      if (typeof UndefinedIdentifier === "undefined") {
          // do something ...
      }

      You can use this option if you want to prevent typeof check on a variable which has not been declared.

      Examples of incorrect code for the { "typeof": true } option:

      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Examples of correct code for the { "typeof": true } option with global declaration:

      /*global a*/
      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Environments

      For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

      browser

      Examples of correct code for this rule with browser environment:

      /*eslint no-undef: "error"*/
      /*eslint-env browser*/
      
      setTimeout(function() {
          alert("Hello");
      });

      node

      Examples of correct code for this rule with node environment:

      /*eslint no-undef: "error"*/
      /*eslint-env node*/
      
      var fs = require("fs");
      module.exports = function() {
          console.log(fs);
      };

      When Not To Use It

      If explicit declaration of global variables is not to your taste.

      Compatibility

      This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

      'user' is not defined.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Undeclared Variables (no-undef)

      This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

      Rule Details

      Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

      Examples of incorrect code for this rule:

      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      Examples of correct code for this rule with global declaration:

      /*global someFunction b:true*/
      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      The b:true syntax in /*global */ indicates that assignment to b is correct.

      Examples of incorrect code for this rule with global declaration:

      /*global b*/
      /*eslint no-undef: "error"*/
      
      b = 10;

      By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

      Options

      • typeof set to true will warn for variables used inside typeof check (Default false).

      typeof

      Examples of correct code for the default { "typeof": false } option:

      /*eslint no-undef: "error"*/
      
      if (typeof UndefinedIdentifier === "undefined") {
          // do something ...
      }

      You can use this option if you want to prevent typeof check on a variable which has not been declared.

      Examples of incorrect code for the { "typeof": true } option:

      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Examples of correct code for the { "typeof": true } option with global declaration:

      /*global a*/
      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Environments

      For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

      browser

      Examples of correct code for this rule with browser environment:

      /*eslint no-undef: "error"*/
      /*eslint-env browser*/
      
      setTimeout(function() {
          alert("Hello");
      });

      node

      Examples of correct code for this rule with node environment:

      /*eslint no-undef: "error"*/
      /*eslint-env node*/
      
      var fs = require("fs");
      module.exports = function() {
          console.log(fs);
      };

      When Not To Use It

      If explicit declaration of global variables is not to your taste.

      Compatibility

      This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

      for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow specified syntax (no-restricted-syntax)

      JavaScript has a lot of language features, and not everyone likes all of them. As a result, some projects choose to disallow the use of certain language features altogether. For instance, you might decide to disallow the use of try-catch or class, or you might decide to disallow the use of the in operator.

      Rather than creating separate rules for every language feature you want to turn off, this rule allows you to configure the syntax elements you want to restrict use of. These elements are represented by their ESTree node types. For example, a function declaration is represented by FunctionDeclaration and the with statement is represented by WithStatement. You may find the full list of AST node names you can use on GitHub and use the online parser to see what type of nodes your code consists of.

      You can also specify [AST selectors](../developer-guide/selectors) to restrict, allowing much more precise control over syntax patterns.

      Rule Details

      This rule disallows specified (that is, user-defined) syntax.

      Options

      This rule takes a list of strings, where each string is an AST selector:

      {
          "rules": {
              "no-restricted-syntax": ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"]
          }
      }

      Alternatively, the rule also accepts objects, where the selector and an optional custom message are specified:

      {
          "rules": {
              "no-restricted-syntax": [
                  "error",
                  {
                      "selector": "FunctionExpression",
                      "message": "Function expressions are not allowed."
                  },
                  {
                      "selector": "CallExpression[callee.name='setTimeout'][arguments.length!=2]",
                      "message": "setTimeout must always be invoked with two arguments."
                  }
              ]
          }
      }

      If a custom message is specified with the message property, ESLint will use that message when reporting occurrences of the syntax specified in the selector property.

      The string and object formats can be freely mixed in the configuration as needed.

      Examples of incorrect code for this rule with the "FunctionExpression", "WithStatement", BinaryExpression[operator='in'] options:

      /* eslint no-restricted-syntax: ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"] */
      
      with (me) {
          dontMess();
      }
      
      var doSomething = function () {};
      
      foo in bar;

      Examples of correct code for this rule with the "FunctionExpression", "WithStatement", BinaryExpression[operator='in'] options:

      /* eslint no-restricted-syntax: ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"] */
      
      me.dontMess();
      
      function doSomething() {};
      
      foo instanceof bar;

      When Not To Use It

      If you don't want to restrict your code from using any JavaScript features or syntax, you should not use this rule.

      Related Rules

      • [no-alert](no-alert.md)
      • [no-console](no-console.md)
      • [no-debugger](no-debugger.md)
      • [no-restricted-properties](no-restricted-properties.md) Source: http://eslint.org/docs/rules/

      'languages' is not defined.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Undeclared Variables (no-undef)

      This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

      Rule Details

      Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

      Examples of incorrect code for this rule:

      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      Examples of correct code for this rule with global declaration:

      /*global someFunction b:true*/
      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      The b:true syntax in /*global */ indicates that assignment to b is correct.

      Examples of incorrect code for this rule with global declaration:

      /*global b*/
      /*eslint no-undef: "error"*/
      
      b = 10;

      By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

      Options

      • typeof set to true will warn for variables used inside typeof check (Default false).

      typeof

      Examples of correct code for the default { "typeof": false } option:

      /*eslint no-undef: "error"*/
      
      if (typeof UndefinedIdentifier === "undefined") {
          // do something ...
      }

      You can use this option if you want to prevent typeof check on a variable which has not been declared.

      Examples of incorrect code for the { "typeof": true } option:

      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Examples of correct code for the { "typeof": true } option with global declaration:

      /*global a*/
      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Environments

      For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

      browser

      Examples of correct code for this rule with browser environment:

      /*eslint no-undef: "error"*/
      /*eslint-env browser*/
      
      setTimeout(function() {
          alert("Hello");
      });

      node

      Examples of correct code for this rule with node environment:

      /*eslint no-undef: "error"*/
      /*eslint-env node*/
      
      var fs = require("fs");
      module.exports = function() {
          console.log(fs);
      };

      When Not To Use It

      If explicit declaration of global variables is not to your taste.

      Compatibility

      This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

      'i' is already declared in the upper scope.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow variable declarations from shadowing variables declared in the outer scope (no-shadow)

      Shadowing is the process by which a local variable shares the same name as a variable in its containing scope. For example:

      var a = 3;
      function b() {
          var a = 10;
      }

      In this case, the variable a inside of b() is shadowing the variable a in the global scope. This can cause confusion while reading the code and it's impossible to access the global variable.

      Rule Details

      This rule aims to eliminate shadowed variable declarations.

      Examples of incorrect code for this rule:

      /*eslint no-shadow: "error"*/
      /*eslint-env es6*/
      
      var a = 3;
      function b() {
          var a = 10;
      }
      
      var b = function () {
          var a = 10;
      }
      
      function b(a) {
          a = 10;
      }
      b(a);
      
      if (true) {
          let a = 5;
      }

      Options

      This rule takes one option, an object, with properties "builtinGlobals", "hoist" and "allow".

      {
          "no-shadow": ["error", { "builtinGlobals": false, "hoist": "functions", "allow": [] }]
      }

      builtinGlobals

      The builtinGlobals option is false by default. If it is true, the rule prevents shadowing of built-in global variables: Object, Array, Number, and so on.

      Examples of incorrect code for the { "builtinGlobals": true } option:

      /*eslint no-shadow: ["error", { "builtinGlobals": true }]*/
      
      function foo() {
          var Object = 0;
      }

      hoist

      The hoist option has three settings:

      • functions (by default) - reports shadowing before the outer functions are defined.
      • all - reports all shadowing before the outer variables/functions are defined.
      • never - never report shadowing before the outer variables/functions are defined.

      hoist: functions

      Examples of incorrect code for the default { "hoist": "functions" } option:

      /*eslint no-shadow: ["error", { "hoist": "functions" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let b = 6;
      }
      
      function b() {}

      Although let b in the if statement is before the function declaration in the outer scope, it is incorrect.

      Examples of correct code for the default { "hoist": "functions" } option:

      /*eslint no-shadow: ["error", { "hoist": "functions" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let a = 3;
      }
      
      let a = 5;

      Because let a in the if statement is before the variable declaration in the outer scope, it is correct.

      hoist: all

      Examples of incorrect code for the { "hoist": "all" } option:

      /*eslint no-shadow: ["error", { "hoist": "all" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let a = 3;
          let b = 6;
      }
      
      let a = 5;
      function b() {}

      hoist: never

      Examples of correct code for the { "hoist": "never" } option:

      /*eslint no-shadow: ["error", { "hoist": "never" }]*/
      /*eslint-env es6*/
      
      if (true) {
          let a = 3;
          let b = 6;
      }
      
      let a = 5;
      function b() {}

      Because let a and let b in the if statement are before the declarations in the outer scope, they are correct.

      allow

      The allow option is an array of identifier names for which shadowing is allowed. For example, "resolve", "reject", "done", "cb".

      Examples of correct code for the { "allow": ["done"] } option:

      /*eslint no-shadow: ["error", { "allow": ["done"] }]*/
      /*eslint-env es6*/
      
      import async from 'async';
      
      function foo(done) {
        async.map([1, 2], function (e, done) {
          done(null, e * 2)
        }, done);
      }
      
      foo(function (err, result) {
        console.log({ err, result });
      });

      Further Reading

      Related Rules

      Unary operator '--' used.
      Open

                              number_of_requests--;
      Severity: Minor
      Found in main_server/reval/reval.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/

      Missing trailing comma.
      Open

                                           score:max_scores
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow trailing commas (comma-dangle)

      Trailing commas in object literals are valid according to the ECMAScript 5 (and ECMAScript 3!) spec. However, IE8 (when not in IE8 document mode) and below will throw an error when it encounters trailing commas in JavaScript.

      var foo = {
          bar: "baz",
          qux: "quux",
      };

      Trailing commas simplify adding and removing items to objects and arrays, since only the lines you are modifying must be touched. Another argument in favor of trailing commas is that it improves the clarity of diffs when an item is added or removed from an object or array:

      Less clear:

      var foo = {
      -    bar: "baz",
      -    qux: "quux"
      +    bar: "baz"
       };

      More clear:

      var foo = {
           bar: "baz",
      -    qux: "quux",
       };

      Rule Details

      This rule enforces consistent use of trailing commas in object and array literals.

      Options

      This rule has a string option or an object option:

      {
          "comma-dangle": ["error", "never"],
          // or
          "comma-dangle": ["error", {
              "arrays": "never",
              "objects": "never",
              "imports": "never",
              "exports": "never",
              "functions": "ignore",
          }]
      }
      • "never" (default) disallows trailing commas
      • "always" requires trailing commas
      • "always-multiline" requires trailing commas when the last element or property is in a different line than the closing ] or } and disallows trailing commas when the last element or property is on the same line as the closing ] or }
      • "only-multiline" allows (but does not require) trailing commas when the last element or property is in a different line than the closing ] or } and disallows trailing commas when the last element or property is on the same line as the closing ] or }

      Trailing commas in function declarations and function calls are valid syntax since ECMAScript 2017; however, the string option does not check these situations for backwards compatibility.

      You can also use an object option to configure this rule for each type of syntax. Each of the following options can be set to "never", "always", "always-multiline", "only-multiline", or "ignore". The default for each option is "never" unless otherwise specified.

      • arrays is for array literals and array patterns of destructuring. (e.g. let [a,] = [1,];)
      • objects is for object literals and object patterns of destructuring. (e.g. let {a,} = {a: 1};)
      • imports is for import declarations of ES Modules. (e.g. import {a,} from "foo";)
      • exports is for export declarations of ES Modules. (e.g. export {a,};)
      • functions is for function declarations and function calls. (e.g. (function(a,){ })(b,);)
        functions is set to "ignore" by default for consistency with the string option.

      never

      Examples of incorrect code for this rule with the default "never" option:

      /*eslint comma-dangle: ["error", "never"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var arr = [1,2,];
      
      foo({
        bar: "baz",
        qux: "quux",
      });

      Examples of correct code for this rule with the default "never" option:

      /*eslint comma-dangle: ["error", "never"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var arr = [1,2];
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint comma-dangle: ["error", "always"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var arr = [1,2];
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      Examples of correct code for this rule with the "always" option:

      /*eslint comma-dangle: ["error", "always"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var arr = [1,2,];
      
      foo({
        bar: "baz",
        qux: "quux",
      });

      always-multiline

      Examples of incorrect code for this rule with the "always-multiline" option:

      /*eslint comma-dangle: ["error", "always-multiline"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var foo = { bar: "baz", qux: "quux", };
      
      var arr = [1,2,];
      
      var arr = [1,
          2,];
      
      var arr = [
          1,
          2
      ];
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      Examples of correct code for this rule with the "always-multiline" option:

      /*eslint comma-dangle: ["error", "always-multiline"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var foo = {bar: "baz", qux: "quux"};
      var arr = [1,2];
      
      var arr = [1,
          2];
      
      var arr = [
          1,
          2,
      ];
      
      foo({
        bar: "baz",
        qux: "quux",
      });

      only-multiline

      Examples of incorrect code for this rule with the "only-multiline" option:

      /*eslint comma-dangle: ["error", "only-multiline"]*/
      
      var foo = { bar: "baz", qux: "quux", };
      
      var arr = [1,2,];
      
      var arr = [1,
          2,];

      Examples of correct code for this rule with the "only-multiline" option:

      /*eslint comma-dangle: ["error", "only-multiline"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var foo = {bar: "baz", qux: "quux"};
      var arr = [1,2];
      
      var arr = [1,
          2];
      
      var arr = [
          1,
          2,
      ];
      
      var arr = [
          1,
          2
      ];
      
      foo({
        bar: "baz",
        qux: "quux",
      });
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      functions

      Examples of incorrect code for this rule with the {"functions": "never"} option:

      /*eslint comma-dangle: ["error", {"functions": "never"}]*/
      
      function foo(a, b,) {
      }
      
      foo(a, b,);
      new foo(a, b,);

      Examples of correct code for this rule with the {"functions": "never"} option:

      /*eslint comma-dangle: ["error", {"functions": "never"}]*/
      
      function foo(a, b) {
      }
      
      foo(a, b);
      new foo(a, b);

      Examples of incorrect code for this rule with the {"functions": "always"} option:

      /*eslint comma-dangle: ["error", {"functions": "always"}]*/
      
      function foo(a, b) {
      }
      
      foo(a, b);
      new foo(a, b);

      Examples of correct code for this rule with the {"functions": "always"} option:

      /*eslint comma-dangle: ["error", {"functions": "always"}]*/
      
      function foo(a, b,) {
      }
      
      foo(a, b,);
      new foo(a, b,);

      When Not To Use It

      You can turn this rule off if you are not concerned with dangling commas. Source: http://eslint.org/docs/rules/

      The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.
      Open

                              for(var lang in languages) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Guarding for-in (guard-for-in)

      Looping over objects with a for in loop will include properties that are inherited through the prototype chain. This behavior can lead to unexpected items in your for loop.

      for (key in foo) {
          doSomething(key);
      }

      Note that simply checking foo.hasOwnProperty(key) is likely to cause an error in some cases; see [no-prototype-builtins](no-prototype-builtins.md).

      Rule Details

      This rule is aimed at preventing unexpected behavior that could arise from using a for in loop without filtering the results in the loop. As such, it will warn when for in loops do not filter their results with an if statement.

      Examples of incorrect code for this rule:

      /*eslint guard-for-in: "error"*/
      
      for (key in foo) {
          doSomething(key);
      }

      Examples of correct code for this rule:

      /*eslint guard-for-in: "error"*/
      
      for (key in foo) {
          if (Object.prototype.hasOwnProperty.call(foo, key)) {
              doSomething(key);
          }
          if ({}.hasOwnProperty.call(foo, key)) {
              doSomething(key);
          }
      }

      Related Rules

      • [no-prototype-builtins](no-prototype-builtins.md)

      Further Reading

      Expected to return a value at the end of function.
      Open

                          socket.on('scores',function(data)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require return statements to either always or never specify values (consistent-return)

      Unlike statically-typed languages which enforce that a function returns a specified type of value, JavaScript allows different code paths in a function to return different types of values.

      A confusing aspect of JavaScript is that a function returns undefined if any of the following are true:

      • it does not execute a return statement before it exits
      • it executes return which does not specify a value explicitly
      • it executes return undefined
      • it executes return void followed by an expression (for example, a function call)
      • it executes return followed by any other expression which evaluates to undefined

      If any code paths in a function return a value explicitly but some code path do not return a value explicitly, it might be a typing mistake, especially in a large function. In the following example:

      • a code path through the function returns a Boolean value true
      • another code path does not return a value explicitly, therefore returns undefined implicitly
      function doSomething(condition) {
          if (condition) {
              return true;
          } else {
              return;
          }
      }

      Rule Details

      This rule requires return statements to either always or never specify values. This rule ignores function definitions where the name begins with an uppercase letter, because constructors (when invoked with the new operator) return the instantiated object implicitly if they do not return another object explicitly.

      Examples of incorrect code for this rule:

      /*eslint consistent-return: "error"*/
      
      function doSomething(condition) {
          if (condition) {
              return true;
          } else {
              return;
          }
      }
      
      function doSomething(condition) {
          if (condition) {
              return true;
          }
      }

      Examples of correct code for this rule:

      /*eslint consistent-return: "error"*/
      
      function doSomething(condition) {
          if (condition) {
              return true;
          } else {
              return false;
          }
      }
      
      function Foo() {
          if (!(this instanceof Foo)) {
              return new Foo();
          }
      
          this.a = 0;
      }

      Options

      This rule has an object option:

      • "treatUndefinedAsUnspecified": false (default) always either specify values or return undefined implicitly only.
      • "treatUndefinedAsUnspecified": true always either specify values or return undefined explicitly or implicitly.

      treatUndefinedAsUnspecified

      Examples of incorrect code for this rule with the default { "treatUndefinedAsUnspecified": false } option:

      /*eslint consistent-return: ["error", { "treatUndefinedAsUnspecified": false }]*/
      
      function foo(callback) {
          if (callback) {
              return void callback();
          }
          // no return statement
      }
      
      function bar(condition) {
          if (condition) {
              return undefined;
          }
          // no return statement
      }

      Examples of incorrect code for this rule with the { "treatUndefinedAsUnspecified": true } option:

      /*eslint consistent-return: ["error", { "treatUndefinedAsUnspecified": true }]*/
      
      function foo(callback) {
          if (callback) {
              return void callback();
          }
          return true;
      }
      
      function bar(condition) {
          if (condition) {
              return undefined;
          }
          return true;
      }

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

      /*eslint consistent-return: ["error", { "treatUndefinedAsUnspecified": true }]*/
      
      function foo(callback) {
          if (callback) {
              return void callback();
          }
          // no return statement
      }
      
      function bar(condition) {
          if (condition) {
              return undefined;
          }
          // no return statement
      }

      When Not To Use It

      If you want to allow functions to have different return behavior depending on code branching, then it is safe to disable this rule. Source: http://eslint.org/docs/rules/

      Unary operator '++' used.
      Open

                              for(var i =0; i < data.marks.length;i++) total_score+=Number(data.marks[i]);
      Severity: Minor
      Found in main_server/reval/reval.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/

      'languages' is not defined.
      Open

                                  socket.emit('submission',[user,lab,commits[commit].id,languages[lang],admin_key]);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Undeclared Variables (no-undef)

      This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

      Rule Details

      Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

      Examples of incorrect code for this rule:

      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      Examples of correct code for this rule with global declaration:

      /*global someFunction b:true*/
      /*eslint no-undef: "error"*/
      
      var a = someFunction();
      b = 10;

      The b:true syntax in /*global */ indicates that assignment to b is correct.

      Examples of incorrect code for this rule with global declaration:

      /*global b*/
      /*eslint no-undef: "error"*/
      
      b = 10;

      By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

      Options

      • typeof set to true will warn for variables used inside typeof check (Default false).

      typeof

      Examples of correct code for the default { "typeof": false } option:

      /*eslint no-undef: "error"*/
      
      if (typeof UndefinedIdentifier === "undefined") {
          // do something ...
      }

      You can use this option if you want to prevent typeof check on a variable which has not been declared.

      Examples of incorrect code for the { "typeof": true } option:

      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Examples of correct code for the { "typeof": true } option with global declaration:

      /*global a*/
      /*eslint no-undef: ["error", { "typeof": true }] */
      
      if(typeof a === "string"){}

      Environments

      For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

      browser

      Examples of correct code for this rule with browser environment:

      /*eslint no-undef: "error"*/
      /*eslint-env browser*/
      
      setTimeout(function() {
          alert("Hello");
      });

      node

      Examples of correct code for this rule with node environment:

      /*eslint no-undef: "error"*/
      /*eslint-env node*/
      
      var fs = require("fs");
      module.exports = function() {
          console.log(fs);
      };

      When Not To Use It

      If explicit declaration of global variables is not to your taste.

      Compatibility

      This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

      Unary operator '++' used.
      Open

                                  number_of_requests++;
      Severity: Minor
      Found in main_server/reval/reval.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/

      Missing trailing comma.
      Open

          port: '9000'     //require('../config/conf.json').host_port.port
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      require or disallow trailing commas (comma-dangle)

      Trailing commas in object literals are valid according to the ECMAScript 5 (and ECMAScript 3!) spec. However, IE8 (when not in IE8 document mode) and below will throw an error when it encounters trailing commas in JavaScript.

      var foo = {
          bar: "baz",
          qux: "quux",
      };

      Trailing commas simplify adding and removing items to objects and arrays, since only the lines you are modifying must be touched. Another argument in favor of trailing commas is that it improves the clarity of diffs when an item is added or removed from an object or array:

      Less clear:

      var foo = {
      -    bar: "baz",
      -    qux: "quux"
      +    bar: "baz"
       };

      More clear:

      var foo = {
           bar: "baz",
      -    qux: "quux",
       };

      Rule Details

      This rule enforces consistent use of trailing commas in object and array literals.

      Options

      This rule has a string option or an object option:

      {
          "comma-dangle": ["error", "never"],
          // or
          "comma-dangle": ["error", {
              "arrays": "never",
              "objects": "never",
              "imports": "never",
              "exports": "never",
              "functions": "ignore",
          }]
      }
      • "never" (default) disallows trailing commas
      • "always" requires trailing commas
      • "always-multiline" requires trailing commas when the last element or property is in a different line than the closing ] or } and disallows trailing commas when the last element or property is on the same line as the closing ] or }
      • "only-multiline" allows (but does not require) trailing commas when the last element or property is in a different line than the closing ] or } and disallows trailing commas when the last element or property is on the same line as the closing ] or }

      Trailing commas in function declarations and function calls are valid syntax since ECMAScript 2017; however, the string option does not check these situations for backwards compatibility.

      You can also use an object option to configure this rule for each type of syntax. Each of the following options can be set to "never", "always", "always-multiline", "only-multiline", or "ignore". The default for each option is "never" unless otherwise specified.

      • arrays is for array literals and array patterns of destructuring. (e.g. let [a,] = [1,];)
      • objects is for object literals and object patterns of destructuring. (e.g. let {a,} = {a: 1};)
      • imports is for import declarations of ES Modules. (e.g. import {a,} from "foo";)
      • exports is for export declarations of ES Modules. (e.g. export {a,};)
      • functions is for function declarations and function calls. (e.g. (function(a,){ })(b,);)
        functions is set to "ignore" by default for consistency with the string option.

      never

      Examples of incorrect code for this rule with the default "never" option:

      /*eslint comma-dangle: ["error", "never"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var arr = [1,2,];
      
      foo({
        bar: "baz",
        qux: "quux",
      });

      Examples of correct code for this rule with the default "never" option:

      /*eslint comma-dangle: ["error", "never"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var arr = [1,2];
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      always

      Examples of incorrect code for this rule with the "always" option:

      /*eslint comma-dangle: ["error", "always"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var arr = [1,2];
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      Examples of correct code for this rule with the "always" option:

      /*eslint comma-dangle: ["error", "always"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var arr = [1,2,];
      
      foo({
        bar: "baz",
        qux: "quux",
      });

      always-multiline

      Examples of incorrect code for this rule with the "always-multiline" option:

      /*eslint comma-dangle: ["error", "always-multiline"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var foo = { bar: "baz", qux: "quux", };
      
      var arr = [1,2,];
      
      var arr = [1,
          2,];
      
      var arr = [
          1,
          2
      ];
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      Examples of correct code for this rule with the "always-multiline" option:

      /*eslint comma-dangle: ["error", "always-multiline"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var foo = {bar: "baz", qux: "quux"};
      var arr = [1,2];
      
      var arr = [1,
          2];
      
      var arr = [
          1,
          2,
      ];
      
      foo({
        bar: "baz",
        qux: "quux",
      });

      only-multiline

      Examples of incorrect code for this rule with the "only-multiline" option:

      /*eslint comma-dangle: ["error", "only-multiline"]*/
      
      var foo = { bar: "baz", qux: "quux", };
      
      var arr = [1,2,];
      
      var arr = [1,
          2,];

      Examples of correct code for this rule with the "only-multiline" option:

      /*eslint comma-dangle: ["error", "only-multiline"]*/
      
      var foo = {
          bar: "baz",
          qux: "quux",
      };
      
      var foo = {
          bar: "baz",
          qux: "quux"
      };
      
      var foo = {bar: "baz", qux: "quux"};
      var arr = [1,2];
      
      var arr = [1,
          2];
      
      var arr = [
          1,
          2,
      ];
      
      var arr = [
          1,
          2
      ];
      
      foo({
        bar: "baz",
        qux: "quux",
      });
      
      foo({
        bar: "baz",
        qux: "quux"
      });

      functions

      Examples of incorrect code for this rule with the {"functions": "never"} option:

      /*eslint comma-dangle: ["error", {"functions": "never"}]*/
      
      function foo(a, b,) {
      }
      
      foo(a, b,);
      new foo(a, b,);

      Examples of correct code for this rule with the {"functions": "never"} option:

      /*eslint comma-dangle: ["error", {"functions": "never"}]*/
      
      function foo(a, b) {
      }
      
      foo(a, b);
      new foo(a, b);

      Examples of incorrect code for this rule with the {"functions": "always"} option:

      /*eslint comma-dangle: ["error", {"functions": "always"}]*/
      
      function foo(a, b) {
      }
      
      foo(a, b);
      new foo(a, b);

      Examples of correct code for this rule with the {"functions": "always"} option:

      /*eslint comma-dangle: ["error", {"functions": "always"}]*/
      
      function foo(a, b,) {
      }
      
      foo(a, b,);
      new foo(a, b,);

      When Not To Use It

      You can turn this rule off if you are not concerned with dangling commas. Source: http://eslint.org/docs/rules/

      Use path.join() or path.resolve() instead of + to create paths.
      Open

      var userList = fs.readFileSync(path.join(__dirname + '/..' + '/userList')).toString('utf-8').split('\n');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow string concatenation when using __dirname and __filename (no-path-concat)

      In Node.js, the __dirname and __filename global variables contain the directory path and the file path of the currently executing script file, respectively. Sometimes, developers try to use these variables to create paths to other files, such as:

      var fullPath = __dirname + "/foo.js";

      However, there are a few problems with this. First, you can't be sure what type of system the script is running on. Node.js can be run on any computer, including Windows, which uses a different path separator. It's very easy, therefore, to create an invalid path using string concatenation and assuming Unix-style separators. There's also the possibility of having double separators, or otherwise ending up with an invalid path.

      In order to avoid any confusion as to how to create the correct path, Node.js provides the path module. This module uses system-specific information to always return the correct value. So you can rewrite the previous example as:

      var fullPath = path.join(__dirname, "foo.js");

      This example doesn't need to include separators as path.join() will do it in the most appropriate manner. Alternately, you can use path.resolve() to retrieve the fully-qualified path:

      var fullPath = path.resolve(__dirname, "foo.js");

      Both path.join() and path.resolve() are suitable replacements for string concatenation wherever file or directory paths are being created.

      Rule Details

      This rule aims to prevent string concatenation of directory paths in Node.js

      Examples of incorrect code for this rule:

      /*eslint no-path-concat: "error"*/
      
      var fullPath = __dirname + "/foo.js";
      
      var fullPath = __filename + "/foo.js";

      Examples of correct code for this rule:

      /*eslint no-path-concat: "error"*/
      
      var fullPath = dirname + "/foo.js";

      When Not To Use It

      If you want to allow string concatenation of path names. Source: http://eslint.org/docs/rules/

      Multiple spaces found before 'require'.
      Open

          var socket =  require('socket.io-client')('https://'+main_server.hostname+":"+main_server.port);
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow multiple spaces (no-multi-spaces)

      Multiple spaces in a row that are not used for indentation are typically mistakes. For example:

      if(foo  === "bar") {}

      It's hard to tell, but there are two spaces between foo and ===. Multiple spaces such as this are generally frowned upon in favor of single spaces:

      if(foo === "bar") {}

      Rule Details

      This rule aims to disallow multiple whitespace around logical expressions, conditional expressions, declarations, array elements, object properties, sequences and function parameters.

      Examples of incorrect code for this rule:

      /*eslint no-multi-spaces: "error"*/
      
      var a =  1;
      
      if(foo   === "bar") {}
      
      a <<  b
      
      var arr = [1,  2];
      
      a ?  b: c

      Examples of correct code for this rule:

      /*eslint no-multi-spaces: "error"*/
      
      var a = 1;
      
      if(foo === "bar") {}
      
      a << b
      
      var arr = [1, 2];
      
      a ? b: c

      Options

      To avoid contradictions if some other rules require multiple spaces, this rule has an option to ignore certain node types in the abstract syntax tree (AST) of JavaScript code.

      exceptions

      The exceptions object expects property names to be AST node types as defined by ESTree. The easiest way to determine the node types for exceptions is to use the online demo.

      Only the Property node type is ignored by default, because for the [key-spacing](key-spacing.md) rule some alignment options require multiple spaces in properties of object literals.

      Examples of correct code for the default "exceptions": { "Property": true } option:

      /*eslint no-multi-spaces: "error"*/
      /*eslint key-spacing: ["error", { align: "value" }]*/
      
      var obj = {
          first:  "first",
          second: "second"
      };

      Examples of incorrect code for the "exceptions": { "Property": false } option:

      /*eslint no-multi-spaces: ["error", { exceptions: { "Property": false } }]*/
      /*eslint key-spacing: ["error", { align: "value" }]*/
      
      var obj = {
          first:  "first",
          second: "second"
      };

      Examples of correct code for the "exceptions": { "BinaryExpression": true } option:

      /*eslint no-multi-spaces: ["error", { exceptions: { "BinaryExpression": true } }]*/
      
      var a = 1  *  2;

      Examples of correct code for the "exceptions": { "VariableDeclarator": true } option:

      /*eslint no-multi-spaces: ["error", { exceptions: { "VariableDeclarator": true } }]*/
      
      var someVar      = 'foo';
      var someOtherVar = 'barBaz';

      Examples of correct code for the "exceptions": { "ImportDeclaration": true } option:

      /*eslint no-multi-spaces: ["error", { exceptions: { "ImportDeclaration": true } }]*/
      
      import mod          from 'mod';
      import someOtherMod from 'some-other-mod';

      When Not To Use It

      If you don't want to check and disallow multiple spaces, then you should turn this rule off.

      Related Rules

      • [key-spacing](key-spacing.md)
      • [space-infix-ops](space-infix-ops.md)
      • [space-in-brackets](space-in-brackets.md) (deprecated)
      • [space-in-parens](space-in-parens.md)
      • [space-after-keywords](space-after-keywords)
      • [space-unary-ops](space-unary-ops)
      • [space-return-throw-case](space-return-throw-case) Source: http://eslint.org/docs/rules/

      for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      disallow specified syntax (no-restricted-syntax)

      JavaScript has a lot of language features, and not everyone likes all of them. As a result, some projects choose to disallow the use of certain language features altogether. For instance, you might decide to disallow the use of try-catch or class, or you might decide to disallow the use of the in operator.

      Rather than creating separate rules for every language feature you want to turn off, this rule allows you to configure the syntax elements you want to restrict use of. These elements are represented by their ESTree node types. For example, a function declaration is represented by FunctionDeclaration and the with statement is represented by WithStatement. You may find the full list of AST node names you can use on GitHub and use the online parser to see what type of nodes your code consists of.

      You can also specify [AST selectors](../developer-guide/selectors) to restrict, allowing much more precise control over syntax patterns.

      Rule Details

      This rule disallows specified (that is, user-defined) syntax.

      Options

      This rule takes a list of strings, where each string is an AST selector:

      {
          "rules": {
              "no-restricted-syntax": ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"]
          }
      }

      Alternatively, the rule also accepts objects, where the selector and an optional custom message are specified:

      {
          "rules": {
              "no-restricted-syntax": [
                  "error",
                  {
                      "selector": "FunctionExpression",
                      "message": "Function expressions are not allowed."
                  },
                  {
                      "selector": "CallExpression[callee.name='setTimeout'][arguments.length!=2]",
                      "message": "setTimeout must always be invoked with two arguments."
                  }
              ]
          }
      }

      If a custom message is specified with the message property, ESLint will use that message when reporting occurrences of the syntax specified in the selector property.

      The string and object formats can be freely mixed in the configuration as needed.

      Examples of incorrect code for this rule with the "FunctionExpression", "WithStatement", BinaryExpression[operator='in'] options:

      /* eslint no-restricted-syntax: ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"] */
      
      with (me) {
          dontMess();
      }
      
      var doSomething = function () {};
      
      foo in bar;

      Examples of correct code for this rule with the "FunctionExpression", "WithStatement", BinaryExpression[operator='in'] options:

      /* eslint no-restricted-syntax: ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"] */
      
      me.dontMess();
      
      function doSomething() {};
      
      foo instanceof bar;

      When Not To Use It

      If you don't want to restrict your code from using any JavaScript features or syntax, you should not use this rule.

      Related Rules

      • [no-alert](no-alert.md)
      • [no-console](no-console.md)
      • [no-debugger](no-debugger.md)
      • [no-restricted-properties](no-restricted-properties.md) Source: http://eslint.org/docs/rules/

      The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.
      Open

                          for(var commit in commits) 
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Require Guarding for-in (guard-for-in)

      Looping over objects with a for in loop will include properties that are inherited through the prototype chain. This behavior can lead to unexpected items in your for loop.

      for (key in foo) {
          doSomething(key);
      }

      Note that simply checking foo.hasOwnProperty(key) is likely to cause an error in some cases; see [no-prototype-builtins](no-prototype-builtins.md).

      Rule Details

      This rule is aimed at preventing unexpected behavior that could arise from using a for in loop without filtering the results in the loop. As such, it will warn when for in loops do not filter their results with an if statement.

      Examples of incorrect code for this rule:

      /*eslint guard-for-in: "error"*/
      
      for (key in foo) {
          doSomething(key);
      }

      Examples of correct code for this rule:

      /*eslint guard-for-in: "error"*/
      
      for (key in foo) {
          if (Object.prototype.hasOwnProperty.call(foo, key)) {
              doSomething(key);
          }
          if ({}.hasOwnProperty.call(foo, key)) {
              doSomething(key);
          }
      }

      Related Rules

      • [no-prototype-builtins](no-prototype-builtins.md)

      Further Reading

      Don't make functions within a loop.
      Open

                  gitlab.getProjectId(token,user,lab,function(error,id)
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

      Disallow Functions in Loops (no-loop-func)

      Writing functions within loops tends to result in errors due to the way the function creates a closure around the loop. For example:

      for (var i = 0; i < 10; i++) {
          funcs[i] = function() {
              return i;
          };
      }

      In this case, you would expect each function created within the loop to return a different number. In reality, each function returns 10, because that was the last value of i in the scope.

      let or const mitigate this problem.

      /*eslint-env es6*/
      
      for (let i = 0; i < 10; i++) {
          funcs[i] = function() {
              return i;
          };
      }

      In this case, each function created within the loop returns a different number as expected.

      Rule Details

      This error is raised to highlight a piece of code that may not work as you expect it to and could also indicate a misunderstanding of how the language works. Your code may run without any problems if you do not fix this error, but in some situations it could behave unexpectedly.

      Examples of incorrect code for this rule:

      /*eslint no-loop-func: "error"*/
      /*eslint-env es6*/
      
      for (var i=10; i; i--) {
          (function() { return i; })();
      }
      
      while(i) {
          var a = function() { return i; };
          a();
      }
      
      do {
          function a() { return i; };
          a();
      } while (i);
      
      let foo = 0;
      for (let i=10; i; i--) {
          // Bad, function is referencing block scoped variable in the outer scope.
          var a = function() { return foo; };
          a();
      }

      Examples of correct code for this rule:

      /*eslint no-loop-func: "error"*/
      /*eslint-env es6*/
      
      var a = function() {};
      
      for (var i=10; i; i--) {
          a();
      }
      
      for (var i=10; i; i--) {
          var a = function() {}; // OK, no references to variables in the outer scopes.
          a();
      }
      
      for (let i=10; i; i--) {
          var a = function() { return i; }; // OK, all references are referring to block scoped variables in the loop.
          a();
      }
      
      var foo = 100;
      for (let i=10; i; i--) {
          var a = function() { return foo; }; // OK, all references are referring to never modified variables.
          a();
      }
      //... no modifications of foo after this loop ...

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

      Expected empty line after require statement not followed by another require.
      Open

      var async = require('async');
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

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

      Expected empty line after require statement not followed by another require.
      Open

      var path = require('path')
      Severity: Minor
      Found in main_server/reval/reval.js by eslint

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

      There are no issues that match your filters.

      Category
      Status