Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use https and fix redirects #421

Merged
merged 1 commit into from Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -10,15 +10,15 @@ A collection of SCSS specific linting rules for [stylelint](https://github.com/s

## Purpose

stylelint by itself supports [SCSS syntax](http://stylelint.io/user-guide/css-processors/#parsing-non-standard-syntax) very well (as well as other preprocessors' syntaxes). Moreover, it introduces some specific rules that can be used to lint SCSS, e.g. to limit [`nesting`](http://stylelint.io/user-guide/rules/max-nesting-depth/), control the way [`@-rules`](http://stylelint.io/user-guide/rules/#at-rule) are written. Yet stylelint is in general focused on standard CSS.
stylelint by itself supports [SCSS syntax](https://stylelint.io/user-guide/css-processors#parsing-non-standard-syntax) very well (as well as other preprocessors' syntaxes). Moreover, it introduces some specific rules that can be used to lint SCSS, e.g. to limit [`nesting`](https://stylelint.io/user-guide/rules/max-nesting-depth), control the way [`@-rules`](https://stylelint.io/user-guide/rules#at-rule) are written. Yet stylelint is in general focused on standard CSS.

stylelint-scss introduces rules specific to SCSS syntax. That said, the rules from this plugin can be used with other syntaxes, like Less or some PostCSS syntaxes. That's why the rules' names are not tied to SCSS only (`at-function-pattern` instead of `scss-function-pattern`).

The plugin follows stylelint's guidelines (about [rule names](http://stylelint.io/user-guide/about-rules/), testing and [so on](https://github.com/stylelint/stylelint/tree/master/docs/developer-guide)).
The plugin follows stylelint's guidelines (about [rule names](https://stylelint.io/user-guide/about-rules), testing and [so on](https://github.com/stylelint/stylelint/tree/master/docs/developer-guide)).

## Installation and usage

stylelint-scss is a plugin for [stylelint](http://stylelint.io/user-guide/), so it's meant to be used with it.
stylelint-scss is a plugin for [stylelint](https://stylelint.io/user-guide), so it's meant to be used with it.

**Node.js v6 or newer** is required. That's because stylelint itself [doesn't support Node.js versions below 6](https://github.com/stylelint/stylelint/issues/2996#issuecomment-352663375).

Expand All @@ -43,11 +43,11 @@ Create the `.stylelintrc.json` config file (or open the existing one), add `styl
}
```

Please refer to [stylelint docs](http://stylelint.io/user-guide/) for the detailed info on using this linter.
Please refer to [stylelint docs](https://stylelint.io/user-guide) for the detailed info on using this linter.

## List of rules

Here are stylelint-scss' rules, grouped by the [_thing_](http://apps.workflower.fi/vocabs/css/en) they apply to (just like in [stylelint](http://stylelint.io/user-guide/about-rules/)).
Here are stylelint-scss' rules, grouped by the [_thing_](http://apps.workflower.fi/vocabs/css/en) they apply to (just like in [stylelint](https://stylelint.io/user-guide/about-rules)).

Please also see the [example configs](./docs/examples/) for special cases.

Expand Down Expand Up @@ -95,7 +95,7 @@ Please also see the [example configs](./docs/examples/) for special cases.
### `@`-rule

- [`at-rule-conditional-no-parentheses`](./src/rules/at-rule-conditional-no-parentheses/README.md): Disallow parentheses in conditional @ rules (if, elsif, while).
- [`at-rule-no-unknown`](./src/rules/at-rule-no-unknown/README.md): Disallow unknown at-rules. Should be used **instead of** stylelint's [at-rule-no-unknown](http://stylelint.io/user-guide/rules/at-rule-no-unknown/).
- [`at-rule-no-unknown`](./src/rules/at-rule-no-unknown/README.md): Disallow unknown at-rules. Should be used **instead of** stylelint's [at-rule-no-unknown](https://stylelint.io/user-guide/rules/at-rule-no-unknown).

### `$`-variable

Expand Down Expand Up @@ -132,9 +132,9 @@ Please also see the [example configs](./docs/examples/) for special cases.

### Function

- [`function-color-relative`](./src/rules/function-color-relative/README.md): Encourage the use of the [scale-color](https://sass-lang.com/documentation/functions/color#scale-color) function over regular color functions.
- [`function-quote-no-quoted-strings-inside`](./src/rules/function-quote-no-quoted-strings-inside/README.md): Disallow quoted strings inside the [quote function](https://sass-lang.com/documentation/functions/string#quote) (Autofixable).
- [`function-unquote-no-unquoted-strings-inside`](./src/rules/function-unquote-no-unquoted-strings-inside/README.md): Disallow unquoted strings inside the [unquote function](https://sass-lang.com/documentation/functions/string#unquote) (Autofixable).
- [`function-color-relative`](./src/rules/function-color-relative/README.md): Encourage the use of the [scale-color](https://sass-lang.com/documentation/modules/color#scale-color) function over regular color functions.
- [`function-quote-no-quoted-strings-inside`](./src/rules/function-quote-no-quoted-strings-inside/README.md): Disallow quoted strings inside the [quote function](https://sass-lang.com/documentation/modules/string#quote) (Autofixable).
- [`function-unquote-no-unquoted-strings-inside`](./src/rules/function-unquote-no-unquoted-strings-inside/README.md): Disallow unquoted strings inside the [unquote function](https://sass-lang.com/documentation/modules/string#unquote) (Autofixable).

### Map

Expand Down Expand Up @@ -181,7 +181,7 @@ There work on the plugin's rules is still in progress, so if you feel like it, y

We communicate via [issues](https://github.com/kristerkari/stylelint-scss/issues) and [pull requests](https://github.com/kristerkari/stylelint-scss/pulls).

There is also [stackoverflow](http://stackoverflow.com/questions/tagged/stylelint), which would be the preferred QA forum.
There is also [stackoverflow](https://stackoverflow.com/questions/tagged/stylelint), which would be the preferred QA forum.

## Contributors

Expand Down
4 changes: 2 additions & 2 deletions src/rules/at-else-closing-brace-newline-after/README.md
Expand Up @@ -13,9 +13,9 @@ Require or disallow a newline after the closing brace of `@else` statements.

The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.

This rule might have conflicts with stylelint's core rule [`block-closing-brace-newline-after`](http://stylelint.io/user-guide/rules/block-closing-brace-newline-after/) if it doesn't have `"ignoreAtRules": ["else"]` in a `.stylelintrc` config file. That's because an `@else { ... }` statement can be successfully parsed as an at-rule with a block. You might also want to set `"ignoreAtRules": ["else"]` for another stylelint's core rule - [`at-rule-empty-line-before`](http://stylelint.io/user-guide/rules/at-rule-empty-line-before/) that could be forcing empty lines before at-rules (including `@else`s that follow `@if`s or other `@else`s).
This rule might have conflicts with stylelint's core rule [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) if it doesn't have `"ignoreAtRules": ["else"]` in a `.stylelintrc` config file. That's because an `@else { ... }` statement can be successfully parsed as an at-rule with a block. You might also want to set `"ignoreAtRules": ["else"]` for another stylelint's core rule - [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before) that could be forcing empty lines before at-rules (including `@else`s that follow `@if`s or other `@else`s).

This rule doesn't have usual `"always"` and `"never"` main option values, because if you don't need special behavior for `@if` and `@else` you could just use [`block-closing-brace-newline-after`](http://stylelint.io/user-guide/rules/block-closing-brace-newline-after/) set to `"always"` or any other value.
This rule doesn't have usual `"always"` and `"never"` main option values, because if you don't need special behavior for `@if` and `@else` you could just use [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) set to `"always"` or any other value.

## Options

Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-else-closing-brace-space-after/README.md
Expand Up @@ -12,7 +12,7 @@ Require a single space or disallow whitespace after the closing brace of `@else`

The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.

This rule might have conflicts with stylelint's core [`block-closing-brace-space-after`](http://stylelint.io/user-guide/rules/block-closing-brace-space-after/) rule if the latter is set up in your `.stylelintrc` config file.
This rule might have conflicts with stylelint's core [`block-closing-brace-space-after`](https://stylelint.io/user-guide/rules/block-closing-brace-space-after) rule if the latter is set up in your `.stylelintrc` config file.

## Options

Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-else-empty-line-before/README.md
Expand Up @@ -13,7 +13,7 @@ Require an empty line or disallow empty lines before `@`-else.

The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.

`@if` and `@else` statements might need to have different behavior than all the other at-rules. For that you might need to set `"ignoreAtRules": ["else"]` for stylelint's core rule [`at-rule-empty-line-before`](http://stylelint.io/user-guide/rules/at-rule-empty-line-before/). But that would make you unable to disallow empty lines before `@else` while forcing it to be on a new line. This rule is designed to solve exactly that.
`@if` and `@else` statements might need to have different behavior than all the other at-rules. For that you might need to set `"ignoreAtRules": ["else"]` for stylelint's core rule [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before). But that would make you unable to disallow empty lines before `@else` while forcing it to be on a new line. This rule is designed to solve exactly that.

## Options

Expand Down
4 changes: 2 additions & 2 deletions src/rules/at-if-closing-brace-newline-after/README.md
Expand Up @@ -11,9 +11,9 @@ Require or disallow a newline after the closing brace of `@if` statements.

The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.

This rule might have conflicts with stylelint's core rule [`block-closing-brace-newline-after`](http://stylelint.io/user-guide/rules/block-closing-brace-newline-after/) if it doesn't have `"ignoreAtRules": ["if"]` in a `.stylelintrc` config file. That's because an `@if { ... }` statement can be successfully parsed as an at-rule with a block. You might also want to set `"ignoreAtRules": ["else"]` for another stylelint's core rule - [`at-rule-empty-line-before`](http://stylelint.io/user-guide/rules/at-rule-empty-line-before/) that could be forcing empty lines before at-rules (including `@else`s that follow `@if`s or other `@else`s).
This rule might have conflicts with stylelint's core rule [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) if it doesn't have `"ignoreAtRules": ["if"]` in a `.stylelintrc` config file. That's because an `@if { ... }` statement can be successfully parsed as an at-rule with a block. You might also want to set `"ignoreAtRules": ["else"]` for another stylelint's core rule - [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before) that could be forcing empty lines before at-rules (including `@else`s that follow `@if`s or other `@else`s).

This rule doesn't have usual `"always"` and `"never"` main option values, because if you don't need special behavior for `@if` and `@else` you could just use [`block-closing-brace-newline-after`](http://stylelint.io/user-guide/rules/block-closing-brace-newline-after/) set to `"always"` or any other value.
This rule doesn't have usual `"always"` and `"never"` main option values, because if you don't need special behavior for `@if` and `@else` you could just use [`block-closing-brace-newline-after`](https://stylelint.io/user-guide/rules/block-closing-brace-newline-after) set to `"always"` or any other value.

## Options

Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-if-closing-brace-space-after/README.md
Expand Up @@ -11,7 +11,7 @@ Require a single space or disallow whitespace after the closing brace of `@if` s

The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.

This rule might have conflicts with stylelint's core [`block-closing-brace-space-after`](http://stylelint.io/user-guide/rules/block-closing-brace-space-after/) rule if the latter is set up in your `.stylelintrc` config file.
This rule might have conflicts with stylelint's core [`block-closing-brace-space-after`](https://stylelint.io/user-guide/rules/block-closing-brace-space-after) rule if the latter is set up in your `.stylelintrc` config file.

## Options

Expand Down
Expand Up @@ -8,7 +8,7 @@ Disallow leading underscore in partial names in `@import`.
* 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:
The rule ignores [cases](https://sass-lang.com/documentation/at-rules/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).
Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-import-partial-extension-blacklist/README.md
Expand Up @@ -8,7 +8,7 @@ Specify blacklist of disallowed file extensions for partial names in `@import` c
* Blacklist of these */
```

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:
The rule ignores [cases](https://sass-lang.com/documentation/at-rules/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).
Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-import-partial-extension-whitelist/README.md
Expand Up @@ -8,7 +8,7 @@ Specify whitelist of allowed file extensions for partial names in `@import` comm
* Whitelist of these */
```

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:
The rule ignores [cases](https://sass-lang.com/documentation/at-rules/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).
Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-import-partial-extension/README.md
Expand Up @@ -8,7 +8,7 @@ Require or disallow extension in `@import` commands.
* This extension */
```

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:
The rule ignores [cases](https://sass-lang.com/documentation/at-rules/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).
Expand Down
2 changes: 1 addition & 1 deletion src/rules/at-rule-no-unknown/README.md
@@ -1,6 +1,6 @@
# at-rule-no-unknown

Disallow unknown at-rules. Should be used **instead of** stylelint's [at-rule-no-unknown](http://stylelint.io/user-guide/rules/at-rule-no-unknown/).
Disallow unknown at-rules. Should be used **instead of** stylelint's [at-rule-no-unknown](https://stylelint.io/user-guide/rules/at-rule-no-unknown).

```css
@unknown (max-width: 960px) {}
Expand Down
Expand Up @@ -12,7 +12,7 @@ font: { /* `font` is a "namespace" */

A "namespace" is everything before the first `-` in property names, e.g. `margin` in `margin-bottom`. It is the "namespace" that is used as a root identifier for a nested properties group (`font` in the example above).

[Sass official docs on nested properties](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties).
[Sass official docs on nested properties](https://sass-lang.com/documentation/style-rules/declarations#nesting).

The following patterns are considered warnings:

Expand Down
2 changes: 1 addition & 1 deletion src/rules/declaration-nested-properties/README.md
Expand Up @@ -10,7 +10,7 @@ font: {
}
```

[Sass official docs on nested properties](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties).
[Sass official docs on nested properties](https://sass-lang.com/documentation/style-rules/declarations#nesting).

## Options

Expand Down
2 changes: 1 addition & 1 deletion src/rules/double-slash-comment-empty-line-before/README.md
Expand Up @@ -12,7 +12,7 @@ a {}

The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.

This rule only works with SCSS-like [single-line comments](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#comments) and ignores:
This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores:
* comments that are the very first nodes in a file;
* CSS comments (`/* */`);
* comments that are on the same line as some non-comment code (inline comments).
Expand Down
2 changes: 1 addition & 1 deletion src/rules/double-slash-comment-inline/README.md
Expand Up @@ -11,7 +11,7 @@ a {

An inline comment in terms of this rule is a comment that is placed on the same line with any other code, either before or after it.

This rule only works with SCSS-like [single-line comments](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#comments) and ignores CSS comments (`/* */`).
This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores CSS comments (`/* */`).

## Options

Expand Down
2 changes: 1 addition & 1 deletion src/rules/double-slash-comment-whitespace-inside/README.md
Expand Up @@ -9,7 +9,7 @@ a {
* Such whitespace */
```

This rule only works with SCSS-like [single-line comments](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#comments) and ignores CSS comments (`/* */`).
This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores CSS comments (`/* */`).

Any number of slases are allowed at the beginning of the comment. So `/// comment` is treated the same way as `// comment`.

Expand Down
20 changes: 10 additions & 10 deletions src/rules/function-color-relative/README.md
@@ -1,15 +1,15 @@
# function-color-relative

Encourage the use of the [scale-color](https://sass-lang.com/documentation/functions/color#scale-color) over:

* [darken](https://sass-lang.com/documentation/functions/color#darken)
* [desaturate](https://sass-lang.com/documentation/functions/color#desaturate)
* [fade-in](https://sass-lang.com/documentation/functions/color#fade-in)
* [fade-out](https://sass-lang.com/documentation/functions/color#fade-out)
* [lighten](https://sass-lang.com/documentation/functions/color#lighten)
* [opacify](https://sass-lang.com/documentation/functions/color#opacify)
* [saturate](https://sass-lang.com/documentation/functions/color#saturate)
* [transparentize](https://sass-lang.com/documentation/functions/color#transparentize)
Encourage the use of the [scale-color](https://sass-lang.com/documentation/modules/color#scale-color) over:

* [darken](https://sass-lang.com/documentation/modules/color#darken)
* [desaturate](https://sass-lang.com/documentation/modules/color#desaturate)
* [fade-in](https://sass-lang.com/documentation/modules/color#fade-in)
* [fade-out](https://sass-lang.com/documentation/modules/color#fade-out)
* [lighten](https://sass-lang.com/documentation/modules/color#lighten)
* [opacify](https://sass-lang.com/documentation/modules/color#opacify)
* [saturate](https://sass-lang.com/documentation/modules/color#saturate)
* [transparentize](https://sass-lang.com/documentation/modules/color#transparentize)

```scss
p {
Expand Down
@@ -1,6 +1,6 @@
# function-quote-no-quoted-strings-inside

Disallow quoted strings inside the [quote function](https://sass-lang.com/documentation/functions/string#quote)
Disallow quoted strings inside the [quote function](https://sass-lang.com/documentation/modules/string#quote)

```scss
p {
Expand Down
@@ -1,6 +1,6 @@
# function-unquote-no-unquoted-strings-inside

Disallow unquoted strings inside the [unquote function](https://sass-lang.com/documentation/functions/string#unquote)
Disallow unquoted strings inside the [unquote function](https://sass-lang.com/documentation/modules/string#unquote)

```scss
p {
Expand Down