Domains in URLs are disallowed Open
@import url('https://fonts.googleapis.com/css?family=Nunito&display=swap&subset=cyrillic');
- Read upRead up
- Exclude checks
No Url Domains
Rule no-url-domains
will enforce that domains are not used within urls.
Examples
When enabled, the following are allowed:
.foo {
background-image: url('/img/bar.png');
}
.foo {
background-image: url('img/bar.png');
}
.foo {
background-image: url('bar.png');
}
When enabled, the following are disallowed:
.foo {
background-image: url('https://foo.com/img/bar.png');
}
.foo {
background-image: url('http://foo.com/img/bar.png');
}
.foo {
background-image: url('//foo.com/img/bar.png');
}
Strings must use single quotes Open
@import "includes/menu";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Prefer single quoted strings Open
@import "includes/variables";
- Exclude checks
Strings must use single quotes Open
@import "includes/tasks";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Use //
comments everywhere Open
/** first import the vendor css to be able to overwrite them **/
- Exclude checks
Prefer single quoted strings Open
@import "includes/typo";
- Exclude checks
Multiline style comments should not be used Open
/** first import the vendor css to be able to overwrite them **/
- Read upRead up
- Exclude checks
No CSS Comments
Rule no-css-comments
will enforce the use of Sass single-line comments and disallow CSS comments. Bang comments (/*! */
, will be printed even in minified mode) are still allowed.
Examples
When enabled the following are allowed:
// This is a good comment
// =========
// This is a good comment
// =========
//////////////////
// This is a good comment
//////////////////
/*! This is a good bang comment */
/*!
* This is a good bang comment
**/
When enabled the following are disallowed:
/* This comment will appear in your compiled css */
/*
* Mulitline comments are bad
*/
Strings must use single quotes Open
@import "includes/components";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Prefer single quoted strings Open
@import "vendor/at-ui/index";
- Exclude checks
Imported partial ~vue-select/src/scss/vue-select.scss
should be written as ~vue-select/src/scss/vue-select
Open
@import "~vue-select/src/scss/vue-select.scss";
- Exclude checks
File extensions are not allowed Open
@import "~vue-select/src/scss/vue-select.scss";
- Read upRead up
- Exclude checks
Clean Import Paths
Rule clean-import-paths
will enforce whether or not @import
paths should have leading underscores and/or filename extensions.
Options
-
leading-underscore
:true
/false
(defaults tofalse
) -
filename-extension
:true
/false
(defaults tofalse
)
Examples
leading-underscore
When leading-underscore: false
, the following are allowed. When leading-underscore: true
, the following are disallowed:
@import 'foo';
@import 'bar/foo';
When leading-underscore: true
, the following are allowed. When leading-underscore: false
, the following are disallowed:
@import '_foo';
@import '_bar/foo';
filename-extension
When filename-extension: false
, the following are allowed. When filename-extension: true
, the following are disallowed:
@import 'foo';
@import 'bar/foo';
When filename-extension: true
, the following are allowed. When filename-extension: false
, the following are disallowed:
@import 'foo.scss';
@import 'bar/foo.scss';
Protocols and domains in URLs are disallowed Open
@import url('https://fonts.googleapis.com/css?family=Nunito&display=swap&subset=cyrillic');
- Read upRead up
- Exclude checks
No URL Protocols
Rule no-url-protocols
will enforce that protocols and domains are not used within urls.
Options
-
allow-protocol-relative-urls
:true
/false
(defaults tofalse
) > This option is scheduled to be deprecated in favour of the no-url-domains rule in sass-lint 2.0.
Examples
allow-protocol-relative-urls
When allow-protocol-relative-urls: false
, the following are allowed:
.foo {
background-image: url('/img/bar.png');
}
.foo {
background-image: url('img/bar.png');
}
.foo {
background-image: url('bar.png');
}
When allow-protocol-relative-urls: false
, the following are disallowed:
.foo {
background-image: url('https://foo.com/img/bar.png');
}
.foo {
background-image: url('http://foo.com/img/bar.png');
}
.foo {
background-image: url('//foo.com/img/bar.png');
}
When allow-protocol-relative-urls: true
, the following are allowed:
.foo {
background-image: url('//foo.com/img/bar.png');
}
.foo {
background-image: url('/img/bar.png');
}
.foo {
background-image: url('img/bar.png');
}
.foo {
background-image: url('bar.png');
}
When allow-protocol-relative-urls: true
, the following are disallowed:
.foo {
background-image: url('https://foo.com/img/bar.png');
}
.foo {
background-image: url('http://foo.com/img/bar.png');
}
Strings must use single quotes Open
@import "vendor/at-ui/index";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Prefer single quoted strings Open
@import "includes/core";
- Exclude checks
Prefer single quoted strings Open
@import "includes/crud";
- Exclude checks
Strings must use single quotes Open
@import "includes/core";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Strings must use single quotes Open
@import "includes/variables";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Prefer single quoted strings Open
@import "includes/menu";
- Exclude checks
Prefer single quoted strings Open
@import "includes/tasks";
- Exclude checks
Strings must use single quotes Open
@import "~vue-select/src/scss/vue-select.scss";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Prefer single quoted strings Open
@import "includes/components";
- Exclude checks
Prefer single quoted strings Open
@import "includes/form";
- Exclude checks
Strings must use single quotes Open
@import "includes/form";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Strings must use single quotes Open
@import "includes/crud";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}
Prefer single quoted strings Open
@import "~vue-select/src/scss/vue-select.scss";
- Exclude checks
Strings must use single quotes Open
@import "includes/typo";
- Read upRead up
- Exclude checks
Quotes
Rule quotes
will enforce whether single quotes (''
) or double quotes (""
) should be used for all strings.
Options
-
style
:single
/double
(defaults tosingle
)
Examples
When style: single
, the following are allowed. When style: double
, the following are disallowed:
.foo {
content: 'bar';
}
When style: double
, the following are allowed. When style: single
, the following are disallowed:
.foo {
content: "bar";
}