Showing 1,086 of 1,086 total issues
Use of !important Open
.hidden-lg{display:none!important}
- Exclude checks
Use of !important Open
tr.visible-print{display:table-row!important}
- Exclude checks
Use of !important Open
@media print{.visible-print-inline-block{display:inline-block!important}
- Exclude checks
Element (path.c3-step) is overqualified, just use .c3-step without element name. Open
.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}
- Exclude checks
Use of !important Open
.c3-target.c3-defocused{opacity:.3!important}
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.services-sidebar{padding:1em 0 0 .5em;font-size:1em}
- Exclude checks
Use of !important Open
.cbranch-skip { background: #ddd !important; color: #111; }
- Exclude checks
Unexpected confirm. Open
if (confirm('Are you sure you want to reset this service\'s data?')) {
- Read upRead up
- Exclude checks
Disallow Use of Alert (no-alert)
JavaScript's alert
, confirm
, and prompt
functions are widely considered to be obtrusive as UI elements and should be replaced by a more appropriate custom UI implementation. Furthermore, alert
is often used while debugging code, which should be removed before deployment to production.
alert("here!");
Rule Details
This rule is aimed at catching debugging code that should be removed and popup UI elements that should be replaced with less obtrusive, custom UIs. As such, it will warn when it encounters alert
, prompt
, and confirm
function calls which are not shadowed.
Examples of incorrect code for this rule:
/*eslint no-alert: "error"*/
alert("here!");
confirm("Are you sure?");
prompt("What's your name?", "John Doe");
Examples of correct code for this rule:
/*eslint no-alert: "error"*/
customAlert("Something happened!");
customConfirm("Are you sure?");
customPrompt("Who are you?");
function foo() {
var alert = myCustomLib.customAlert;
alert();
}
Related Rules
- [no-console](no-console.md)
- [no-debugger](no-debugger.md) Source: http://eslint.org/docs/rules/
Rule doesn't have all its properties in alphabetical order. Open
.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}
- Exclude checks
The box-sizing property isn't supported in IE6 and IE7. Open
html{box-sizing:border-box}
- Exclude checks
Adjoining classes: .ng-table th.sortable.sort-desc Open
.ng-table th.sortable.sort-asc,.ng-table th.sortable.sort-desc{background-color:#f5f5f5;border-radius:3px}
- Exclude checks
Element (input.query) is overqualified, just use .query without element name. Open
.filter-container input.query{padding-left:30px;display:block}
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.coverage-summary th {
- Exclude checks
Use of !important Open
.com { color: #999 !important; }
- Exclude checks
Element (li.L6) is overqualified, just use .L6 without element name. Open
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
- Exclude checks
Move the invocation into the parens that contain the function. Open
(function () {
- Read upRead up
- Exclude checks
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 isfalse
.
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/
The box-sizing property isn't supported in IE6 and IE7. Open
*,:after,:before{box-sizing:inherit}
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.details-page .current-outage{font-size:1.2em;border:1px solid #eee;border-radius:3px;border-left-color:#ce4844;border-left-width:5px;padding:20px;margin:10px 0}
- Exclude checks
Using width with padding can sometimes make elements larger than you expect. Open
.table-services td.admin-operations .dropdown-menu{padding:10px;width:250px;text-align:center}
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
input.ng-dirty.ng-invalid,input.ng-touched.ng-invalid{color:red;border-color:red}
- Exclude checks