mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-14 13:53:32 -06:00
Initial commit
This commit is contained in:
76
node_modules/stylelint-scss/src/rules/at-import-no-partial-extension/README.md
generated
vendored
Normal file
76
node_modules/stylelint-scss/src/rules/at-import-no-partial-extension/README.md
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
# at-import-no-partial-extension
|
||||
|
||||
Disallow file extensions in partial names in `@import`.
|
||||
|
||||
**Deprecated. Use [`at-import-partial-extension-blacklist`](/src/rules/at-import-partial-extension-blacklist/README.md) or [`at-import-partial-extension-whitelist`](/src/rules/at-import-partial-extension-whitelist/README.md) instead**
|
||||
|
||||
```scss
|
||||
@import "path/to/file.scss"
|
||||
/** ↑
|
||||
* Disallow this */
|
||||
```
|
||||
|
||||
The rule ignores [cases](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#import) when Sass considers an `@import` command just a plain CSS import:
|
||||
|
||||
* If the file’s extension is `.css`.
|
||||
* If the filename begins with `http://` (or any other protocol).
|
||||
* If the filename is a `url()`.
|
||||
* If the `@import` has any media queries.
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```scss
|
||||
@import "foo.scss";
|
||||
```
|
||||
|
||||
```scss
|
||||
@import "path/fff.less";
|
||||
```
|
||||
|
||||
```scss
|
||||
@import "path\\fff.supa";
|
||||
```
|
||||
|
||||
```scss
|
||||
@import "df/fff", '1.scss';
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```scss
|
||||
@import "path/fff";
|
||||
```
|
||||
|
||||
```scss
|
||||
@import url("path/_file.css"); /* has url(), so doesn't count as a partial @import */
|
||||
```
|
||||
|
||||
```scss
|
||||
@import "file.css"; /* Has ".css" extension, so doesn't count as a partial @import */
|
||||
```
|
||||
|
||||
```scss
|
||||
/* Both are URIs, so don't count as partial @imports */
|
||||
@import "http://_file.scss";
|
||||
@import "//_file.scss";
|
||||
```
|
||||
|
||||
```scss
|
||||
@import "file.scss" screen; /* Has a media query, so doesn't count as a partial @import */
|
||||
```
|
||||
|
||||
## Optional Options
|
||||
|
||||
### `ignoreExtensions: [ string or regexp ]`
|
||||
|
||||
An array of extensions to ignore, elements *don't need the dot at the start*. If an element is a string, only extensions that match that string are ignored. If an element is a regular expression, then extensions are tested against it and ignored if the test is successful.
|
||||
|
||||
For example, with `ignoreExtensions: [ "scss", /^my/ ] ]`, the following are no longer warnings:
|
||||
|
||||
```scss
|
||||
@import "path/fff.scss";
|
||||
```
|
||||
|
||||
```scss
|
||||
@import "path/fff.my01";
|
||||
```
|
Reference in New Issue
Block a user