Showing 2,141 of 2,141 total issues
Properties should be ordered margin-left, padding-left Open
Open
padding-left: 20px;
- Exclude checks
Properties should be ordered border-bottom, height Open
Open
height: 150px;
- Exclude checks
Properties should be ordered border-bottom, color, text-decoration Open
Open
color: $primary-dark;
- Exclude checks
Name of variable greyscale_midtone
should be written in all lowercase letters with hyphens instead of underscores Open
Open
border-bottom: 1px solid $greyscale_midtone;
- Exclude checks
Name of variable font_size_90
should be written in all lowercase letters with hyphens instead of underscores Open
Open
font-size: $font_size_90;
- Exclude checks
Name of variable font_size_120
should be written in all lowercase letters with hyphens instead of underscores Open
Open
font-size: $font_size_120;
- Exclude checks
Expected item on line 1039 to appear before line 1038. Rule sets should be ordered as follows: @extends
, @includes
without @content
, properties, @includes
with @content
, nested rule sets Open
Open
@include type-size(baseline);
- Exclude checks
Selector should have depth of applicability no greater than 3, but was 5 Open
Open
h1 {
- Exclude checks
Line should be indented 2 spaces, but was indented 4 spaces Open
Open
border-top: 1px solid #ccc;
- Exclude checks
Line should be indented 2 spaces, but was indented 4 spaces Open
Open
padding: 0;
- Exclude checks
Properties should be ordered font-weight, margin, padding Open
Open
margin: 0;
- Exclude checks
Properties should be ordered font-size, position, top, vertical-align Open
Open
vertical-align: baseline;
- Exclude checks
Line should be indented 6 spaces, but was indented 8 spaces Open
Open
@include inline-block();
- Exclude checks
Expected item on line 233 to appear before line 231. Rule sets should be ordered as follows: @extends
, @includes
without @content
, properties, @includes
with @content
, nested rule sets Open
Open
@include inline-block();
- Exclude checks
Expected variable declaration to be on a new line. Open
Open
var oldLeft = el.style.left, oldRsLeft = el.runtimeStyle.left;
- Read upRead up
- Exclude checks
require or disallow newlines around variable declarations (one-var-declaration-per-line)
Some developers declare multiple var statements on the same line:
var foo, bar, baz;
Others prefer to declare one var per line.
var foo,
bar,
baz;
Keeping to one of these styles across a project's codebase can help with maintaining code consistency.
Rule Details
This rule enforces a consistent newlines around variable declarations. This rule ignores variable declarations inside for
loop conditionals.
Options
This rule has a single string option:
-
"initializations"
(default) enforces a newline around variable initializations -
"always"
enforces a newline around variable declarations
initializations
Examples of incorrect code for this rule with the default "initializations"
option:
/*eslint one-var-declaration-per-line: ["error", "initializations"]*/
/*eslint-env es6*/
var a, b, c = 0;
let a,
b = 0, c;
Examples of correct code for this rule with the default "initializations"
option:
/*eslint one-var-declaration-per-line: ["error", "initializations"]*/
/*eslint-env es6*/
var a, b;
let a,
b;
let a,
b = 0;
always
Examples of incorrect code for this rule with the "always"
option:
/*eslint one-var-declaration-per-line: ["error", "always"]*/
/*eslint-env es6*/
var a, b;
let a, b = 0;
const a = 0, b = 0;
Examples of correct code for this rule with the "always"
option:
/*eslint one-var-declaration-per-line: ["error", "always"]*/
/*eslint-env es6*/
var a,
b;
let a,
b = 0;
Related Rules
- [one-var](one-var.md) Source: http://eslint.org/docs/rules/
Selector should have depth of applicability no greater than 3, but was 5 Open
Open
h1 {
- Exclude checks
Properties should be ordered border-top, font-size, margin-top, padding-top Open
Open
margin-top: 10px;
- Exclude checks
Name of variable accentA-dark
should be written in all lowercase letters with hyphens instead of underscores Open
Open
border: 1px solid $accentA-dark;
- Exclude checks
0.9
should be written without a leading zero as .9
Open
Open
background: rgba($search-bg, 0.9);
- Exclude checks
Avoid using id selectors Open
Open
.home #search-bottom-utilities {
- Exclude checks