michahell/pinbored-nwjs

View on GitHub

Showing 282 of 282 total issues

Don't use IDs in selectors.
Open

#tags {
Severity: Minor
Found in App/styles/view-tags.css by csslint

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

          (function(i){

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/

Don't use IDs in selectors.
Open

#tags .tag-options.ng-hide {
Severity: Minor
Found in App/styles/view-tags.css by csslint

Don't use IDs in selectors.
Open

#tags .info {
Severity: Minor
Found in App/styles/view-tags.css by csslint

Don't use IDs in selectors.
Open

#list > .list-duplicates > ul {
Severity: Minor
Found in App/styles/view-tools.css by csslint

Don't make functions within a loop.
Open

          (function(i){

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/

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

#overview select,
Severity: Minor
Found in App/styles/view-common.css by csslint

Don't use IDs in selectors.
Open

#overview .highlightedtag {
Severity: Minor
Found in App/styles/view-overview.css by csslint

Don't use IDs in selectors.
Open

#overview .tagContainer {
Severity: Minor
Found in App/styles/view-overview.css by csslint

Adjoining classes: .list-group-item.ng-enter.ng-enter-active
Open

.list-group-item.ng-enter.ng-enter-active {
Severity: Minor
Found in App/styles/view-overview.css by csslint

Don't use IDs in selectors.
Open

#list > .list-wrapper > ul > li .list-group-item-heading {
Severity: Minor
Found in App/styles/view-overview.css by csslint

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

#settings .screen p {
Severity: Minor
Found in App/styles/view-settings.css by csslint

Don't use IDs in selectors.
Open

#list > .list-duplicates small {
Severity: Minor
Found in App/styles/view-tools.css by csslint

Don't use IDs in selectors.
Open

#tags .navbar-inverse p {
Severity: Minor
Found in App/styles/view-common.css by csslint

Don't use IDs in selectors.
Open

#overview .navbar-inverse form .form-group input,
Severity: Minor
Found in App/styles/view-common.css by csslint

Don't use IDs in selectors.
Open

#overview .tagsinput input {
Severity: Minor
Found in App/styles/view-overview.css by csslint

Don't use IDs in selectors.
Open

#list > .list-wrapper > ul > li .link-item-toolbar .btn-toolbar {
Severity: Minor
Found in App/styles/view-overview.css by csslint

Don't use IDs in selectors.
Open

#settings .settingsrow {
Severity: Minor
Found in App/styles/view-settings.css by csslint

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

#tags .tagbox {
Severity: Minor
Found in App/styles/view-tags.css by csslint

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

.tooltitle {
Severity: Minor
Found in App/styles/view-tools.css by csslint
Severity
Category
Status
Source
Language