Showing 200 of 288 total issues
Pseudo-elements must start with double colons Open
&:visited:after {
- Read upRead up
- Exclude checks
Pseudo-element
Rule pseudo-element
will enforce that:
- Pseudo-elements must start with double colons.
- Pseudo-classes must start with single colon.
Examples
When enabled, the following are allowed:
.foo::before {
content: "bar";
}
.foo:hover {
content: "bar";
}
When enabled, the following are disallowed:
.foo:before {
content: "bar";
}
.foo::hover {
content: "bar";
}
Space expected between blocks Open
&[type="i"] {
- Read upRead up
- Exclude checks
Empty Line Between Blocks
Rule empty-line-between-blocks
will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.
Options
-
include
:true
/false
(defaults totrue
) -
allow-single-line-rulesets
:true
/false
(defaults totrue
)
Examples
include
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
content: 'foo';
.bar {
content: 'bar';
// Waldo
&--baz {
content: 'baz';
}
}
}
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
content: 'foo';
.bar {
content: 'bar';
// Waldo
&--baz {
content: 'baz';
}
}
}
allow-single-line-rulesets
When allow-single-line-rulesets: true
, the following are allowed. When allow-single-line-rulesets: false
, the following are disallowed:
.foo { content: 'foo'; }
.bar { content: 'bar'; }
.baz { content: 'baz'; }
Pseudo-elements must start with double colons Open
&:link:after,
- Read upRead up
- Exclude checks
Pseudo-element
Rule pseudo-element
will enforce that:
- Pseudo-elements must start with double colons.
- Pseudo-classes must start with single colon.
Examples
When enabled, the following are allowed:
.foo::before {
content: "bar";
}
.foo:hover {
content: "bar";
}
When enabled, the following are disallowed:
.foo:before {
content: "bar";
}
.foo::hover {
content: "bar";
}
Space expected between blocks Open
&[type="A"] {
- Read upRead up
- Exclude checks
Empty Line Between Blocks
Rule empty-line-between-blocks
will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.
Options
-
include
:true
/false
(defaults totrue
) -
allow-single-line-rulesets
:true
/false
(defaults totrue
)
Examples
include
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
content: 'foo';
.bar {
content: 'bar';
// Waldo
&--baz {
content: 'baz';
}
}
}
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
content: 'foo';
.bar {
content: 'bar';
// Waldo
&--baz {
content: 'baz';
}
}
}
allow-single-line-rulesets
When allow-single-line-rulesets: true
, the following are allowed. When allow-single-line-rulesets: false
, the following are disallowed:
.foo { content: 'foo'; }
.bar { content: 'bar'; }
.baz { content: 'baz'; }
Expected indentation of 2 space but found 4. Open
.pager__item {
- Read upRead up
- Exclude checks
Indentation
Rule indentation
will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.
The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.
Options
-
size
:number
or'tab'
(defaults to2
spaces)
Examples
When enabled (assuming size: 2
) the following are allowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
When enabled (assuming size: 2
) the following are disallowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
Space expected around operator Open
aspect-ratio: 30/11;
- Read upRead up
- Exclude checks
Space Around Operator
Rule space-around-operator
will enforce whether or not a single space should be included before and after the following operators: +
, -
, /
, *
, %
, <
, >
==
, !=
, <=
and >=
.
Options
-
include
:true
/false
(defaults totrue
)
Examples
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
margin: 5px + 15px;
}
$foo: 1;
$bar: 3;
.foo {
margin: $foo + $bar + 'px';
}
$foo: 1 + 1;
$bar: 2 - 1;
@if $foo == $bar {
$baz: 1;
}
@if ($foo != $bar) {
$baz: 1;
}
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
margin: 5px+15px;
}
$foo: 1;
$bar: 3;
.foo {
margin: $foo+$bar+'px';
}
$foo: 1+1;
$bar: 2-1;
@if $foo==$bar {
$baz: 1;
}
@if ($foo!=$bar) {
$baz: 1;
}
When include: true
or include: false
multiple spaces around operators are disallowed:
.foo {
margin: 5px + 15px;
}
$foo: 1 +1;
$bar: 2- 1;
ID selectors not allowed Open
#navigation,
- Read upRead up
- Exclude checks
No IDs
Rule no-ids
will enforce that ID selectors are not allowed to be used.
Examples
When enabled, the following are disallowed:
#foo {
content: 'bar';
}
ID selectors not allowed Open
#footer,
- Read upRead up
- Exclude checks
No IDs
Rule no-ids
will enforce that ID selectors are not allowed to be used.
Examples
When enabled, the following are disallowed:
#foo {
content: 'bar';
}
Expected indentation of 4 spaces but found 6. Open
display: inline-block;
- Read upRead up
- Exclude checks
Indentation
Rule indentation
will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.
The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.
Options
-
size
:number
or'tab'
(defaults to2
spaces)
Examples
When enabled (assuming size: 2
) the following are allowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
When enabled (assuming size: 2
) the following are disallowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
Space expected around operator Open
aspect-ratio: 16/9;
- Read upRead up
- Exclude checks
Space Around Operator
Rule space-around-operator
will enforce whether or not a single space should be included before and after the following operators: +
, -
, /
, *
, %
, <
, >
==
, !=
, <=
and >=
.
Options
-
include
:true
/false
(defaults totrue
)
Examples
When include: true
, the following are allowed. When include: false
, the following are disallowed:
.foo {
margin: 5px + 15px;
}
$foo: 1;
$bar: 3;
.foo {
margin: $foo + $bar + 'px';
}
$foo: 1 + 1;
$bar: 2 - 1;
@if $foo == $bar {
$baz: 1;
}
@if ($foo != $bar) {
$baz: 1;
}
When include: false
, the following are allowed. When include: true
, the following are disallowed:
.foo {
margin: 5px+15px;
}
$foo: 1;
$bar: 3;
.foo {
margin: $foo+$bar+'px';
}
$foo: 1+1;
$bar: 2-1;
@if $foo==$bar {
$baz: 1;
}
@if ($foo!=$bar) {
$baz: 1;
}
When include: true
or include: false
multiple spaces around operators are disallowed:
.foo {
margin: 5px + 15px;
}
$foo: 1 +1;
$bar: 2- 1;
Expected indentation of 4 spaces but found 6. Open
.button {
- Read upRead up
- Exclude checks
Indentation
Rule indentation
will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.
The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.
Options
-
size
:number
or'tab'
(defaults to2
spaces)
Examples
When enabled (assuming size: 2
) the following are allowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
When enabled (assuming size: 2
) the following are disallowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
Expected indentation of 6 spaces but found 8. Open
@include button-primary;
- Read upRead up
- Exclude checks
Indentation
Rule indentation
will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.
The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.
Options
-
size
:number
or'tab'
(defaults to2
spaces)
Examples
When enabled (assuming size: 2
) the following are allowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
When enabled (assuming size: 2
) the following are disallowed:
.foo {
content: 'bar';
.baz {
content: 'qux';
// Waldo
&--waldo {
content: 'alpha';
}
}
}
Property aspect-ratio
appears to be spelled incorrectly Open
aspect-ratio: 30/11;
- Read upRead up
- Exclude checks
No Misspelled Properties
Rule no-misspelled-properties
will enforce the correct spelling of CSS properties and prevent the use of unknown CSS properties.
Options
-
extra-properties
:[array of extra properties to check spelling against]
(defaults to empty array[]
).
Examples
When enabled, the following are disallowed:
// incorrect spelling
.foo {
borders: 0;
}
// unknown property
.bar {
border-right-left: 0;
}
// incorrect spelling
.baz {
-webkit-transit1on: width 2s;
}
When extra-properties
contains a property value of transit1on
as show below:
no-misspelled-properties:
- 1
-
'extra-properties':
- 'transit1on'
The following would now be allowed:
// incorrect spelling now whitelisted
.baz {
-webkit-transit1on: width 2s;
}
// incorrect spelling now whitelisted
.quz {
transit1on: width 2s;
}
While the following would remain disallowed:
// incorrect spelling
.foo {
borders: 0;
}
// unknown property
.bar {
border-right-left: 0;
}
ID selectors not allowed Open
#content,
- Read upRead up
- Exclude checks
No IDs
Rule no-ids
will enforce that ID selectors are not allowed to be used.
Examples
When enabled, the following are disallowed:
#foo {
content: 'bar';
}
TODO found Open
// TODO: add validation descriptor w/o calling accessors
- Exclude checks
todo found Open
* @todo The info variable needs to be made drillable and each of these sub
- Exclude checks
TODO found Open
CSSRuleList: true, // TODO: Not spec compliant, should be false.
- Exclude checks
TODO found Open
MediaList: true, // TODO: Not spec compliant, should be false.
- Exclude checks
TODO found Open
StyleSheetList: true, // TODO: Not spec compliant, should be false.
- Exclude checks
syntax error, unexpected 'protected' (T_PROTECTED), expecting variable (T_VARIABLE)
Open
public function __construct(protected FileSystemInterface $fileSystem, LoggerChannelFactoryInterface $logger_factory, protected MessengerInterface $messenger) {
- Exclude checks