HansHammel/watchmen

View on GitHub

Showing 1,086 of 1,086 total issues

Adjoining classes: .details-page .chart .c3-region.region-outage
Open

.details-page .chart .c3-region.region-outage{fill:#d9534f}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Adjoining classes: .ng-table th.sortable.sort-asc
Open

.ng-table th.sortable.sort-asc,.ng-table th.sortable.sort-desc{background-color:#f5f5f5;border-radius:3px}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Using width with padding-right can sometimes make elements larger than you expect.
Open

.services-sidebar table td.uptime{width:30%;padding-right:5px}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

  .col3 { width:100%; max-width:100%; }
Severity: Minor
Found in coverage/lcov-report/base.css by csslint

Using width with padding can sometimes make elements larger than you expect.
Open

    padding: 0 5px;
Severity: Minor
Found in coverage/lcov-report/base.css by csslint

Use of !important
Open

.coverage-summary td.pic { min-width: 120px !important;  }
Severity: Minor
Found in coverage/lcov-report/base.css by csslint

Use of !important
Open

.cbranch-no { background:  yellow !important; color: #111; }
Severity: Minor
Found in coverage/lcov-report/base.css by csslint

Move the invocation into the parens that contain the function.
Open

(function () {

Require IIFEs to be Wrapped (wrap-iife)

You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

// function expression could be unwrapped
var x = function () { return { y: 1 };}();

// function declaration must be wrapped
function () { /* side effects */ }(); // SyntaxError

Rule Details

This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

Options

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

String option:

  • "outside" enforces always wrapping the call expression. The default is "outside".
  • "inside" enforces always wrapping the function expression.
  • "any" enforces always wrapping, but allows either style.

Object option:

  • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

outside

Examples of incorrect code for the default "outside" option:

/*eslint wrap-iife: ["error", "outside"]*/

var x = function () { return { y: 1 };}(); // unwrapped
var x = (function () { return { y: 1 };})(); // wrapped function expression

Examples of correct code for the default "outside" option:

/*eslint wrap-iife: ["error", "outside"]*/

var x = (function () { return { y: 1 };}()); // wrapped call expression

inside

Examples of incorrect code for the "inside" option:

/*eslint wrap-iife: ["error", "inside"]*/

var x = function () { return { y: 1 };}(); // unwrapped
var x = (function () { return { y: 1 };}()); // wrapped call expression

Examples of correct code for the "inside" option:

/*eslint wrap-iife: ["error", "inside"]*/

var x = (function () { return { y: 1 };})(); // wrapped function expression

any

Examples of incorrect code for the "any" option:

/*eslint wrap-iife: ["error", "any"]*/

var x = function () { return { y: 1 };}(); // unwrapped

Examples of correct code for the "any" option:

/*eslint wrap-iife: ["error", "any"]*/

var x = (function () { return { y: 1 };}()); // wrapped call expression
var x = (function () { return { y: 1 };})(); // wrapped function expression

functionPrototypeMethods

Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

/* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */

var x = function(){ foo(); }()
var x = (function(){ foo(); }())
var x = function(){ foo(); }.call(bar)
var x = (function(){ foo(); }.call(bar))

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

/* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */

var x = (function(){ foo(); })()
var x = (function(){ foo(); }).call(bar)

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

Move the invocation into the parens that contain the function.
Open

(function () {

Require IIFEs to be Wrapped (wrap-iife)

You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

// function expression could be unwrapped
var x = function () { return { y: 1 };}();

// function declaration must be wrapped
function () { /* side effects */ }(); // SyntaxError

Rule Details

This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

Options

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

String option:

  • "outside" enforces always wrapping the call expression. The default is "outside".
  • "inside" enforces always wrapping the function expression.
  • "any" enforces always wrapping, but allows either style.

Object option:

  • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

outside

Examples of incorrect code for the default "outside" option:

/*eslint wrap-iife: ["error", "outside"]*/

var x = function () { return { y: 1 };}(); // unwrapped
var x = (function () { return { y: 1 };})(); // wrapped function expression

Examples of correct code for the default "outside" option:

/*eslint wrap-iife: ["error", "outside"]*/

var x = (function () { return { y: 1 };}()); // wrapped call expression

inside

Examples of incorrect code for the "inside" option:

/*eslint wrap-iife: ["error", "inside"]*/

var x = function () { return { y: 1 };}(); // unwrapped
var x = (function () { return { y: 1 };}()); // wrapped call expression

Examples of correct code for the "inside" option:

/*eslint wrap-iife: ["error", "inside"]*/

var x = (function () { return { y: 1 };})(); // wrapped function expression

any

Examples of incorrect code for the "any" option:

/*eslint wrap-iife: ["error", "any"]*/

var x = function () { return { y: 1 };}(); // unwrapped

Examples of correct code for the "any" option:

/*eslint wrap-iife: ["error", "any"]*/

var x = (function () { return { y: 1 };}()); // wrapped call expression
var x = (function () { return { y: 1 };})(); // wrapped function expression

functionPrototypeMethods

Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

/* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */

var x = function(){ foo(); }()
var x = (function(){ foo(); }())
var x = function(){ foo(); }.call(bar)
var x = (function(){ foo(); }.call(bar))

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

/* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */

var x = (function(){ foo(); })()
var x = (function(){ foo(); }).call(bar)

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

Use of !important
Open

.visible-print-inline{display:none!important}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Adjoining classes: .c3-target.c3-defocused
Open

.c3-target.c3-defocused{opacity:.3!important}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Adjoining classes: .details-page .chart .c3-ygrid-line.threshold text
Open

.details-page .chart .c3-ygrid-line.threshold text{fill:gray;font-size:1.2em}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

.details-page .chart span{margin-right:10px;font-size:1.1em}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Heading (h2) has already been defined.
Open

h2{margin:10px 0;color:gray;font-size:2.1em}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Element (td.service) is overqualified, just use .service without element name.
Open

.table-services td.service{text-transform:uppercase;margin-top:20px;opacity:.6;font-size:100%;color:gray}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

.filter-container input.query{padding-left:30px;display:block}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

.services-sidebar table td.uptime{width:30%;padding-right:5px}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Element (span.down) is overqualified, just use .down without element name.
Open

.services-sidebar table td.uptime span.down{color:#d9534f}
Severity: Minor
Found in webserver/public/build/style.css by csslint

Element (input.ng-dirty.ng-invalid) is overqualified, just use .ng-dirty without element name.
Open

input.ng-dirty.ng-invalid,input.ng-touched.ng-invalid{color:red;border-color:red}
Severity: Minor
Found in webserver/public/build/style.css by csslint

The universal selector (*) is known to be slow.
Open

*, *:after, *:before {
Severity: Minor
Found in coverage/lcov-report/base.css by csslint
Severity
Category
Status
Source
Language