Showing 617 of 617 total issues
Adjoining classes: .offset-by-two.column Open
.offset-by-two.column,
- Exclude checks
Adjoining classes: .offset-by-three.column Open
.offset-by-three.column,
- Exclude checks
Adjoining classes: .offset-by-eight.columns Open
.offset-by-eight.columns { margin-left: 69.3333333333%; }
- Exclude checks
Adjoining classes: .offset-by-one-third.column Open
.offset-by-one-third.column,
- Exclude checks
Adjoining classes: .offset-by-one-half.column Open
.offset-by-one-half.column,
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
body {
- Exclude checks
The box-sizing property isn't supported in IE6 and IE7. Open
box-sizing: border-box; }
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
code {
- Exclude checks
Element (label.privacy) is overqualified, just use .privacy without element name. Open
label.privacy {
- Exclude checks
Adjoining classes: .three.columns Open
.three.columns { width: 22%; }
- Exclude checks
Adjoining classes: .six.columns Open
.six.columns { width: 48%; }
- Exclude checks
Adjoining classes: .offset-by-three.columns Open
.offset-by-three.columns { margin-left: 26%; }
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; }
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.button:hover,
- Exclude checks
Heading (h1) has already been defined. Open
.hero h1 {
- Exclude checks
Move the invocation into the parens that contain the function. Open
(function(window, $, undefined){
- 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/
Adjoining classes: .four.columns Open
.four.columns { width: 30.6666666667%; }
- Exclude checks
Adjoining classes: .one-third.column Open
.one-third.column { width: 30.6666666667%; }
- Exclude checks
Adjoining classes: .offset-by-two.columns Open
.offset-by-two.columns { margin-left: 17.3333333333%; }
- Exclude checks